Operating System - HP-UX
1751935 Members
4946 Online
108783 Solutions
New Discussion юеВ

Unable to trim mail log via SAM

 
frederick hannah
Super Advisor

Unable to trim mail log via SAM

/var/adm/syslog/mail.log needs to be trimmed. I shutdown sendmail and attempted, via SAM, to reduce mail.log to its recommended size, but SAM responds about a process still holding te file open. Sendmail is down so i dont see how this is possible and I do want to reduce mail.log's size
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: Unable to trim mail log via SAM

Hi:

The heck with SAM. Simply:

# cp /var/adm/syslog/mail.log /var/adm/syslog.OLDmail.log

# cat /dev/null > /var/adm/syslog/mail.log

Now keep, discard or 'vi' the 'OLDmail.log' to any size you want.

Regards!

...JRF...
Steven E. Protter
Exalted Contributor

Re: Unable to trim mail log via SAM

Shalom,

Always better to do it outside sam

> /var/adm/syslog/mail.log

Simple, direct effective.

If log use is heavy this may fail. Then:

/sbin/init.d/sendmail stop
> /var/adm/syslog/mail.log
/sbin/init.d/sendmail start

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
frederick hannah
Super Advisor

Re: Unable to trim mail log via SAM

Thanks guys, but too late as I have used SAM (it worked, but not the great results I expected). I have learned not to use SAM to trim mail.log