- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: HPUX syslog 11.23
Operating System - HP-UX
1748123
Members
3359
Online
108758
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
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
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
тАО05-24-2011 06:33 AM
тАО05-24-2011 06:33 AM
HPUX syslog 11.23
Hi All,
As we know hpux will move syslog.log to OLDsyslog.log after a reboot ..so we have only OLDsyslog.log and syslog.log after reboot.How to make a custom startup script that will move the OLDsyslog.log file away to a safe location each time the system boots, so that there will be no need to overwrite OLDsyslog.log when the system boots next time?..
what entries to be made in starup scripts and where is the syslog scripts resides ?
rgds,trng
As we know hpux will move syslog.log to OLDsyslog.log after a reboot ..so we have only OLDsyslog.log and syslog.log after reboot.How to make a custom startup script that will move the OLDsyslog.log file away to a safe location each time the system boots, so that there will be no need to overwrite OLDsyslog.log when the system boots next time?..
what entries to be made in starup scripts and where is the syslog scripts resides ?
rgds,trng
administrator
- Tags:
- syslog
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2011 06:51 AM
тАО05-24-2011 06:51 AM
Re: HPUX syslog 11.23
The script in charge of copying syslog.log to OLDsyslog.log is the syslogd startup script /sbin/init.d/syslogd
My suggestion is not to mess with this script at all, but write a site-specific script, assign it proper S### and K### symbolic links to it in /etc/rc.#.d directory and run this script as the last step of your rc scripts during reboot. In that script you can do whatever housekeeping that your heart desires without impacting the boot of the system.
Consider something going wrong while your are saving your OLD Syslog to some other location. You may end up running a system without a syslog and don;t notice it until it is too late. Avoid it like a plague.
My suggestion is not to mess with this script at all, but write a site-specific script, assign it proper S### and K### symbolic links to it in /etc/rc.#.d directory and run this script as the last step of your rc scripts during reboot. In that script you can do whatever housekeeping that your heart desires without impacting the boot of the system.
Consider something going wrong while your are saving your OLD Syslog to some other location. You may end up running a system without a syslog and don;t notice it until it is too late. Avoid it like a plague.
________________________________
UNIX because I majored in cryptology...
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-25-2011 02:34 AM
тАО05-25-2011 02:34 AM
Re: HPUX syslog 11.23
Hi,
You can use the following script to retain your 4 copies of syslogs by scheduling this in cron at your convenient.
if [[ -a /home/dir/syslog.4.Z ]]; then
rm /home/dir/syslog.4.Z
fi
cd /var/adm/syslog
for i in 3 2 1
do
let j=$i+1
if [[ -a /home/dir/syslog.$i.Z ]]; then
mv /home/dir/syslog.$i.Z /home/dir/syslog.$j.Z
fi
done
# Move current file to first, create new syslog.log, and restart syslogd.
mv syslog.log syslog.1
touch /var/adm/syslog/syslog.log
kill -HUP `cat /var/run/syslog.pid`
# Compress old file and exit.
compress syslog.1
exit
Hope this helps,
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP