- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Clearing mail.log
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2007 11:15 PM
07-05-2007 11:15 PM
Clearing mail.log
My system's /var/adm/syslog/mail.log file was large and I just cleared it with : >mail.log. Is this the correct way to clear system log files? do I need to stop the mail daemon before clearing the log file ... I noticed the file is not updated since i cleared, it's still empty. I wonder if these files can be cleared while the process are still running. Any advice.........
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2007 11:49 PM
07-05-2007 11:49 PM
Re: Clearing mail.log
# kill -HUP
My suggestion would be to copy mail.log to another location. archive it and then chicken lip the file and send a HUP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2007 04:14 AM
07-06-2007 04:14 AM
Re: Clearing mail.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2007 03:48 AM
07-07-2007 03:48 AM
Re: Clearing mail.log
if you decide to clear mail.log remember that this file is locked by syslogd and not by sendmail.
If you check /etc/syslog.conf file you see that mail.log is managed by syslogd.
This test in my machine:
fuser /var/adm/syslog/mail.log
/var/adm/syslog/mail.log: 584o
ps -ef |grep 584
root 584 1 0 Dec 5 ? 0:10 /usr/sbin/syslogd -D
This means that /var/adm/syslog/mail.log is in open state by syslogd daemon.
Following this step to clear mail.log:
cd /var/adm/syslog
/sbin/init.d/syslogd stop
mv mail.log mail.log.old
touch mail.log
/sbin/init.d/syslogd start
If you want to do every time mail.log grow bigger then
Regards,
Fat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2007 03:28 PM
07-08-2007 03:28 PM
Re: Clearing mail.log
# kill -HUP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2007 07:12 PM
07-08-2007 07:12 PM
Re: Clearing mail.log
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2007 10:12 PM
07-08-2007 10:12 PM
Re: Clearing mail.log
Search on the forum. May be a fit in your requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2007 10:37 PM
07-08-2007 10:37 PM
Re: Clearing mail.log
cat mail.wrk >mail.log
rm mail.wrk
used to work on 11.00 l-class servers