当前位置:主页 > 关注 >

Logs under /var/stm/logs/os in HPUX

发布时间: 2023-07-06 16:26:45 来源:个人图书馆-xfxyxh
Your /var mount point is getting full? You need to check /var/stm/logs/os directory for old logs. Lots of space can be saved by zipping or purging them.

Ever wondered why /var/stm/logs/osis taking up huge space in /varmount point of HPUX? In this post, we will see details about logs under this directory and how to handle them.

Most of the time you get /vargetting full alerts from your monitoring system or you observe /varis filling up. This is normal behavior since most of the logs reside in /varand if some logs are growing fast they cause /varfilling up fast. As a first troubleshooting step, you need to check huge size files and directories in /var.


(资料图片)

Many times you see one of the culprit is /var/stm/logs/osdirectory. If you see inside this directory you will see something like below :

# ls -lrt /var/stm/logs/ostotal 6986016-rw-r--r-- 1 root root 512656 Apr 10 2008 log1.raw-rw-r--r-- 1 root root 512656 Apr 10 2008 log2.raw-rw-r--r-- 1 root root 512656 Apr 10 2008 log3.raw-rw-r--r-- 1 root root 512656 Apr 11 2008 log4.raw-rw-r--r-- 1 root root 512656 Apr 11 2008 log5.raw-rw-r--r-- 1 root root 512656 Apr 11 2008 log6.raw-rw-r--r-- 1 root root 512656 Apr 11 2008 log7.raw----- ouput clipped -----

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 the purpose of these files on the server?

These are raw files that 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 crosses a certain file size. While rotating they are sequentially numbered. This numbering makes it easy when it comes to managing those logs.

How to read these logs :

You can read these logs using log viewer by STM. Goto CSTM consoleusing command cstm

# /usr/sbin/cstmRunning Command File (https://z5./usr/sbin/stm/ui/config/.stmrc).-- Information --Support Tools ManagerVersion A.59.05Product Number B4708AA(C) Copyright Hewlett Packard Co. 1995-2007All Rights ReservedUse of this program is subject to the licensing restrictions describedin"Help-->On Version". HP shall not be liable forany damages resultingfrom misuse or unauthorized use of this program.cstm>

Then run ruand select logtoolutility.

cstm>ru-- Run Utility --Select Utility1 MOutil2 logtoolEnter selection or cancel to quit : 2-- Logtool Utility --To View a Summary of Events ina Raw Log1. Select a raw (unformatted) log file. (File Menu -> "Select Raw")The current log fileends in".cur", e.g. "log1.raw.cur".You donot have to switch logs.2. View the summary of the selected log file. (View Menu -> "Raw Summary")To Format a Raw Log1. Set the formatfilter forthe types of entries you want to see.(Filters Menu -> "Format"). To see all entries, skip this step.2. Format the raw log file. (File Menu -> "Format Raw")3. Display the formatted file. (View Menu -> "Formatted Log")4. To further narrow the entries displayed, seta display filter.(Filters Menu -> "Display"-> "Formatted")For moreinformation, use the on-line help (Help Menu -> "General help").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 a scenario, you have got two options:

Zip them: For few months old files. Maybe 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 won’t be able to use them.

So be sure you check logs using logtoolutility explained above and decide to purge, zip, or keep it. Normally, if you are not facing any hardware issues with the server currently then you should zip/purge according to the time frame I suggested above.

# ls -lrt /var/stm/logs/ostotal 2463008-rw-r--r-- 1 root root 65910 Apr 10 2008 log1.raw.gz-rw-r--r-- 1 root root 57168 Apr 10 2008 log2.raw.gz-rw-r--r-- 1 root root 53727 Apr 10 2008 log3.raw.gz-rw-r--r-- 1 root root 40526 Apr 11 2008 log4.raw.gz-rw-r--r-- 1 root root 39541 Apr 11 2008 log5.raw.gz-rw-r--r-- 1 root root 37050 Apr 11 2008 log6.raw.gz-rw-r--r-- 1 root root 37624 Apr 11 2008 log7.raw.gz

Match above output with previous and see how file size decreased after zipping which in turns saved my /varspace.

Zipping of purging these logs will greatly free up space under /varmount point. This is one of the directories which we normally miss or ignore while cleaning up the mount point.

Alternatively, you can even configure logrotate utility which will take care of this zipping and purging of files automatically without human intervention.

标签:

为您推荐

  • 最新资讯
  • 热门资讯
财经