Skip to topic | Skip to bottom
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

Charlton Purvis created another nice layout of some of the above graphs at

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

From the readme.txt file:

The listed 'cron.txt' shows the cron job which runs the various shell commands. starts a new vmstat log at the beginning of each day, and graphs the results ( ) at days end. calls which checks the past 10 minutes of log for conditions which warrant an email notification calls which graphs CPU wait for the past hour 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'
  • 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 manage 0.1 K 31 Mar 2005 - 15:30 JeremyCothran NA manage 0.2 K 31 Mar 2005 - 15:31 JeremyCothran NA manage 0.1 K 31 Mar 2005 - 15:31 JeremyCothran NA manage 2.4 K 31 Mar 2005 - 15:32 JeremyCothran NA manage 1.0 K 31 Mar 2005 - 15:32 JeremyCothran NA 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 manage 5.7 K 31 Mar 2005 - 16:07 JeremyCothran NA

You are here: Main > CodeRepositoryServerStats

to top

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