Skip to content

Tag: linux

Program output changes when piped

I have a simple C program to time process startup (I’d rather not post the full code as it’s an active school assignment). My main function looks like this: sample_time() is a function that times how long it takes to fork a new process and returns the result in seconds as a double. The part of sam…

objdump -t /usr/bin/sort command shows no symbols

If I try objdump -t /usr/bin/sort command it says no symbols. But it seems to work on my programs. What is the reason for this? Answer The symbols of /usr/bin/sort has been removed, e.g. with the strip program – for most executables the symbol table is not needed (or only needed for debugging). Here is …

shm_open and ftruncate() in Shared Memory Programming

I want to create a Shared Memory Object and truncate it to a specific size. SHMSIZE is defined with 512 MODE is set with S_IRUSR | S_IWUSR | S_IWGRP | S_IRGRP | S_IWOTH | S_IROTH Here is my Code While Debugging i watched that the return value of shm_open() is 0 every time, but i can see this object in

How to undo rm -rf? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …

Debian test if load average shows real value

How can I test that my kernel is showing the correct load average ? The load is always high on this server, and I doubt it’s the real one. I use kernel 3.2.0 and Debian version 7.3 Answer If you are planning get more info directly from kernel, then it’s better to look at /proc/sched_debug (this re…

Installing ‘lxml’ in Amazon EC2

I am having trouble installing lxml in Amazon EC2. I am having a Linux instance. I entered the following command. Right now, it is not working. It just generate the following error. What is wrong here? How can I install this? Update I used pip install –upgrade setuptools. Now I am getting the below. Ans…

Start a process on a specific core/CPU? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …