I have mysql/php script running on my linux machine. Its basically migrating files content to MySql table. there are about 4400,000 Files, Account files each file`s content is places in a table in one row. It have been 14 hours and so far it have only done 300,000 Accounts. At first it was very fast and was d…
Why does ksh fail to capture standard error during nested command substitutions?
I have the following shell script. It produces the following output in bash, zsh, dash and posh. It makes sense because there is no such command called bogus on the system. But in ksh on Debian, it does not print the error message due to invoking the bogus command. What went wrong? In case, you want to know a…
scp .tar file from remote machine using C program & libssh
I have written a code which read file from remote device using libssh scp APIs. I have a specific requirement wherein I want to scp a .tar file from a remote device. I am able to read .tar content into a buffer, but I am not sure how to create .tar file out of that buffer. Any help would be
Decrease in Random read IOPs on NVME SSD if requests issued over small region
(TL;DR) On NVME SSDs (Intel p3600 as well as Avant), I am seeing decrease in the IOPS if I issue random reads over a small subset of the disk instead of the entire disk. While reading the same offset over and over, the IOPS are about 36-40K for 4k blocksize. The IOPS gradually increase as I grow the region ov…
ssh -X oracle is not working properly
I run the following command to switch to oracle user on linux. This is suppose to set environmental variable DISPLAY. I ran xclock command but it throws the following error How should i set environmental variable DISPLAY correctly to run GUI application? Answer You may have logged in as Oracle with -l option,…
cronjob does not execute a script that works fine standalone
I have my php script file in /var/www/html/dbsync/index.php. When cd /var/www/html/dbsync/ and run php index.php it works perfectly. I want to call PHP file through sh file, the location of SH file is as below This is the content of the dbsync.sh file is: When I cd /var/www/html/dbsync/ and run ./dbsync.sh it…
How to group by two fields using bash scripting?
Here is one example of one line of log: I know how to group by one filed, so this is the solution: and this would be results: My question is that how can I group by two fields instead of one, first should be $11 and second is $10? So results should change to: Answer how can I group by
Use XAMPP-phpmyadmin database of windows in Linux XAMPP
I was on windows and using XAMPP(installed somewhere else than C:/ ) Now i have moved on to LINUX and installed LAMPP. So, i have this XAMPP folder from windows and i copied the project files from htdocs and now i need the database which i didn’t exported while i was on windows. I tried to copy the phpm…
POSIX timer hangs up after a few runs
I have created a POSIX timer in the main function of my program. Each thread of the main program is setting the timer so that on expiry of it, the signal handler update one variable which awakes the next thread of the same process. The timer is working fine most of the time but not always. It sometimes comple…
Unable to stop apache using system version of python 2.7.6 instead of virtualenv version
I have recompiled python2.7.11 using: I have installed django and all the dependencies checking that the pip is located in my new python version I uninstalled the packaged version of mod_wsgi and I have linked mod_wsgi to the new version of python by: When I restart apache both 2.7.6 and 2.7.11 seem to be sta…