1822505 Members
2475 Online
109642 Solutions
New Discussion юеВ

HouseKeeping

 
Olebile Molefi
Occasional Contributor

HouseKeeping

I need to clean up my /VAR filesystem, besides the mail & sulogs directories what do I look at. What are tombstones???

6 REPLIES 6
eran maor
Honored Contributor

Re: HouseKeeping

Hi

my advise
1. try to find core file in the /var

2. try to find logfiles that you can delete

3. use the command cleanup to clean all your
old patches .

4. try to see if you can remove products that you are not working with swremove .
love computers
Vincenzo Restuccia
Honored Contributor

Re: HouseKeeping

#find /var -size +xxx
tombstones is the directory of logs of STM see
http://docs.hp.com/hpux/onlinedocs/diag/stm/stm_faq.htm
Joseph Loo
Honored Contributor

Re: HouseKeeping

Don't forget /var/tmp also. Keeping /var/mail/root gives a good indication of what is going on in your system. Do re-consider removing this. The important comand to use is actually find.

Try running a script with the find command. The example below gives a good indication.

#find / -name core -exec rm {} \;
#find /xx/xx/ -name xxxx -atime +7 rm {} \;

Including -atime allow you to delete files xxx days old.

Trust me you will realise that the find command is very useful.

As for the tombstone question, I guess Vincenzo has answer you.
what you do not see does not mean you should not believe
Steffi Jones_1
Esteemed Contributor

Re: HouseKeeping

Hello,

because you are running diagnostics, each system boot (via 'pdcinfo') creates tombstone files. These files contain the contents of the PIM area (non-volatile RAM). The tombstone files provide diagnostic information if the system encounters a hardware failure.

The numbering of these files goes in reverse order. So everytime the system reboots a ts99 file is created and moves the old ts99 to ts98 and so on. If you have a lot of these old files and you haven't encountered any hw issues you can easily delet a lot of these files. I would probably keep ts97,ts98 and ts99 in your case.

Steffi Jones

Wodisch
Honored Contributor

Re: HouseKeeping

Hello Olebile,

try to "commit" your patches, if you have not done that
already. That will free a lot disk space in "/var".

HTH,
Wodisch
Shannon Petry
Honored Contributor

Re: HouseKeeping

First, I'd say make a list of all the stuff going on in /var.
1. System accounting and related logs
2. Crash storage
3. swinstalled patch saves
4. application temporary files
5. system logs
6. mail and print queues
7. cron and at jobs and cron logs
8. miscelaneous admin files
I.E. /var/adm/inetd.sec, /var/adm/sw/defaults

Next, lets take a common sense approach to see how we can clean each...

1. /usr/sbin/acct/runacct
NOTE: this will create new data under /var/adm/acct/sum which can be removed without impacting the system.
2. crash and core files can simply be removed
3. requires /usr/sbin/claenup, patch commit's with swmodify, and log trimming
4. application temp's in /var/tmp can simply be removed
5. cleaned and rotated at boot time, or with /sbin/init.d/syslog stop/start
6. mail files can be removed if not needed, and print queue cleanup can be done with cancel, and lpstat t- view...
7 and 8 should not be removed...

I'd recommend you make a script that takes care of the items above. You may want to add /tmp to the list of stuff to cleanup, as this is another application temporary directory, and gets lots of junk. NOTE: always check b4 removing ACTIVE data from any temp directory to ensure that it does not HOSE applications!

I also recommend that your cleanup scripts LOG whatever they do. This will protect the sysadmin from users saying "U trashed my files" and such nonsense, as well as ensure U that the job has been completed properly!

Regards,
Shannon
Microsoft. When do you want a virus today?