Ever wondered why
/var/stm/logs/os
is taking up huge space in /var
mount point of HPUX? In this post we will see details about logs under this directory and how to handle them.
Most of the times you get
/var
getting full alerts from your monitoring system or you observe /var
is filling up. This is normal behavior since most of the logs resides in /var
and if some logs are growing fast they cause /var
filling up fast. As a first troubleshooting step, you need to check big size files in /var
.
Many times you see one of the culprit is
/var/stm/logs/os
directory. If you see inside this directory you will see something like below :
There are lots of raw log files taking up huge space collectively.
What are these logs under /var/stm/logs/os :
Your next question will be what are these files? what is purpose of these files on server?
These are raw files which are being logged and used by STM i.e. support tool manager. Those are logs collected by STM which has information about your hardware issues. By the above output you can see those are rotated when one log file cross certain file size. While rotating they are sequentially numbered. This numbering makes it easy when it comes to manage those logs.
How to read these logs :
You can read these logs using log viewer by STM. Goto
CSTM console
using command cstm
–
Then run
ru
and select logtool
utility.
With give information on console you can view, format raw log files.
Should I purge or zip /var/stm/logs/os logs ?
Now you know what are these files and you observe there are too many of them which are too old to keep. In such scenario, you have got two options:
- Zip them : For few months old files. May be 1-2 months old. How to Zip files.
- Purge them : For very old logs like 6 or more months old.
Make a note that those logs are read by STM as well so if you purge or zip them, STM wont be able to use them.
So be sure you check logs using
logtool
utility explained above and decide to purge, zip or keep it. Normally, if you are not facing any hardware issues with server currently then you should zip/purge according to time frame I suggested above.
Match above output with previous and see how file size decreased after zipping which in turns saved my
/var
space.
Zipping of purging these logs will greatly free up space under
/var
mount point. This is one of the directory which we normally miss or ignore while cleaning up mount point.
Alternatively you can even Configure logrotate utility which will take care of this zipping and purging of files automatically without human intervention.
0 comments:
Post a Comment