Disk Capacity Limits

In this diskcaps_objects.cfg example, we specify disk capacity limits, which when exceeded might trigger alert messages, and possibly also automatic disk cleanups.  This objects file might be referenced by a Pikt script such as DiskCap.

///////////////////////////////////////////////////////////////////////////////
//
// 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 down]

Open Hand For more examples, see Samples.

 
Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2008-03-27.   This site is PIKT® powered.
PIKT® is a registered trademark of the University of Chicago.   Copyright © 1998-2008 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
View sample
browser
cache clear
Pikt script