I am using the following in a bash script: command >> /var/log/somelog.log 2>&1& The reason I’m doing this is because I want to capture all output in /var/log/somelog.log. This works fine. However it does not wait until the command has finished. So that brings me to the question, how ca…
How to implement a process overseeing another process?
Currently at my workplace I have a script named “batch launcher” (written in bash), which is supposed to oversee the execution of batches, logging their output and processing the return code of the batch. This is currently done via env call within this “batch launcher”: Several days ag…
Valgrind does not work with WSL?
When I installed WSL for my computer I was very excited to have a more natively supported Linux system rather than using VirtualBox. However I get this error when I try to run it. Is there a reason why? I am happy to give more information as required. Answer It’s definitely possible I’ve encounter…
Track down high CPU load average
Trying to understand what’s going on with my server. It’s a 2 cpu server, so: While on load avergae, queue is showing ~8 : So You can assume, load is really high and things are pailing up, there is some load on the system and it’s not just a spike. However, Looking at top cpu consumers: Resu…
How to properly set up ALSA device
Edit: This question is different than the proposed duplicate because I’m asking How do you set the period/buffer size that will work with multiple targets each with different sound hardware?. I have created some code that attempts to set up ALSA before playback of an OGG file. The code below works on on…
batch extracting data from files, naming new files according to string in input file
With Linux I want to automatically extract data from .dat files and name the new files according to a string in the input files: I have 300 .dat files with a data structure as follows: . . . DE name1, contig1 . . SQ information1 // . . DE name1, contig2 . . SQ information2 // . where the “.”
Cron every minute to trigger url via CURL
I want to set a CRON task to trigger an URL every minutes (via CURL). That seems pretty simple, I searched and wrote this : I added that to the crontab -e and saved. But it seems that the url is not triggered. Don’t understand why, everything seems correct? Can you help me please? Thx. Answer Your cron …
uninterrupted execution of Cpp Linux code
Hi is there a method on which I can make my code safe from other OS interrupts etc in Linux GNU? For example if I have the code below and I need to find the exact execution time without other things interrupting my code. I have already looked into pthread_mutex_lock(&cs_mutex); but wasn’t able to st…
Java1.5 ExitOnOutOfMemory?
I am having a problem making my java instance recognize command line CrashOnOutOfMemoryError or ExitOnOutOfMemoryError any ideas to get the supported command line that will do the required feature Regards, Answer Unless you’re using Java 1.8 (specifically, 1.8u92 or newer), these command-line options ar…
How to modify the source of Buildroot packages for package development?
I’ve been using buildroot in order to build a toolchain using uclibc. Now, buildroot downloads all the packages, extract them and build them all.. I want to change the toolchain’s uclibc source and then recompile the toolchain with the new source and i just can’t understand how it can be don…