Category Archives: Bash

How to free PHP-fpm Memory at Server

  Often when you are running PHP with any web server (Apache or Nginx), the FastCGI process manager eats up a lot of your RAM, by forking multiple subprocesses for every request, which in turn leads to memory leakage. To avert this, it is desirable to schedule a shell script and reduce this memory leakage. Save the below command as

Read more

Source – UNIX, Destination – Windows Cygwin (SSH Password-less Authentication)

On Windows Server In windows cygwin create user, say MyUser, locally and also create user in cygwin cd C:\cygwin Cygwin.bat   Administrator@MYWINDOWSHOST ~ $ /bin/mkpasswd -l -u MyUser >>/etc/passwd MyUser@MYWINDOWSHOST ~ $ ls MyUser@MYWINDOWSHOST ~ $ ls -al total 24 drwxr-xr-x+ 1 MyUser        None    0 Mar 17 12:54 . drwxrwxrwt+ 1 Administrator None    0 Mar 17 12:54 .. -rwxr-xr-x  1

Read more

Hack #1 -> Define CD Base Directory Using CDPATH

If you are frequently performing cd to subdirectories of a specific parent directory, you can set the CDPATH to the parent directory and perform cd to the subdirectories without giving the parent directory path as explained below. # pwd /home/ramesh # cd mail -bash: cd: mail: No such file or directory [Note: The above cd is looking for mail directory

Read more

MySQL – Enterprise – Installation – Linux

Phase #1 –  PreRequisites MAKE SURE A MOUNT POINT /MySql IS CREATED BEFORE RUNNING THIS SCRIPT………………………… Creating the symbolic soft link for parallel database updations ln -s /data /MySql/mysqldb ln -s /data /MySql/mysql_db Soft Links Created. User and Group Adding. groupadd -g27 mysql echo ‘System Group mysql created with GID 27.’ useradd -m -d /var/lib/mysql -g mysql -G mysql -p

Read more

Process Affinity – Linux

Contents 1. Introduction 2. Types of Thread Scheduling 2.1. Compact Scheduling 2.2. Round-Robin Scheduling 2.3. Stupid Scheduling 3. Defining Affinity 3.1. The Linux-Portable Way (taskset) 3.2. The Other Linux-Portable Way (numactl) 3.3. Using OpenMP Runtime Extensions 3.4. getfreesocket 1. Introduction Although a compute node or workstation may appear to have 16 cores and 64 GB of DRAM, these resources are

Read more