My goal is to profile the execution time of each function in a kernel module. Using the sample scripts I saw online, I came up with the following script to fulfill my need. But occasionally I get negative values for calculated latencies. Although, they happen rarely but I guess that indicates something is wro…
Tag: linux
Is there a bug in “zgrep -H”?
Just tried grep and zgrep on following test file: I also need the file-name printed, so I’ve added the -H switch and stepped on the following problem: E.g. depending on POSITION of -H switch in the command-line – the behavior is different for me and the issue always reproduces 🙁 One more test: Her…
Configure saucelabs for jenkins
I am trying to run my protractor tests on my Jenkins server which happens to be a Linux box (Red Hat Enterprise Linux Server release 6.6) which has no browser. So i did some research and realized I would have to use saucelabs. I do have saucelab account. So i was confused on how to edit my conf.js file and
Linux ubuntu how to stop cron status mails like “Cron /usr/bin/php /var/www/myproject”
Since couple of days i’m getting unwanted cron status emails from my server. Tried MAILTO=”” but still receiving mails. Please help me to get rid of this emails. Thanks in advance. Answer cron will email you anything that appears on stdout, so redirect stdout to /dev/null in your crontab ent…
Trigger CURL Request after boot using systemd
I’m trying to create a service that will trigger every time a raspberry pi boots. Currently the service runs a really simple script that sends a POST request to a web service endpoint I control. I can trigger said script manually and that part all works perfectly. I’m struggling with the next step…
linux rename multiple files using rename
I have a bunch of files (several thousand) called: output.temp.1.csv output.temp.2.csv output.temp.3.csv etc. I would like them all to be renamed but having the .temp removed output.1.csv output.2.csv output.3.csv etc. I think rename is what i need but not sure how to go about doing it I tried: rename ‘…
Executing an external program when forking is not advisable
I have this a big server software that can hog 4-8GB of memory. This makes fork-exec cumbersome, as the fork itself can take significant time, plus the default behavior seems to be that fork will fail unless there is enough memory for a copy of the entire resident memory. Since this is starting to show as the…
.htaccess RewriteRule keeping URL structure
My current rewrite rule: The result above works great so I can format the URL like domain.com/a/b/c I would like to add in a domain switch as well so the results I want is sub.domain.com/a/b/c when you access it using domain.com/a/b/c Currently here is what I have tried But the result of this is http://sub.do…
ip route add by specifying source address in the same network
I have 4 pc´s and another pc, call it proxy, all being in the same network: 172.16.96.0/20 . I can ping between each other. But, I want to separate them into 2. That is: pc1 is directly connected to pc2 pc3 is directly connected to pc4 But, all traffic from pc1 or pc2 to pc3 or pc4 has to go
Empty string as a output field seperator for Cut
How can I use cut with –output-delimiter=””? I want to join two columns using cut. I tried the following command. However cat -v shows that there are non printable characters. Specifically “^@”. Any suggestions to how can I overcome this? This is the content of my file 011,IBM,Pa…