AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
Expand all | Collapse all

How to cleanup var and usr folders in AIX

  • 1.  How to cleanup var and usr folders in AIX

    Posted Wed December 06, 2017 01:16 AM

    Originally posted by: Sys1mxs


    Dears, in my production environment /usr folder is almost full 97% space is consumed. I have run few checks that which folder is eating up all the space and it turns out to be lpp and lib folders  (output of the command shown below).

    As I am new to UNIX so I am not quite sure how to clean up this folder.

    I have search this thing on internet but I haven't come across something satisfactory. Any help in this regard will be highly appreciated!

    Best regards,

    Daniel



  • 2.  Re: How to cleanup var and usr folders in AIX

    Posted Wed December 06, 2017 08:09 AM

    Originally posted by: AncientAIXer


    In traditional Unix philosophy, /usr is where program files are located.  This filesystem rarely changes in size unless you have something installed like a java program or an app server (Java-based) that does not adhere to Unix.  It does not appear that you have one since they are usually very large.  The FS may be almost full but monitor it and see if it changes.  If it does and you are not installing anything, grow the filesystem slightly.  /var contains log files.  It will grow over time unless cleaned out somehow.  Most likely the biggest culprit is syslog files.  You can look in /etc/syslog.conf to see what files are specified.  You can also configure syslog to rotate those files so that they will be cleaned up automatically.  You can also use an opensource program, such as logrotate, to clean out logs, or write your own script.  Some of the log files require special handling since you may modify it but without detaching the program using it, the system may not recognize that the size has changed.  The /var on your system is not that full and it may be quite a while before it needs dealing with.