I’m on a fresh Virtualbox install of CentOS 6.4. After installing zsh 5.0.2 from source using ./configure –prefix=/usr && make && make install and setting it as the shell with chsh -s /usr/bin/zsh, everything is good. Then some time after, after installing python it seems, it start…
Tag: linux
SIGPROF kills my server when using google perftools
I have a multithreaded server process, written in C/C++ that I am trying to profile with Google perftools. However when I run the process with perftools, pretty soon my server stops with a “syscall interrupted” error, that I think is being caused by the incoming SIGPROF. (The actual system call th…
how to include a file containing variables in a shell script
i have many script shell and i want to include a file containing variables in this shell script? My var script: My script sh: Thx. Answer It depends which shell, but one of these two usually works: or I’m not sure about ksh, but I’d imagine both would work.
qt5: why 2 processes and memory usage?
I uses 64 linux with fresh install of qt 5.1.0. I take example application qtbase/examples/widgets/widgets/lineedits and run, let’s call it qt5_lineedit, also I take the similar app from qt4 sources build it with qt4 library and run. And in htop I see that, there are two qt5_lineedit (I run only one, so…
ioctl fails when trying to get more than 8 queue file descriptor from a tun interface
After I heared that after kernel 3.8 linux added multi queue ability to tun tap device with flag IFF_MULTI_QUEUE, I upgraded my kernel to 3.10 and have its header in /usr/src then I altered my c code to have a thread to open a new queue file descriptor each time neaded. but the thread could just open 8 queue …
Run “screen -S name ./script” command on @reboot using crontab
I’ve tried adding this to my crontab: @reboot /root/startup The “startup” file: Now svnserve commands run fine. The problem is with the screen command. log1 and log2 files have the same content which is: Must be connected to a terminal. What I’m trying to do is start the 2 executables …
Counter increase in child & parent with fork()
I’ve a problem with this little program: I increase the counter in the child but in the parent the counter not increase… why? Thank you everyone Answer That’s because after fork, parent process and child process are different processes, and they each have their own copy of the variable count…
calculate total used disk space by files older than 180 days using find
I am trying to find the total disk space used by files older than 180 days in a particular directory. This is what I’m using: but the above is quiet evidently giving me disk space used by every file that is found. I want only the total added disk space used by the files. Can this be done using find
Redirect the webservice call to http://[remote server ip]:7777 to http://[local machine ip]:8888
I have a webservice running on a remote machine available to me through ssh tunneling. Therefore I will be able to access the webservice through http://[local machine ip]:8888. But the problem here is, My source code trying to access the webservice through the public ip (http://[remote server ip]:7777). So I …
getting current directory in linux for argument
I’m learning Linux scripting and trying to set up a function that finds all files in the current directory. I know I could use ls but I’m wondering if there is a way to get the current directory as a command and pass it to an argument. This just prints out pwd:, which obviously isn’t it. Ans…