- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- syslog stops writing to log after approx 30 days
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
03-03-2003 06:56 AM
03-03-2003 06:56 AM
syslog stops writing to log after approx 30 days
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 06:58 AM
03-03-2003 06:58 AM
Re: syslog stops writing to log after approx 30 days
Is your syslogd daemon running? Maybe you have a script that runs once a month to clean up logs files that is cleaning up the syslog and not restarting syslogd?
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 06:58 AM
03-03-2003 06:58 AM
Re: syslog stops writing to log after approx 30 days
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 07:01 AM
03-03-2003 07:01 AM
Re: syslog stops writing to log after approx 30 days
Is syslogd still running at the time its stops writing? Check /dev/log and klog:
# ll /dev/log /dev/klog
/dev/log is named pipe and should be 0:
prw-rw-rw- 1 root root 0 Mar 3 9:10 /dev/log
The major number from your list for klog, 189 in this example should match the kernel driver:
crw------- 1 bin bin 189 0x000000 Nov 21 10:27 /dev/klog
# lsdev 189
Character Block Driver Class
189 -1 klog pseudo
If not you may need to recreate the device.
More details will help diagnose the problem.
Cheryl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 07:02 AM
03-03-2003 07:02 AM
Re: syslog stops writing to log after approx 30 days
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 07:04 AM
03-03-2003 07:04 AM
Re: syslog stops writing to log after approx 30 days
Regards,
RZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 07:19 AM
03-03-2003 07:19 AM
Re: syslog stops writing to log after approx 30 days
kill -HUP `cat /var/run/syslog.pid`
man syslogd
Each time you run a rm for any file created by syslogd you should send a signal to syslogd.
deleting and recreating the file is not valid.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 07:24 AM
03-03-2003 07:24 AM
Re: syslog stops writing to log after approx 30 days
Joe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 07:42 AM
03-03-2003 07:42 AM
Re: syslog stops writing to log after approx 30 days
You would need to check these pipe files /dev/log and /dev/klog while your syslog stopped writing.
If your system logs too much, then keeping one big file is not a good idea. You may want to trim your syslog and recycle it periodically. Here is a sample script may give you an idea how to do it.
//
#!/usr/bin/ksh
FILE=/var/adm/syslog/syslog.log
/sbin/init.d/syslogd stop
i=7
while [ $i -gt 0 ]
do
(( j = $i - 1 ))
if [ -f ${FILE}.${j} ]
then
mv ${FILE}.${j} ${FILE}.${i}
fi
(( i = $i - 1 ))
done
mv $FILE $FILE.1
/sbin/init.d/syslogd start
//
Put it in cron and run it probably once in a week or so. Change the value of i to reflect how many copies of syslog you want to keep.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2003 10:29 AM
03-04-2003 10:29 AM
Re: syslog stops writing to log after approx 30 days
--Copied log file to archive.
--Removed log file.
--Touched log file to recreate.
Of course, when you remove a log file from underneath a running daemon, the daemon keeps the file handle open and happily writes to the old handle. What you see is the new file created by the script, empty. When you restart the daemon, it releases the handle and starts writing to the new file.