- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Syslog log rotation
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
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
тАО05-09-2008 04:35 AM
тАО05-09-2008 04:35 AM
redundant. Solaris has a command utility
"logadm" and corresponding "logadm.conf"
which effectively allows log rotation and
switching based on time, effectively
allowing log rotation for syslog and message
logs (very useful as a syslog server).
Is there an equivalent native function
within HPUX ?
Thanks in advance for your help and/or
suggestions.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2008 05:06 AM
тАО05-09-2008 05:06 AM
Solutionhttp://hpux.cs.utah.edu/hppd/hpux/Sysadmin/logrotate-2.5
Most system logs in HP-UX are rolled once at bootup. If you want additional rotations you have to come up with your own method. It is not difficult once you know the specifics of each log and how to handle open files.
You may want to check
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=799136
Bill has posted a script there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2008 05:23 AM
тАО05-09-2008 05:23 AM
Re: Syslog log rotation
See also:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=382206
You can schedule the logrotate to run at specific time of the day to perform the required maintenance - using cron.
good luck!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2008 10:52 AM
тАО05-09-2008 10:52 AM
Re: Syslog log rotation
DATE=`date +%m%d%y`
ARCH=
# Roll over syslog.log
#
cd /var/adm/syslog
umask 022
cp syslog.log log.last
cp /dev/null syslog.log
/bin/kill -HUP `/bin/cat /var/run/syslog.pid`
uniq log.last $ARCH/syslog.${DATE}
rm log.last
#
NOTE: This way I can search all log files for a given month using one grep command. Since the month is the first two digits all I have to do is grep on syslog.04???? for all of Aprils syslog files.
Schedule this to run at 2359 and it will close out the day and start a new syslog.log file.
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2008 06:06 AM
тАО05-14-2008 06:06 AM
Re: Syslog log rotation
to implement the logrotate utility but have
run into one issue that may be related to the config file (as shown):
/var/adm/syslog/syslog.log {
rotate 10
daily
create
ifempty
noolddir
copytruncate
postrotate
/sbin/killall -HUP syslogd
endscript
}
My problem (is) the syslog.log.1 file is
created and the syslog.log file continues
to exist, however the syslog.log file is
zero (0) length and the syslog.log.1 file
continues to be the active capturing log
file. Note I am using the 'daily' option
for testing and the copytruncate parameter
is (apparently) not supported in HPUX.
Thanks again...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2008 06:12 AM
тАО05-14-2008 06:12 AM
Re: Syslog log rotation
/var/adm/syslog/syslog.log {
rotate 10
daily
create
ifempty
noolddir
copytruncate
postrotate
/bin/kill -HUP `/bin/cat /var/run/syslog.pid`
endscript
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2008 06:13 AM
тАО05-14-2008 06:13 AM
Re: Syslog log rotation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2008 06:43 AM
тАО05-19-2008 06:43 AM
Re: Syslog log rotation
extremely helpful. I am almost 'there'!
I have one remaining (hopefully small)
issue that I did not mention earlier. I
am also looking to trim the mail log.
My problem (is) the mail.log.1 file is
created, the mail.log file continues
to exist, however the mail.log file is
zero (0) length and the mail.log.1 file
continues to be the active capturing log
file. The .conf file file follows:
/var/adm/syslog/mail.log {
rotate 30
daily
create
ifempty
noolddir
#copytruncate
postrotate
/bin/kill -HUP `/usr/bin/head -1 /etc/mail/sendmail.pid`
endscript
}
The file listing follows:
-r--r--r-- 1 root root 0 May 19 00:01 mail.log
-r--r--r-- 1 root root 791 May 19 05:05 mail.log.1
-r--r--r-- 1 root root 1097 May 18 05:20 mail.log.2
-r--r--r-- 1 root root 791 May 17 05:05 mail.log.3
-r--r--r-- 1 root root 791 May 16 05:05 mail.log.4
-r--r--r-- 1 root root 1848 May 15 09:56 mail.log.5
-r--r--r-- 1 root root 7436032 May 14 05:05 mail.log.6
Thanks (again) in advance for your
help and suggestions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2008 07:33 AM
тАО05-19-2008 07:33 AM
Re: Syslog log rotation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2008 08:00 AM
тАО05-19-2008 08:00 AM
Re: Syslog log rotation
http://freshmeat.net/projects/perl-logrotate/
works for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2008 05:50 AM
тАО06-02-2008 05:50 AM
Re: Syslog log rotation
and suggestions.
I was not 'quite' able to solve the
mail.log rotation issue, but the
syslog rotation operates perfectly.