- 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
Forums
Discussions
Discussions
Discussions
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
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
11-13-2006 05:14 AM
11-13-2006 05:14 AM
syslog.log
Can be controlled its growth, that is not manually?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 05:17 AM
11-13-2006 05:17 AM
Re: syslog.log
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 05:19 AM
11-13-2006 05:19 AM
Re: syslog.log
Yes, by the use of a tool such as rotatelog...
http://www.interhack.net/projects/rotatelog/
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 05:22 AM
11-13-2006 05:22 AM
Re: syslog.log
I think Pete has it covered. On reboot the syslog whiches to OLDsyslog.log. Like Pete said you could create a cron job to cat /dev/null the log. How often do you reboot your server? I would'nt want to ran a cron job on syslog. But if you feel the need then it's possiable.
sp,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 06:58 AM
11-13-2006 06:58 AM
Re: syslog.log
Sorry to say but to reboot to clear syslog is not the idea of unix it is not windows.
just trim the log file. see http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=991878
our stop and start the syslog daemon you have the same result as a reboot.
grtz. Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 07:43 AM
11-13-2006 07:43 AM
Re: syslog.log
# crontab -l | grep archive_logs
59 23 * * * /home/root/archive_logs-daily.sh
# cat archive_logs-daily.sh
#!/usr/bin/sh
DATE=$(date +%Y%m%d)
###############################
# syslog
###############################
cd /var/adm/syslog
[ -f syslog.yester.log ] && rm -f syslog.yester.log
mv syslog.log syslog.${DATE}.log
ln -s syslog.${DATE}.log syslog.yester.log
find /var/adm/syslog -name '*.log' -mtime +90 -print | xargs rm -f
# Archive/rotate other logs here...
exit
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 07:47 AM
11-13-2006 07:47 AM
Re: syslog.log
#
# This script file will dynamically assign a new filename, using the current
# datestamp, to the logfile definitions specified in the syslog configuration
# file.
#
###############################################################################
#
CFG_CURR=/etc/syslog.conf
CFG_LAST=/etc/syslog.conf.last
CFG_MSTR=/etc/syslog.conf.master
if [ -e ${CFG_LAST} ]; then /usr/bin/rm -f ${CFG_LAST} > /dev/null 2>&1 ; fi
/usr/bin/mv -f ${CFG_CURR} ${CFG_LAST}
/usr/bin/sed -e "s/\$DATE/`/usr/bin/date +%Y%m%d`/" ${CFG_MSTR} > ${CFG_CURR}
if [ -e ${CFG_CURR} ]; then /usr/bin/kill -s SIGHUP `/usr/bin/cat /var/run/syslog.pid`; fi
/usr/bin/compress -f `/usr/bin/grep "/var/adm/syslog/" ${CFG_LAST} | /usr/bin/sed -e "s/^.*\/var/\/var/"`
/usr/bin/find /var/adm/syslog/ -name *.Z -a ! -mtime -7 -exec /usr/bin/rm {} \;
#
#
###############################################################################
pg /etc/syslog.conf
# @(#) $Revision: 74.1 $
#
# syslogd configuration file.
#
# See syslogd(1M) for information about the format of this file.
#
*.info /var/adm/syslog/syslog_20061113.log
*.alert /dev/console
*.alert root
*.emerg *
/etc/syslog.conf.last same except
*.info /var/adm/syslog/syslog_20061112.log
/etc/syslog.conf.master same except
*.info /var/adm/syslog/syslog_$DATE.log
then run a cron to start the script at midnight
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 07:51 AM
11-13-2006 07:51 AM
Re: syslog.log
new log with date every day
compress yesterdays log
remove logs after 7 days
if you don't want them removed - uncompress them
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 05:08 PM
11-13-2006 05:08 PM
Re: syslog.log
The trick is to manage the logs.
I use a program called savelog which is similar to logrotate.
Caution about syslog.log. It is always open by syslogd. deleting syslog.log will not free up space. Basically I copy syslog.log to a backup name and zero out syslog.log with
echo > syslog.log
On my systems I zero out syslog.log weekly and keep 7 copies (7 weeks).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 05:57 PM
11-13-2006 05:57 PM
Re: syslog.log
handy.
hpux depot can be found here:
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-2.5/