Subroutine definition for checkinodes()
Subroutine definition for checkinodes()
- Values used are arbitrary
- Notice the call of the message function
- Flexible to handle messages from either check function
- Just add the additional check of additional filesystems with the appropriate floor value (minimum inode level)
sub checkinodes {
local ($fs,$inodesavail)=@_; $check="inodes";
if( $fs eq "/" ) {
&message ($inodesavail, $fs, $check, $tot_inodes)
if ($inodesavail < 300);
}
if( $fs eq "/usr" ) {
&message ($inodesavail, $fs, $check, $tot_inodes)
if ($inodesavail < 400);
}
}