- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: syslog.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
тАО12-28-2000 09:13 AM
тАО12-28-2000 09:13 AM
syslog.log
Thanks
- Tags:
- syslog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2000 09:23 AM
тАО12-28-2000 09:23 AM
Re: syslog.log
#!/bin/sh
dt=`date '+%m%d%y'`
cp /var/adm/syslog/syslog.log syslog.$dt
or maybe mv, but I always prefer to copy rather than move.
You would then put an entry in your crontab to run it once a week, on the day of the week and time of the day to be run. For example, to run it on Sundays at 2am --
0 2 * * 0 filenamewithpathname > /dev/null 2>&1
HTH
Mo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2000 09:28 AM
тАО12-28-2000 09:28 AM
Re: syslog.log
Here you have a good url where you can find handy information.
ftp://contrib:9unsupp8@hprc.external.hp.com/sysadmin/cronjobs
Have Fun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2000 11:54 PM
тАО12-28-2000 11:54 PM
Re: syslog.log
Maureens solution is good, but on reboot or when you restart syslog deamon syslog.log will move to syslog.old. If you want to have syslog.log in Maureens format you should put an entry in /sbin/init.d/syslogd
dt=`date '+%m%d%y'`
and change the line
mv /var/adm/syslog/syslog.log /var/adm/syslog/OLDsyslog.log
to
mv /var/adm/syslog/syslog.log /var/adm/syslog/syslog.$dt
Regards,
Matjaz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-29-2000 02:04 AM
тАО12-29-2000 02:04 AM
Re: syslog.log
After mv syslog.log file you must restart syslogd daemon.
Syslogd will keep on writing on your syslog.log moved file because dont close his file descriptor.
So send HUP signal to syslogd PID to force reconfiguration of syslogd.
kill -HUP `cat /var/run/syslog.pid`
See man syslogd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-02-2001 03:20 AM
тАО01-02-2001 03:20 AM
Re: syslog.log
/sbin/rc3.d/Sxxxcopy_syslog -> /sbin/init.d/copy_syslog
/sbin/rc2.d/Kxxxcopy_syslog -> /sbin/init.d/copy_syslog .
The script copy_syslog in the stop section will have:
cat /var/adm/syslog/syslog.log | grep -v bootpd | grep -v repeated > DIR/syslog.`date +%y%m%d `
federico