1846821 Members
11275 Online
110256 Solutions
New Discussion

Re: syslog.log file

 
mhbd
New Member

syslog.log file

syslog.log file in hp-ux system contains various logs with timstamp without year. Can anyone help to modify syslog daemon to include Year in syslog .log file.

Thanks.
8 REPLIES 8
Jeff_Traigle
Honored Contributor

Re: syslog.log file

No option I'm aware of will place the year in the timestamp.
--
Jeff Traigle
Charles Harris
Super Advisor

Re: syslog.log file

Hi,

You could try using a replacement, I can't remeber if it supports year logging but it maybe worth a look:
http://hpux.cs.utah.edu/hppd/hpux/Networking/Admin/syslog_ng-1.6.7/
Carlos Roberto Schimidt
Regular Advisor

Re: syslog.log file

Dont make sense put year in syslog.log, because syslog is clear after ever boot.

I used to rotation my logs, where I use as sufix a timestamp.
Charles Harris
Super Advisor

Re: syslog.log file

Carlos,

You reboot your HPUX servers!? ;-P

sorry, couldn't resist.
Victor BERRIDGE
Honored Contributor

Re: syslog.log file

Hi
I agree with the previous, at each reboot it started again and if you dont reboot the size of the file will make almost unusable...
You can adopt a logrotate strategy, or if paranoid (like me) write your own trimming system and stop/start your syslog from time to time in order to have some archives...


All the best
Victor
A. Clay Stephenson
Acclaimed Contributor

Re: syslog.log file

One option is to use the "ng" (Next Generation) of syslog. It replaces the existing syslogd. It is much more configurable and you could modify the source to format the log messages any way you like.

http://hpux.cs.utah.edu/hppd/hpux/Networking/Admin/syslog_ng-1.6.7/

The downside to "improving" the message format is that you will like break any scripts or programs that expect the standard format.
If it ain't broke, I can fix that.
Victor BERRIDGE
Honored Contributor

Re: syslog.log file

Also,
There is nothing stopping you to add a cron job that writes to syslog.log every day(/week/month) say at 1 AM doing a date>>/var/adm/syslog/syslog.log ....


Carlos Roberto Schimidt
Regular Advisor

Re: syslog.log file

Charles,

Yes, I do. You never reboot your server?

I have a problem with vpar where was developed specific patch for workaround, but I will have to aplly new version from vpar (february/2006), because i work with very large configuration where happen problems wich nobody still pass.

You can install new version form VPAR without reboot? If you can, congratulations.

But I have SG for avoid unavailability.

sorry, couldn't resist too.