#!/usr/bin/perl -T -I /h/COE/lib -w

use Coe;

my @data;
my $dev;
my $total;
my $used;
my $avail;
my $res;
my $dir;

@data=coeExec("/bin/df -k");
shift (@data);

# deb has a default 5% reserve; use tune2fs -m 
# sol has a default 10% reserve; use tunefs -m 
foreach (@data) {
	@d = split();
	# This is a weak attempt to lure the sysad to install on h
	# I should drop this quickly when the install anywhere initiative is over
	if ("$dir" eq "/") {$dir="/h"};

	printf "%s:%d:%d:%d:%d%s:%s\n", $dev, $total, $used, $avail, $res,"%", $dir;