1834499 Members
2827 Online
110068 Solutions
New Discussion

Removing raw logfiles

 
SOLVED
Go to solution
Ed Hon
Regular Advisor

Removing raw logfiles

I have a lot of /var/stm/logs/os/logx.raw files. Can I simply 'rm' the ones I don't need, or do I have to use a special delete utility/procedure?
6 REPLIES 6
Rob_132
Regular Advisor

Re: Removing raw logfiles

Just a stab....

Changing the size to '0' might be better/safer.

echo >

Maybe they can be removed, but this is safer IMHO.

Rob
Elena Leontieva
Esteemed Contributor

Re: Removing raw logfiles

Ron,

You should NOT remove /var/stm/logs/os/logx.raw.cur, as well as memlog and ccbootlog

Elena.
Kevin Wright
Honored Contributor
Solution

Re: Removing raw logfiles

sure, just not the current one, raw.cur. You just won't be able to look at any errors you may have had previously, which may not be a big concern.
Alzhy
Honored Contributor

Re: Removing raw logfiles

I am not sure of these logs but the way I do log administration is I rotate them. The current ones (which are OPEN) needs special care to trim down...

- first do a fuser on the current log file(s)
- if its hot (meaning hooked by a process), do not just delete the file(s), instead copy it to a temp location. Then to trim the current file do a cp /dev/null verbiglog.log.

Do not ever remove an active log file (sp. those very large ones). Zero/trim them down using the /dev/null technique.. On Solaris and Linux, sometimes the Filesystem would not free up space after deleting an active large file...
probably same with HPUX...
Hakuna Matata.
Robert-Jan Goossens
Honored Contributor

Re: Removing raw logfiles

Ed,

Is /var getting full ??

check with the command cleanup if you can remove superseeded patches.

# cleanup -c 2 -p (preserve)
# cleanup -c 2

Hope it helps,

Robert-Jan.
Zigor Buruaga
Esteemed Contributor

Re: Removing raw logfiles