- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /var/adm/syslog/mail.log
Operating System - HP-UX
1753809
Members
8327
Online
108805
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО08-31-2010 09:53 AM
тАО08-31-2010 09:53 AM
/var/adm/syslog/mail.log
How do you restart mail.log?
I moved the old mail.log file with another name
a couple of days ago and I still have 0 in my mail.log. I have restarted sendmail thinking that would do it but not so. Anybody know?
I moved the old mail.log file with another name
a couple of days ago and I still have 0 in my mail.log. I have restarted sendmail thinking that would do it but not so. Anybody know?
Ross Hanson
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2010 09:55 AM
тАО08-31-2010 09:55 AM
Re: /var/adm/syslog/mail.log
Hi:
# /sbin/init.d/sendmail stop
# /sbin/init.d/sendmail start
Regards!
...JRF...
# /sbin/init.d/sendmail stop
# /sbin/init.d/sendmail start
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2010 02:51 PM
тАО08-31-2010 02:51 PM
Re: /var/adm/syslog/mail.log
You need to tell syslogd to re-initialise:
mv /var/adm/syslog/mail.log /var/adm/syslog/mail.log.1
kill -HUP $(cat /var/run/syslog.pid)
mv /var/adm/syslog/mail.log /var/adm/syslog/mail.log.1
kill -HUP $(cat /var/run/syslog.pid)
- Tags:
- mail.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2010 05:05 PM
тАО08-31-2010 05:05 PM
Re: /var/adm/syslog/mail.log
The mv command simply renames the file in the directory, but syslog still has the file open. You have to restart syslogd so it will close the current file and open the new file. However, a better way to do this is to use cp -p and then zero the contents of the current file, like this:
# cp -p mail.log mail.log.old
$ cat /dev/null > mail.log
You can also zero the log with:
# > mail.log
There are two advantages to this method:
1. The mail.log file can remain open and syslogd will continue to log without interruption, and
2. the current mail.log and the copy of the old file will have the correct permissions and ownership.
Bill Hassell, sysadmin
# cp -p mail.log mail.log.old
$ cat /dev/null > mail.log
You can also zero the log with:
# > mail.log
There are two advantages to this method:
1. The mail.log file can remain open and syslogd will continue to log without interruption, and
2. the current mail.log and the copy of the old file will have the correct permissions and ownership.
Bill Hassell, sysadmin
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP