Inode Shortages

In this example, we report worrisome inode shortages.

The DiskInode script might send an alert message like the following:

                                PIKT ALERT
                         Thu Jan 14 12:21:07 2002
                                  paris7

WARNING:
    DiskInode
        Report worrisome inode shortages

        Filesystem /usr on /dev/dsk/c0t2d0s5 has used 96% of inodes, 54892 inodes left

The script follows.

DiskInode

        init
                status =piktstatus
                level =piktlevel
                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

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.

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
NFS auto_direct
config file