PIKT

Samples: Disk Capacity Limits

PIKT Logo
Home FAQ News Intro Samples Tutorial Reference Software Authors Licensing SiteSearch


In this diskcaps_objects.cfg example, we specify disk capacity limits, which when exceeded might trigger alert messages, and possibly also automatic disk cleanups.
///////////////////////////////////////////////////////////////////////////////
//
// diskcaps_objects.cfg
//
///////////////////////////////////////////////////////////////////////////////

DiskCaps

// since actual disk capacity can never exceed 100% (well, maybe it can,
// depending on the minfree and how your df displays >100% capacity
// situations), 999% below effectively says never to report at the given
// alert level (i.e., just ignore at that level)

//      mount                   : emrg : urgt : crit : warn : notc : exec

///////////////////////////////////////////////////////////////////////////////

#if ! hamburg
        /                       : 100% :  95% :  90% :  75% : 999% :
                                  =mv /core /tmp 2>/dev/null
#else
        /                       : 100% : 999% : 999% : 999% : 999% :
                                  =mv /core /tmp 2>/dev/null
#endif
        /var                    : 100% :  95% :  90% :  75% : 999% :
                                  =cleartmp(/var/tmp, 1)
        /usr                    : 999% : 999% : 100% :  95% : 999% :
                                  =cleartmp(/usr/tmp, 1)

        /opt                    : 999% : 999% : 100% :  95% : 999% :
                                  =cleartmp(/opt/tmp, 1)

        /export/home            : 999% : 999% : 100% :  95% : 999% :
                                  =clearuserdisk(/export/home, 1)

///////////////////////////////////////////////////////////////////////////////

#if mailserver
        =maildir                : 100% :  95% :  90% :  75% :  50% : 
#else
        =maildir                : 999% : 100% :  95% :  90% :  75% : 
#endif

#if berlin | linux
        /usr/local              : 999% : 999% : 100% :  95% :  90% : 
        /opt/local              : 999% : 999% : 100% :  95% :  90% : 
#endif

#if berlin2
        /usr/local2             : 999% : 999% : 100% :  90% :  75% : 
        /opt/local2             : 999% : 999% : 100% :  90% :  75% : 
#endif

#if athens2 | athens4
        /ckp                    : 999% : 100% :  95% :  75% : 999% : 
        /ckp2                   : 999% : 100% :  95% :  75% : 999% : 
        /ckp3                   : 999% : 100% :  95% :  75% : 999% : 
        /data/data0             : 100% :  95% :  90% :  75% :  50% : 
        /data/data1             : 100% :  95% :  90% :  75% :  50% : 
        /data/data2             : 100% :  95% :  90% :  75% :  50% : 
        /ii_work                : 100% :  95% :  90% :  75% :  50% : 
        /data                   : 100% :  95% :  90% :  75% :  50% : 
#endif

#if milan
        /egbdf                  : 100% :  95% :  90% :  75% :  50% : 
        /egbdfdata              : 100% :  95% :  90% :  75% :  50% : 
#endif

#if warsaw
        /opt/ns-home            : 100% :  95% :  90% :  75% :  50% : 
        /opt/web                : 100% :  95% :  90% :  75% :  50% : 
        /opt/ns-home/suitespot  : 999% : 999% : 999% : 100% :  90% : 
        /opt/ns-home/logs       : 100% :  95% :  90% :  75% :  50% : 
        /opt/ns-home/logs2      : 999% : 999% : 999% : 100% :  75% : 
#endif

#if moscow
        /opt/mailman_disk_1     : 100% :  95% :  90% :  75% :  50% : 
#endif

#if calais
        /amanda/disk1           : 999% : 999% : 999% : 100% :  75% : 
        /amanda/disk2           : 999% : 999% : 100% :  90% :  75% : 
#endif

///////////////////////////////////////////////////////////////////////////////

// mus user data disks

// need to list mus0-bak disks

#if kiev2
        /pub/mus_disk_5         : 999% : 999% : 999% : 999% : 100% : 
        /pub/mus_disk_6         : 999% : 999% : 999% : 999% : 100% : 
#endif

///////////////////////////////////////////////////////////////////////////////

// user data disks for all other machines are covered by the default below

///////////////////////////////////////////////////////////////////////////////

        DEFAULT                 : 999% : 999% : 999% : 100% :  90% :

///////////////////////////////////////////////////////////////////////////////
On the piktmaster system, we would install the DiskCaps.obj file to each PIKT slave system with, for example:
# piktc -iv +O DiskCaps +H all        [or: ... -H downsys]

[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.

Computer Books at Amazon.com

UNIX CD Bookshelf
UNIX CD Bookshelf

Red Hat Linux Administration: A Beginner's Guide
Red Hat Linux Administration: A Beginner's Guide

Linux Server Hacks
Linux Server Hacks

SUSE Linux 9 Bible
SUSE Linux 9 Bible

Beginning SuSE Linux: From Novice To Professional
Beginning SuSE Linux: From Novice To Professional