HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Cleaning system log
Operating System - HP-UX
1833059
Members
2684
Online
110049
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
Forums
Discussions
Discussions
Discussions
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
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
07-06-2007 07:23 PM
07-06-2007 07:23 PM
Cleaning system log
Hi,
My system's /var/adm/syslog/mail.log file was large, I cleared the file with : >mail.log
Is this the correct way of clearing system log files ? Do I need to stop the mail daemon before clearing the logs.
My system's /var/adm/syslog/mail.log file was large, I cleared the file with : >mail.log
Is this the correct way of clearing system log files ? Do I need to stop the mail daemon before clearing the logs.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2007 07:45 PM
07-06-2007 07:45 PM
Re: Cleaning system log
check your previous thread
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1142690
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1142690
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2007 03:44 AM
07-07-2007 03:44 AM
Re: Cleaning system log
Hi Vicky,
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 bytes you can use logrotate utility.
Regards,
Fat
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-11-2007 05:33 AM
07-11-2007 05:33 AM
Re: Cleaning system log
Vicky:
You could also use SAM if it's easier for you.
Just go to Routine Tasks, then System Lof Files, and should be able to select the logs that you would like to clear.
Then go to Actions--Trim.
That should take care of that.
Regards,
NM
You could also use SAM if it's easier for you.
Just go to Routine Tasks, then System Lof Files, and should be able to select the logs that you would like to clear.
Then go to Actions--Trim.
That should take care of that.
Regards,
NM
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
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP