linux

Python importing & using cdll (with a linux .so file)

Hi all! After one of my last questions about python&c++ integration i was told to use dlls at windows. (Previous question) That worked ok doing: cl /LD A.cpp B.cpp C.pp in windows enviroment, after setting the include path for boost, cryptopp sources and cryptopp libraries. Now i'm tryting to do the same in linux, creating a .so fil...

Overwriting /boot/grub/menu.lst?

Before overwriting I have copied /boot/grub/menu.lst to /home/san. I am running sed on the /home/san/menu.lst just for testing. How can i overwrite default 0 to default 1 with the help of sed. I used following commands but none worked. It's most probably because i don't how many spaces are there in between "de...

Displaying instructions to user after .deb installer completes

Is there a commonly used approach for displaying 'how to get started' instructions to a user after a .deb installer has finished installing a package? I need an approach that works for users working via a terminal as well as from a desktop environment. Server admins will probably know to check for a README file but many others won't....

Find out how many pages of memory a process uses on linux

I need to find out how many pages of memory a process allocates? Each page is 4096, the process memory usage I'm having some problems locating the correct value. When I'm looking in the gome-system-monitor there are a few values to choose from under memory map. Thanks. The point of this is to divide the memory usage by the page count...

How to get MAC address of your machine using a C program?

I am working on Ubuntu. How can I get MAC address of my machine or an interface say eth0 using C program. ...

Can I use a USB-to-serial adapter to talk to my development board from VMWare Fusion?

I have a Linux virtual machine running on VMWare Fusion (on Mac OS X) that I intend to use as a development environment for an embedded system. Would it be possible for my Linux VM to talk to my embedded system's serial port using a USB-to-serial adapter? Any recommendations for what sort of adapter I should get? ...

Java shell expansion similar to wordexp

Is there a way to do shell wildcard expansion in java similar to the way that the C function call wordexp works? It seems a bit platform specific, but there has to be a nice abstraction for this in one of the java system classes, right? I would be happy if I could get ~/, ./, and ../ to resolve to their canonical paths. Thanks! ...

How to share global variables in a shared library(.so) across instances of the same process that use the shared library in Linux?

I have a shared library(.so) that I preload before executing an application and I have a few global data structures in the shared library that the application uses. The application can create other processes say using fork() and these processes can update the global data structures in the shared library. I would like to keep a consistent...

I never really understood: what is POSIX?

What is POSIX? I read the Wikipedia article and I read it ever time I encounter the term. Fact is that I never really understood what it is. Can anyone please explain it to me by explaining "the need for POSIX" too? ...

setting a gdb exit breakpoint not working?

I've set breakpoints on exit and _exit and my program (multithreaded app, running on linux 2.6.16.46-0.12 sles10), is somehow still exiting in a way I can't locate (gdb) c ... [New Thread 47513671297344 (LWP 15279)] [New Thread 47513667103040 (LWP 15280)] [New Thread 47513662908736 (LWP 15281)] Program exited with code 0177. (gdb) t...

Best way to read contents of a bios in linux

Hey Guys An odd question really. Is it possible to read the entire contents of the bios chip in. We have a problem where we need to verify the contents of the bios chip? Cheers James ...

Choosing Linux for open source development.

I work on Windows XP platform and use Aptana Studio, MySQL for PHP development. I want to know which Linux edition and flavor would be appropriate for my development purposes? ...

looking for a program for linux to view the call stack of my program

looking for a native linux program that lets you view the call stack. ...

Extracting an integer from a line with the help of linux script?

I have a file, one of whose line contains: number 8 how can i use sed, grep or whatever linux script to find out what integer is there in front of the line that starts with "number"? Thanks... ...

Troubleshooting SIGTERMs with tee on a cluster within SGE jobs

I have some legacy scientific code running on a Rocks cluster, with SGE. I have an application-specific job submission script that generates qsub scripts (i.e. the script which Sun Grid Engine takes and runs). Within the qsub script, my legacy app is called. This app sends it's output to STDOUT. SGE intercepts STDOUT and spools it into ...

Getting exception of org.dom4j.DocumentException : feature read only while deploying war file in tomcat of linux

Hello All... I have working copy of war file which is working fine in windows.. Now when i am deploying that war file into linux + tomcat, it's giving me following stacktrace : 2009-11-23 17:06:08,675 INFO (org.springframework.jdbc.datasource.DriverManagerDataSource:153) - Loaded JDBC driver: com.mysql.jdbc.Driver 2009-11-23 17:06:08...

Is there any standard way to load parameters from a file in C++ on Linux?

Imaging that a program needs to know quite a lot of parameters to do its tasks properly, such as 'Port = 2323' this kind of things. now I want to save these parameters in a plain text file, similar to Unix' system variables such as users and groups. Is there any standard way/libraries that can help me to do this? Does anyone ever used ...

Serving PNG images over http to Three20 iPhone app

I'm trying to serve up png images from a Linux (c++ / Qt4.5.x) server daemon to an iPhone application that is using the Three20 framework - specifically I want to use the TTThumbsViewController view. I managed to make any web browser view images with the following returned in my daemon when it "GET"s a request: QTextStream os(socket); ...

how to monitor the syslog(printk) in a LKM

deal all, i am a newbie for writing Linux Kernel Module. i used printk function in linux kernel source code (2.4.29) for debugging and display messages. now, i have to read all the messages i added via httpd. i tried to write the messages into a file instead of printk function, so i can read the file directly. but it's not work ver...

Determining cache misses for various filesystems

Hello, I've got a project for school where I have to find out how many cache misses a filesystem will have under heavy and light loads and on a multiple processor machine. After discussing this with my professor, I came up with a basic plan of execution: Create a program which will bog down the filesystem and fill up the buffer cache. ...