1835942 Members
2443 Online
110088 Solutions
New Discussion

trim system logs

 
Ratzie
Super Advisor

trim system logs

I know you can trim the system logs, I found it in SAM, (but per file) but is there a way that I can set it so all system files are trimmed? If so where can I do this? Is this set up as default, and how would I check to see if this is set as default?
5 REPLIES 5
Michael Tully
Honored Contributor

Re: trim system logs

Have a look at this script.

http://www.introcomp.co.uk/examples/logrotate.html

You can make any changes you want and just run it through cron. You could also do a search on 'trimming logs + script' which may provide some additional gold mines.
Anyone for a Mutiny ?
Ratzie
Super Advisor

Re: trim system logs

I have used logrotate before, and would like to see how to trim the files. Logrotate may be an option later on.
Michael Tully
Honored Contributor

Re: trim system logs

You could write a different script to 'logrotate', but you could also see how sam does it by using the 'view SAM Log' from the options menu. It will show you what commands it used to do the trimming. You could put these into your own script and run it from 'cron' There is no way to set these to run by default unless it is scheduled in some way. (cron)
Anyone for a Mutiny ?
Hemanth Gurunath Basrur
Honored Contributor

Re: trim system logs

Hello Laura,

Looks like you must use SAM only to trim files. Also, look at this document. I did fins some topic on trimming.

http://www.pimpworks.org/hp/hpuxtips.html

Also, have a look at this doc and check if any command supports trimming other than SAM.

http://docs.hp.com/hpux/pdf/B2355-90781docs.pdf

For more info, search on http://docs.hp.com if you can stumble upon something.

Hope this helps.

Regards,
Hemanth