Hi,
With HP, the
df -vk give output like :
hp>df -kv .
[tt]/tmp (/dev/vg00/lvol6 ) : 62414 total allocated Kb
47592 free allocated Kb
14822 used allocated Kb
23 % allocation used
[/tt]
You can use the following awk script :
dfvk.awk
function PrintInfos( sts) {
if (FileSystem != ""

{
sts = "";
if (PUsed > 80) sts = "WARNING" ;
printf OutFmt, FileSystem, Total, Free, Used, PUsed, sts;
}
}
BEGIN {
OutFmt = "%-24s %8s %8s %8s %3s %% %s\n" ;
printf OutFmt,"FileSystem","Total","Free","Used", "", "" ;
}
{
InfoField = NF-3;
}
/ total allocated/ {
PrintInfos() ;
FileSystem = $1 ;
Total = $InfoField;
}
/ free allocated/ {
Free = $InfoField;
}
/ used allocated/ {
Used = $InfoField;
}
/ % allocation used/ {
PUsed = $InfoField;
}
END {
PrintInfos() ;
}
Example:
hp0>
df -vk | awk -f dfvk.awk
[tt]FileSystem Total Free Used %
/home 19354 17782 1572 8 %
/opt 502263 148106 354157 70 %
/tmp 62414 47592 14822 23 %
/usr 812434 102422 710012 87 % WARNING
/var 806609 190461 616148 76 %
/stand 75359 47458 27901 37 %
/ 137423 89168 48255 35 %
[/tt] Jean Pierre.