1752577 Members
4916 Online
108788 Solutions
New Discussion юеВ

cleanup command

 
SOLVED
Go to solution
Scott_20
Occasional Advisor

cleanup command

I used a command once cleanup - - that removed superceded patches but did not effect INDEX file. I'm running out of space in /var, so I was going to try this, also man does not find command
thank,
scott
I'm ok
4 REPLIES 4
Pete Randall
Outstanding Contributor
Solution

Re: cleanup command

Scott,

First, check to see you've got the command (the fact that you don't have a man page concerns me) - ll /usr/sbin/cleanup.

Second, just entering the cleanup command will give you usage.

Third, what you probably want to run is "cleanup -c2" or maybe "cleanup -c1" (if you're really desparate). Make sure you have an adequate backup beforhand - make_tape_recovery would be perfect.


Pete

Pete
Pete Randall
Outstanding Contributor

Re: cleanup command

Scott,

I should add that you should probably check all the other normal /var offenders (but you knew this, right?). Check on log files with sam's "routine tasks". Look for large entries in /var with "du -sk /var/* |sort -n" (be careful about what you delete in here though - stay away from anything /var/adm/sw, for example). Most anything in /var/tmp should be eligible for deletion.


Pete

Pete
Bill Hassell
Honored Contributor

Re: cleanup command

/var/adm/sw is an ideal candidate for a separate lvol, maybe even moved to a separate volume group. /var is far too critical to every allow it to fill up. Find about 500 megs on another disk and move /var/adm/sw to a temp mount point for that lvol. Then edit fstab to reflect the new mount point source, and mount /var/adm/sw. You'll now have a lot of space in /var.

Then survey /var for big directories:

du -kx /var | sort -rn | more

The directories at the top are the biggest. Just fix those as necessary.


Bill Hassell, sysadmin
Sridhar Bhaskarla
Honored Contributor

Re: cleanup command

Hi Scott,

As mentioned, 'cleanup -c n' will removed the patches that got superceded 'n' times. If you are going with n <= 2, it is strongly recommended that you take a backup of your /var/adm/sw/save directory.

I would create /var/adm/sw/save as a seperate filesystem mounted from another volume group if I have. This is a static directory and is used when a patch is committed|removed.

Other major offenders in /var are /var/adm/syslog, /var/mail and /var/tmp. Check your /var/stm/logs directory also.
Or you can run 'du -ks /var |sort -n' to find them out.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try