In this example, we report worrisome inode shortages.
The DiskInodeWarning script might send an alert message like the following:
-------------------------------------------------------------------------------
PIKT ALERT
Thu Jan 14 12:21:07 2002
paris7
WARNING:
DiskInodeWarning
Report worrisome inode shortages
Filesystem /usr on /dev/dsk/c0t2d0s5 has used 96% of inodes,
54892 inodes left
-------------------------------------------------------------------------------
The script follows.
///////////////////////////////////////////////////////////////////////////////
//
// disks_alarms.cfg
//
///////////////////////////////////////////////////////////////////////////////
[other alarms omitted...]
///////////////////////////////////////////////////////////////////////////////
DiskInodeWarning
init
status active
level warning
task "Report worrisome inode shortages"
input proc "=dfi | =behead(1) | =grep '^/'"
=dffilter
=dfidata
keys $fsname
rule
if #used >= 90%
&& =increased(used, 90%, 0%)
output mail "Filesystem $mount on $fsname has used
$text(#used*100,0)% of inodes,
$text(#free) inodes left"
endif
///////////////////////////////////////////////////////////////////////////////
[other alarms omitted...]
///////////////////////////////////////////////////////////////////////////////
This is just one program example. You could add rules, or write new scripts, for example to: report hardware failures, report network cross-mounted disks going off-line, report problems with the RAID setup, clear /tmp files, log I/O stats, etc.
[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.
|