Skip to topic | Skip to bottom
Home
Main
Main.CodeRepositoryServerStatsr1.4 - 10 Feb 2006 - 14:28 - JeremyCothrantopic end

Start of topic | Skip to actions
Redeveloped some initial scripts authored by Peter Bense with the following bits of shell and perl code to get a better idea of the load on our server and when things might need more immediate attention.

A sample of the server statistics this code produces can be seen at
http://nautilus.baruch.sc.edu/stats/vmstats.php

Charlton Purvis created another nice layout of some of the above graphs at
http://nautilus.baruch.sc.edu/~cpurvis/stats

Generally the process is to use the 'vmstat' command to produce an ongoing log which we periodically check(currently every 10 minutes) to produce more graphics or email alerts. We also append to a log file every 10 minutes the top 20 CPU consuming processes.

The files are attached below and a zip of all the files is server_stat.zip

From the readme.txt file:

The listed 'cron.txt' shows the cron job which runs the various shell commands.

vmstat.sh starts a new vmstat log at the beginning of each day, and graphs the results ( vmstatgnuplot.pl ) at days end.
vmstat10min.sh calls vm_10_min.pl which checks the past 10 minutes of log for conditions which warrant an email notification
vmstat60min.sh calls vm_60_min.pl which graphs CPU wait for the past hour

vm_x_min_plot.pl is run directly from the command line to create graphs for the past x observations

graphVM.lib is the gnuplot script for producing the graphs
vmstats.html is the html page with references to the associated images and logs.

Other notes:

  • The graphing utility used for this is 'gnuplot' http://www.gnuplot.info
  • The code also assumes a subdirectory called 'vmstatgraphs' where the produced images are stored.
  • The 'iostat' and 'mpstat' commands could be run similarly for other statistics.
  • A small cleanup script could be set to delete old files or trim file logs.

-- JeremyCothran - 31 Mar 2005
to top

I Attachment Action Size Date Who Comment
cron.txt manage 0.3 K 31 Mar 2005 - 15:30 JeremyCothran NA
vmstat.sh manage 0.1 K 31 Mar 2005 - 15:30 JeremyCothran NA
vmstat10min.sh manage 0.2 K 31 Mar 2005 - 15:31 JeremyCothran NA
vmstat60min.sh manage 0.1 K 31 Mar 2005 - 15:31 JeremyCothran NA
vm_10_min.pl.txt manage 2.4 K 31 Mar 2005 - 15:32 JeremyCothran NA
vm_60_min.pl.txt manage 1.0 K 31 Mar 2005 - 15:32 JeremyCothran NA
vm_x_min_plot.pl.txt manage 2.3 K 31 Mar 2005 - 15:32 JeremyCothran NA
graphVM.lib manage 0.6 K 31 Mar 2005 - 15:32 JeremyCothran NA
vmstats.html manage 1.7 K 31 Mar 2005 - 15:33 JeremyCothran NA
server_stat.zip manage 5.7 K 31 Mar 2005 - 16:07 JeremyCothran NA

You are here: Main > CodeRepositoryServerStats

to top

Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding DMCC? Send feedback