On Sat, Jun 26, 2010 at 11:08 AM, Jay thali <[email protected]> wrote:
> > > Hi Gourav, > I am not able to find the script.Kindly check > > Regards > Jayendra Thali > > > On Fri, Jun 25, 2010 at 12:51 PM, > [email protected]<gouravjoshi%40gouravjoshi.co.in>< > [email protected] <gouravjoshi%40gmail.com>> wrote: > > > > > > > Dear All, > > > > I want you to check out "Check utilisation of server script" on Linux > > Questions, Help, Howtos and Tutorials. To view it, please click this > link: > > > > http://linuxquestions.in/index.php?topic=15.0 > > > > > > Thanks, > > gouravjoshi > > > > [Non-text portions of this message have been removed] > > > > > > > > [Non-text portions of this message have been removed] > > > Hi, PLease find the script ===================================== #!/bin/bash ############################################################################################# # Author = Gourav Joshi # # Date = 14-July-2009 # # Aim = To check Load, Number of SMTP Connections, Number of POP Connections, Free Memory # # Report Location = /tmp/utilisationreport # ############################################################################################# ################ Do not edit below this line ##################################### while [ 0 ] do # Setting Variables date=`date | awk '{print $3"-"$2"-"$6}'` #uptime=`uptime | awk '{print $8, $9,"=", $10,$11,$12}'` tim=`date | awk '{print $4}'` echo "====================================================================================" >> /tmp/utilisationreport #w |grep load |awk '{print $6,$7,$8,$9,$10 }' >> /tmp/utilisationreport echo "System Load" >> /tmp/utilisationreport echo "Date = $date" >> /tmp/utilisationreport echo "Time = $tim" >> /tmp/utilisationreport #uptime | awk '{print $6, $7,"=", $8,$9,$10}' >> /tmp/utilisationreport uptime | sed -e 's/^.*s,. //' >> /tmp/utilisationreport echo "====================================================================================" >> /tmp/utilisationreport echo "Memory Details" >> /tmp/utilisationreport free -m >> /tmp/utilisationreport echo "====================================================================================" >> /tmp/utilisationreport pop=`ps ax |grep pop | grep -v grep | wc -l` >> /tmp/utilisationreport echo "POP Connections = $pop" >> /tmp/utilisationreport #sleep 2 echo "====================================================================================" >> /tmp/utilisationreport smtp=`ps ax |grep smtp | grep -v grep | wc -l` >> /tmp/utilisationreport echo "SMTP Connections = $smtp" >> /tmp/utilisationreport echo "====================================================================================" >> /tmp/utilisationreport imap=`ps ax |grep imap | grep -v grep | wc -l` >> /tmp/utilisationreport echo "IMAP Connections = $imap" >> /tmp/utilisationreport #echo "===================================================================================" >> /tmp/utilisationreport # Uncomment if iostat is available on your server #iostat -x >> /tmp/utilisationreport echo "=============================Completed the Script Sucessfully=======================" >> /tmp/utilisationreport sleep 2 echo "" >> /tmp/utilisationreport echo "" >> /tmp/utilisationreport #echo "===================================================================================" >> /tmp/utilisationreport done ===================================== -- Ashwin Muni http://www.linuxmaza.com Linux Tutorials and Howtos [Non-text portions of this message have been removed]
