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…
Tag: linux
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 …
pthread_detach() causes SIGSEGV on 64 bit Linux
Here is a description of my situation: I have to take care of the bug in our product. The thread is created as joinable , it must do its work, terminate and nobody will call pthread_join() for it. So the thread is created with JOINABLE attribute (by default) and before termination it calls the next code: It w…
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…
How to find which line is missing in another file
on Linux box I have one file as below A.txt Second file as below B.txt I want to know what is inside A.txt but not in B.txt i.e. it should print value 4 I want to do that on Linux. Answer didn’t test, give it a try
HBase does not run after ./start-hbase.sh – Permission Denied?
I want to run HBase. I have installed hadoop completely and when I run start-all.sh , it works fine and gives me this output: But when I want to run start-hbase.sh , it gives me some errors of permission denied which I do not understand why: after that, I tried to run sudo ./start-hbase.sh , and I got somethi…
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 …