Operating System - HP-UX
1834449 Members
2225 Online
110067 Solutions
New Discussion

using sam to trim files periodically

 
SOLVED
Go to solution
Stefano_1
Frequent Advisor

using sam to trim files periodically

Hello,
I would like to understand if it's possible to use sam (routine task -> system log files) to trim system log files automatically and periodically.

Reading help on line of sam, it said that files dimension are evaluated only at boot time or at first access of the files.

Can someone help me?

5 REPLIES 5
Peter Godron
Honored Contributor
Solution

Re: using sam to trim files periodically

Stefano,
I believe sam will not automatically trim the logs for you.

You could use logrotate
http://hpux.ee.ualberta.ca/hppd/hpux/Sysadmin/logrotate-2.5/
or write your own cron job.
Arunvijai_4
Honored Contributor

Re: using sam to trim files periodically

Hi,

You can use logrotate for this purpose.

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-2.5/

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-2.5/man.html

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Abhijit P.
Valued Contributor

Re: using sam to trim files periodically

Hi ....

Check this thread , has lot of inputs

forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=57218

Regards,
Abhijit
Stefano_1
Frequent Advisor

Re: using sam to trim files periodically

Ok.
Thanks to all.
Yogeeraj_1
Honored Contributor

Re: using sam to trim files periodically

hi,

please note that most of the logs files are not found in this section of SAM. These are only operating system related. Also, you are required to manually purge or trim these files.

In practice, you will have lot more to purge! You know your applications better, you have to write your custom scripts for this purpose. E.g. Apache log files, Oracle trace files, temporary files... core dump files....


hope this helps too!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)