This sample downsys_programs.cfg defines a simple Perl script to report down systems. Note that this is only installed on the piktmaster.
///////////////////////////////////////////////////////////////////////////////
//
// downsys_programs.cfg
//
///////////////////////////////////////////////////////////////////////////////
#if piktmaster
downsys.pl // list all down systems
#!=perl
# downsys.pl -- list all down systems
die "Usage: downsys.pl <secs timeout>\n" if ($#ARGV != 0) ;
foreach $sys (`=piktc -L +H all`) {
chomp $sys ;
next if (`=maxtime $ARGV[0] =ping $sys` =~ /is alive/) ;
print "$sys\n" ;
}
#endif
///////////////////////////////////////////////////////////////////////////////
On the piktmaster system, we would install the downsys.pl script to itself with the command:
# piktc -iv +P downsys.pl +H piktmaster
[For more examples, see Samples.]
Home |
FAQ |
News |
Intro |
Samples |
Tutorial |
Reference |
Software |
Authors |
Licensing |
SiteSearch
Links |
SiteIndex |
Pikt-Users |
Pikt-Workers |
Contribute |
ContactUs |
Top of Page
Page best viewed at 1024x768.
Page last updated 2005-06-22.
This site is
PIKT®
powered.
PIKT® is a registered trademark of the University of Chicago.
Copyright © 1998-2005 Robert Osterlund. All rights reserved.
|