System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

var cleanup hp ux 11.23 itanium

 
SOLVED
Go to solution
Donald Thaler
Super Advisor

Re: var cleanup hp ux 11.23 itanium

the command du -sk | sort -rn | head -20
just returns a number ??

# du -sk | sort -rn | head -20

2678160 .
James R. Ferguson
Acclaimed Contributor

Re: var cleanup hp ux 11.23 itanium

Hi Donald:

> The command du -sk | sort -rn | head -20
just returns a number ??

Drop the 's' which summarizes and use:

# du -k /var|sort -krn|head -20

Regards!

...JRF...
Highlighted
grshankar
Frequent Advisor

Re: var cleanup hp ux 11.23 itanium

Hi,



Some Pionts to clean up /var Spaceâ ¦

1. Release space from /var:
- remove core dump:
# find /var -name core -exec rm {} \;
2. cleanup old patches
cleanup -c 2
3. The following file in /var/stm/logs/os (Keep latest.)
memlog
logN.taw.cur
ccbootlog
Bill Hassell
Honored Contributor

Re: var cleanup hp ux 11.23 itanium

Sorry about the typo -- the actual du option should be:

du -xk /var | sort -rn | head -20

(s is just too close to the x key)

Just to explain the use of du and not find for large files: Until you examine every directory in /var, looking for large files will miss a directory with thousands of small files. The du command summarizes directories. Once you find an unusually large directory, look inside to find the contents. You can sort the contents by size:

cd /var/someLargeDirectory
ll | sort -rnk5 | head -20


Bill Hassell, sysadmin
Bob E Campbell
Honored Contributor

Re: var cleanup hp ux 11.23 itanium

Nice to know that SWA is covered when we turn away for a bit, thanks guys!

I might also throw out that often the mass of the QPK bundle can be an issue. If you already have that on media then preload it into your depot and then use:

# swa get -t /depotHere -x allow_existing_depot=true

While I am a big fan of the QPK bundle you could also use just the SEC, PW, and CRIT analyzers.