- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- logrotate problems
Operating System - HP-UX
1819920
Members
2521
Online
109607
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
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
Go to solution
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
тАО04-26-2004 02:51 AM
тАО04-26-2004 02:51 AM
I have installed logrotate to rotate some system logs.
I was testing logrotate with mail.log. It worked because I got a log named mail.log.1 but the new log (mail.log) is 0kb and I have sent some mails.
Thx for your help...
regards
MARIO
I was testing logrotate with mail.log. It worked because I got a log named mail.log.1 but the new log (mail.log) is 0kb and I have sent some mails.
Thx for your help...
regards
MARIO
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2004 03:03 AM
тАО04-26-2004 03:03 AM
SolutionHow does your logrotate work?
Does it copy or move the file? If it moves (mv) it and your mail application has the log file open, then the mail application is still pointing to the OLD inode.
If it is using a (cp) and then a "cat /dev/null" to your logfile, then it's a "buffer" issue which will flush when there the buffer becomes "full".
live free or die
harry
Live Free or Die
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2004 03:03 AM
тАО04-26-2004 03:03 AM
Re: logrotate problems
Check the permissions of mail.log. Here is ours:
-r--r--r-- 1 root root 50021 Apr 26 00:00 mail.log
Also, below is the code we use for our log rotation. It might give you some ideas:
#!/bin/sh
mv -f /var/adm/syslog/auth.log /var/adm/syslog/auth.log.1
mv -f /var/adm/syslog/mail.log /var/adm/syslog/mail.log.1
mv -f /var/adm/syslog/syslog.log /var/adm/syslog/syslog.log.1
kill -HUP `cat /var/run/syslog.pid`
rm -f /var/adm/syslog/auth.log.1.gz
gzip /var/adm/syslog/auth.log.1
rm -f /var/adm/syslog/mail.log.1.gz
gzip /var/adm/syslog/mail.log.1
rm -f /var/adm/syslog/syslog.log.1.gz
gzip /var/adm/syslog/syslog.log.1
-Hazem
-r--r--r-- 1 root root 50021 Apr 26 00:00 mail.log
Also, below is the code we use for our log rotation. It might give you some ideas:
#!/bin/sh
mv -f /var/adm/syslog/auth.log /var/adm/syslog/auth.log.1
mv -f /var/adm/syslog/mail.log /var/adm/syslog/mail.log.1
mv -f /var/adm/syslog/syslog.log /var/adm/syslog/syslog.log.1
kill -HUP `cat /var/run/syslog.pid`
rm -f /var/adm/syslog/auth.log.1.gz
gzip /var/adm/syslog/auth.log.1
rm -f /var/adm/syslog/mail.log.1.gz
gzip /var/adm/syslog/mail.log.1
rm -f /var/adm/syslog/syslog.log.1.gz
gzip /var/adm/syslog/syslog.log.1
-Hazem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2004 03:27 AM
тАО04-26-2004 03:27 AM
Re: logrotate problems
Ok...thx a log for your help
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.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP