Operating System - HP-UX
1748117 Members
3637 Online
108758 Solutions
New Discussion

Re: /var is 85%, need to bring it to 70%

 
redhat7012
Advisor

/var is 85%, need to bring it to 70%, please help me.

Hi,

 

/var is 85% reached and need to bring it to 70% to 75%.

 

Please help me.

 

 

 Please help me.

 

Regards,

Aparna.

 

 

13 REPLIES 13
Dennis Handly
Acclaimed Contributor

Re: /var is 85%, need to bring it to 70%

redhat7012
Advisor

Re: /var is 85%, need to bring it to 70%, please help me.

I have to zip the log files and nullify the original file.

 

How to do this in HP-UX ?

 

What are the commands to use this in HP Unix ?

 

/var/adm/cron and /var/adm/syslog files need to be zipped and nullify the original one.

 

How to do this ?

 

Please help me with your comands.....

 

 

 

Bill Hassell
Honored Contributor

Re: /var is 85%, need to bring it to 70%, please help me.

>> /var/adm/cron and /var/adm/syslog files need to be zipped and nullify the original one.

 

/var/adm/cron and /var/adm/syslog are not files, they are directories.

 

In /var/adm/cron, there are log files that can be reduced, for example:

 

cd /var/adm/cron

cp log log.old

> log

gzip log.old

 

 

Similarly, for syslog:

 

cd /var/adm/syslog

cp syslog.old syslog.log.old

> syslog.log

gzip syslog.log.old

 

However, it is really important to look for big directories first, not big files. Use this command:

 

du -kx | sort -rn | head -20

 

Then post the result. You may have directories that have thousands of small files that need to be removed, so looking for large files will miss these directories.



Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: /var is 85%, need to bring it to 70%

>/var/adm/cron/ and /var/adm/syslog/ files need to be zipped and nullify the original one

 

Are these logs there really that large?

You're looking to remove ~700 Mb.

redhat7012
Advisor

Re: /var is 85%, need to bring it to 70%, please help me.

Hi,

 

Thank you for your time and attention.

 

Filesystem          kbytes        used          avail              %used       Mounted on
/dev/vg00/lvol8    4718592 4001120  711928            85%                     /var

 

 

# du -akx /var | sort -nr | more

 

3987208 /var
2436008 /var/stm
2419056 /var/stm/logs
2418128 /var/stm/logs/os
1077600 /var/adm
985080  /var/adm/sw
823696  /var/adm/sw/save
333160  /var/opt
141480  /var/opt/OV
141168  /var/adm/sw/products
136560  /var/opt/OV/tmp
136512  /var/opt/OV/tmp/OpC
119200  /var/opt/OV/tmp/OpC/msgagtq
68024   /var/opt/wbem
67136   /var/tmp
66344   /var/adm/cron
63680   /var/adm/cron/log
58712   /var/adm/sw/save/PHCO_35291
58704   /var/adm/sw/save/PHSS_33944
57608   /var/adm/sw/save/PHCO_35291/VXVM-RUN
55976   /var/opt/sfmdb/pgsql
55976   /var/opt/sfmdb
55392   /var/opt/perf
53048   /var/opt/perf/datafiles
38040   /var/tmp/EMCPower.HPUX.5.1.0.GA.b160.tar
34208   /var/adm/sw/save/PHSS_32977
33592   /var/opt/wbem/repository
32768   /var/opt/sfmdb/pgsql/pg_xlog
32192   /var/adm/sw/save/PHSS_32976
31392   /var/adm/sw/save/PHSS_36004
30240   /var/adm/sw/save/PHSS_26946
29120   /var/mail
28464   /var/adm/sw/save/PHSS_28386
26184   /var/opt/wbem/repository/root#cimv2
25792   /var/adm/sw/save/PHCO_35291/VXVM-RUN/etc/vx
25792   /var/adm/sw/save/PHCO_35291/VXVM-RUN/etc
25616   /var/opt/wbem/repository/root#cimv2/classes
24456   /var/adm/sw/save/PHSS_32223
24384   /var/adm/sw/save/PHCO_35291/VXVM-RUN/usr
23896   /var/adm/sw/save/PHSS_27367
23816   /var/adm/sw/save/PHCO_35743
23800   /var/adm/sw/save/PHCO_29495
23480   /var/adm/sw/save/PHSS_33944/LANG-64ALIB/usr/lib/pa20_64

 

Could you please assisst me now, how to bring the /var % to 70  ?

 

The above directories used space is displayed .

 

Please help me with your answers.

 

 

Regards,

Aparna.

 

 

 

Dennis Handly
Acclaimed Contributor

Re: /var is 85%, need to bring it to 70%

2418128 /var/stm/logs/os

 

You should clean the logs here.

 

>  823696  /var/adm/sw/save

 

You should use cleanup(1m) to get right of superseded patches.

redhat7012
Advisor

Re: /var is 85%, need to bring it to 70%

Hi,

Can you please give me the commands to clean up this directory ?

Won't be any impact on the server if I clean up the logs in this directory /var/adm/sw/save ?

Please give me the commands,plz...so that in future if same situation occurs, it will be helpfull for me to apply same commands.

Dennis Handly
Acclaimed Contributor

Re: /var is 85%, need to bring it to 70%

>Can you please give me the commands to clean up this directory?

 

For /var/stm/logs/os/, just remove all but the latest.


>Won't be any impact on the server if I clean up the logs in this directory /var/adm/sw/save?

 

There are no logs, just backup of superseded patches.

Have you looked at the links above about cleanup(1m) and the man page?

cleanup -c 2

redhat7012
Advisor

Re: /var is 85%, need to bring it to 70%

Hi,

These are the pacthes that are superseded .

 

# /var/adm/sw/save->cleanup -p -c 3

 

The following patches superseded at least 3 time(s) can be committed:

Superseded  # Times Superseded  Disk Space in /var/adm/sw/save  Superseded By
==========  ==================  ==============================  =============
PHCO_27018           3                   188416 bytes             PHCO_33142
PHCO_29029           3                 23543808 bytes             PHCO_29495
PHKL_29047           3                   704512 bytes             PHKL_32090
PHSS_29183           3                 13189120 bytes             PHSS_32976


 

Now,please assist me which patches to be removed and How?

 

Please help me with your commands.