Friday, November 2, 2012

How to find out the highly utilized files on the filesystem in AIX and Linux?


We always received a filesystem high utilization warning in our day to day activity. At that time we are in the situation to perform the housekeeping activity, for that we need to find out the highly utilized files under the filesystem. The below commands make our work very simply.

Here Pls assumed that /var filesystem utilizing more. (You can change the filesystem name on your own as per the FS alert you received.) 

For AIX: 

The above command list out the highly utilized 20 files under /var filesystem.

find /var -xdev -ls|sort +6rn|head -20     


For Linux:

The below command list out the highly utilized 20 files under /var filesystem.

du -ah /var | grep -i '^[0-9]\{1,\}m' | sort -nr|head -20     ---> (list the files in the size of MB)
du -ah /var | grep -i '^[0-9]\{1,\}g' | sort -nr|head -20      ---> (list the files in the size of GB)

No comments:

Post a Comment