October 2013

#!/bin/bash echo “=====================”; echo ” Apache Total Memory Utilization” echo “=====================”; TAPACHE=`ps -ylC apache2 | awk ‘{x += $8;y += 1} END {print x/1024;}’` echo “$TAPACHE”; echo “=====================”; echo “Apache Memory Usage by each process:” echo “=====================”; APACHEMEM=`ps -ylC apache2 | awk ‘{x += $8;y …

This shell script calculate Apache Max client. #!/bin/bash echo “=====================”; echo ” Apache Total Memory Utilization” echo “=====================”; TAPACHE=`ps -ylC httpd | awk ‘{x += $8;y += 1} END {print x/1024;}’` echo “$TAPACHE”; echo “=====================”; echo “Apache Memory Usage by each process:” echo “=====================”; APACHEMEM=`ps …

How to debug a shell script To debug shell script you can use -x option from command line: # bash -x script-name OR #bash -xv script-name Example: sh -x example.sh sh -x test.sh You can use -x option with shebang line and can run entire …

Types of mysql replication and how mysql replication works Types of mysql replication: Replication works based on events written to the binary log are read from master and then processed on the slave.           Statement Based Replication: A replication which is based on propagation …

How To Repair MySQL(Master Slave) Replication   If Mysql replication is not working and we are getting very strange error. Here is solution to repair mysql replication.   Error: To fix above error run below mysql queries:   mysql> STOP SLAVE;   It simply tell …

  How to Setup Mysql Master Slave Replication on Centos and Redhat   Here we will see how to setup Mysql Database Replication. Mysql replication is very useful in terms of fail over solution   Advantages: Hot Stand by Node for Fail Over Can be …