ec_spool_space

March 26, 2020 Contributors

Name

ec_spool_space — Return information about the free space on the spool partition

Synopsis

ec_spool_space

Description

Method which returns the total and available space in MBs and the percentage of used space (as an int, from 0 to 100) on the disk partition with the Momentum spool.

($totalmegs, $availmegs, $pct) = ec_spool_space;
# Turn away connections if more than 90% of disk is free
if ec_test :value "gt" :comparator "i;ascii-numeric" $pct "90" {
    ec_disconnect "421" "Disk is too full";
}