- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- empty /var/adm/syslog/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
Discussions
Discussions
Forums
Forums
Discussions
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
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
тАО03-01-2005 07:53 PM
тАО03-01-2005 07:53 PM
I've created a cron job to clear down the mail log file :
/sbin/init.d/sendmail stop
cp /var/adm/syslog/mail.log /var/adm/syslog/mail.old
cat /dev/null > /var/adm/syslog/mail.log
/sbin/init.d/sendmail start
My problem is that nothing is being logged in mail.log anymore.
The file permissions are a sfollows :
-r--r--r-- 1 root root 0 Mar 1 19:20 mail.log
-r--r--r-- 1 root sys 2034117 Mar 1 19:20 mail.old
Has anyone any ideas how I've gone wrong?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2005 08:11 PM
тАО03-01-2005 08:11 PM
SolutionI would make the script this way :
cp /var/adm/syslog/mail.log /var/adm/syslog/mail.old
> /var/adm/syslog/mail.log
kill -1 $(cat /var/run/syslog.pid)
then try to send a mail...
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2005 08:19 PM
тАО03-01-2005 08:19 PM
Re: empty /var/adm/syslog/mail.log
Maybe it's because your "cat /dev/null > /var/adm/syslog/mail.log" command...
I think you should do this the same way does it (see attachment). See "Options -> View SAM Log..." to check SAM commands...
Best Regards,
Eric Antunes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2005 08:26 PM
тАО03-01-2005 08:26 PM
Re: empty /var/adm/syslog/mail.log
Instead of
cat /dev/null > /var/adm/syslog/mail.log
use:
touch /var/adm/syslog/mail.log
Regards,
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2005 08:51 PM
тАО03-01-2005 08:51 PM
Re: empty /var/adm/syslog/mail.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2005 09:01 PM
тАО03-01-2005 09:01 PM
Re: empty /var/adm/syslog/mail.log
thanks