Archive for the ‘Bash Script’ Category

Nagios script to monitor memory uses

Thursday, June 24th, 2010

#!/bin/bash   #Version 1.0 ####################################### #Nagios scrept to check memory status## #Commands : free -m##################### #######################################     #Status check for nagios script   STATE_OK=0 STATE_WARNING=1 STATE_CRITICAL=2 STATE_UNKNOWN=3 STATE_DEPENDENT=4     #Define All the variables for commands   declare -rx SCRIPT=${0##*/} declare -rx CMD_AWK="/bin/awk" declare -rx CMD_CAT="/bin/cat" declare -rx CMD_FREE="/usr/bin/free" #####Section 1.1 :D efinning function for [...]

nagios script to check dns servers status

Monday, June 7th, 2010

#!/bin/bash ################################### #Purpose:################################################################ ###(a) Monitor if all your name server is online: Status :D one #### ###(b) Monitor if all name server has same zone record : Staus : Ongoing## ###(c) Monitor the Response time of Dns server : Status : Ongoing# #########################################################################   #Status check variables for nagios script##### ##################################### STATE_OK=0 STATE_WARNING=1 STATE_CRITICAL=2 STATE_UNKNOWN=3 STATE_DEPENDENT=4 [...]

Nagios script to monitor memory uses

Friday, April 23rd, 2010

Purpose: ########################################### Develop a nagios script, which will monitor Linux memory uses. ########################################### This script will check following : ############################################# #1.If free memory is more then the defined memory as free: Status Done #2.If System is using swap memory : Status:Done ############################################## #!/bin/bash   #Version 1.0 ####################################### #Nagios scrept to check memory status## #Commands : [...]

nagios script for checking mysql server replication status between 4 servers

Monday, February 22nd, 2010

Ref : http://onlamp.com/pub/a/onlamp/2006/04/20/advanced-mysql-replication.html?page=2 Date:22/02/2010 This Script is still under development. Purpose: Develop a nagios script, which would be able to check replication status between 4 Master/Master Server. This scripy will check following : #1.Each Mysql servers are online : Stats: Done #2.If Slave process is running : Status:Done #3.If Slave IO process is running : [...]

Bash script to check for automatic yum updates

Thursday, August 27th, 2009

#!/bin/bash ######################################## # This script will check for available package- # update for Centos/Redhat 5 sytem # Written by : Fosiul Alam # Version :1.0 # Created Date : 27/08/2009 # Last Modification : 27/08/2009 #########################################   ######################################## # Command use : yum -e0 -d0 check-update # Usage : /yum-script.sh ########################################   _GET_HOSTNAME=`hostname` _TODAY=`date ‘+%A’` [...]