Skip to content

How to set the path to the tags file?

I’ve tried to set the path to my project’s ctags file each time when I close the *.c file and go to terminal. I want the tags file to have been set when I open my code file. Or, maybe … can I set the tags file only for special directory? Answer Usually the path of the ctags file is

modify the kernel version information in the menuconfig

I downloaded the kernel source and by typing the following command I can see the linux kernel version is 3.02.02 for example. However, due to some reasons, I have to change it to say… 3.01.01-12-generic I found the appending option in the menuconfig but this does not meet my need. Please let me know if …

How to find whether a given address is in heap or in stack

I have a requirement to find whether a given address is in heap or in stack. Is there a reliable way to do this in Linux? I have thought about the following approach assuming that the stack will grow downward and heap will grow up towards stack. How reliable is this solution? We don’t use gcc split-stac…

Sum bytes from iptables list output

Print num-bytes allowed. My best attempt as been This will give me a large list of rules, including the number of bytes in the second column. Unfortunately, getting just that 2nd column is pretty difficult. One option would be to pipe it into a file, and use cut on the file but the goal is to do it in as

mpirun: Unrecognized argument mca

I have a c++ solver which I need to run in parallel using the following command: This command will run my_exec independently on the 16 processors available on my node. This used to work perfectly. Last week, the HPC department performed an OS upgrade and now, when launching the same command, I get two warning…

Socket buffer size not increasing

Output is – Current socket buff len = 41600 setsock opt success After setting socket buff len = 41600. Looks like receive buffer size is not increasing, any idea why this happens? Thanks in advance! Answer If the kernel is of newer version (2.6.17 or higher), checkout whether autotuning is enabled by ve…

Redirecting stdout and stderr to a file in c++

I am trying to redirect stdout and stderr to a log file. This is what i am doing. But still i am missing out some of the logs. I came to know that when i executed my application commenting out these lines of code. I am dubious about this code snippet. Please provide your feedback on this. Answer first close