[hobbit] Disk Usage Sorting

Camp, Neil D. (ManTech) CTR neil.camp at deca.mil
Fri Aug 4 19:16:24 CEST 2006


Thanks, works like a champ! 

-----Original Message-----
From: Henrik Stoerner [mailto:henrik at hswn.dk] 
Sent: Friday, August 04, 2006 12:38 PM
To: hobbit at hswn.dk
Subject: Re: [hobbit] Disk Usage Sorting

On Fri, Aug 04, 2006 at 12:14:49PM -0400, Camp, Neil D. (ManTech) CTR
wrote:
> If I wanted to sort my disk usage by highest offender first, how would
I
> change the display to show that? Thanks.
> 
> Example
> 
> Filesystem          1024-blocks  Used  Available Capacity Mounted on
> /dev/MAIN/Usr         1625002  1423491   201511    88%   /usr
> /dev/MAIN/Home        523910   458737    65173    88%   /home
> /dev/MAIN/Opt         2025176  1664282   360894    83%   /opt
> /dev/MAIN/Root        300769   142019   158750    48%   /
> /dev/MAIN/Stand       272812    48284   224528    18%   /stand
> /dev/MAIN/Var         1556049   235055  1320994    16%   /var
> /dev/MAIN/Tmp         491827     1987   489840     1%   /tmp

The easiest - at least for me - would be to change the "df" command
being run from the client script to do the sorting. E.g. send the "df"
output through "| tail +2 | sort -nr -k 5" and add a command before the
current "df" command to just output the header line: "df|head -1"


Regards,
Henrik


To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk





More information about the Xymon mailing list