Skip to content

Tag: linux

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…

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…

Print a certain line in linux or options for nslookup

I’m very new to linux and bash. I’m trying to find a domain name for an ip address. When I use nslookup I have a bunch of lines like this Output I only want to print www.computerhope.com in the second line. How do I do this? Also I tried to use host command as well. It looks cleaner. How do

PHP pthreads failing when run from cron

Ok, so lets start slow… I have a pthreads script running and working for me, tested and working 100% of the time when I run it manually from the command line via ssh. The script is as follows with the main thread process code adjusted to simulate random process’ run time. So while the above script…