Xymon Mailing List Archive search

Disk Usage Sorting

3 messages in this thread

list Neil D. ManTech Ctr Camp · Fri, 4 Aug 2006 12:14:49 -0400 ·
 Hello,

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
list Henrik Størner · Fri, 4 Aug 2006 18:37:33 +0200 ·
quoted from Neil D. ManTech Ctr Camp
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
list Neil D. ManTech Ctr Camp · Fri, 4 Aug 2006 13:16:24 -0400 ·
Thanks, works like a champ! 
quoted from Henrik Størner

-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid] 
Sent: Friday, August 04, 2006 12:38 PM
To: user-ae9b8668bcde@xymon.invalid
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