Operating System - HP-UX
1832617 Members
3516 Online
110043 Solutions
New Discussion

Re: What's the point of /var/adm/messages on HPUX?

 
Bart_6
Advisor

What's the point of /var/adm/messages on HPUX?

What's the point of /var/adm/messages and dmesg on HPUX when you have the syslog containing the information you want?
oh no.... not THAT again
16 REPLIES 16
Umapathy S
Honored Contributor

Re: What's the point of /var/adm/messages on HPUX?

I have never seen messages and dmesg on hpux. Can I know which product/fileset contains these two. As far as I know syslog.log is the main log in hpux.

Umapathy
Arise Awake and Stop NOT till the goal is Reached!
Sunil Sharma_1
Honored Contributor

Re: What's the point of /var/adm/messages on HPUX?

Hi,

dmesg is work before syslogd start becoz syslog starts at run level 2.

not sure about /var/adm/messages (in my system 10.20 this file is not there even).

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Michael Tully
Honored Contributor

Re: What's the point of /var/adm/messages on HPUX?

dmesg prints the current buffer
/var/adm/messages is NOT the default messages file on HPUX.
/var/adm/syslog/syslog.log is.
To tell have a look at /etc/syslog.conf file which defines what is captured and to where.
Anyone for a Mutiny ?
Robert-Jan Goossens
Honored Contributor

Re: What's the point of /var/adm/messages on HPUX?

Hi Bart,

Could you check your root user crontab for the line

# /usr/sbin/dmesg - >> /var/adm/messages

If that is configured, dmesg will append the messages file.

Hope this helps,
Robert-Jan
Bart_6
Advisor

Re: What's the point of /var/adm/messages on HPUX?

As far I know the dmesg command is a unix default.
Is it correct in assuming that output generated by dmesg also appears in the syslog (as configured in the /etc/syslog.conf). So the dmesg command is virtually useless?

oh no.... not THAT again
Bart_6
Advisor

Re: What's the point of /var/adm/messages on HPUX?

In other words....

There's no need to maintain a /var/adm/messages file and there is no reason to use the dmesg command if you have your syslog configured correctly?
oh no.... not THAT again
John Carr_2
Honored Contributor

Re: What's the point of /var/adm/messages on HPUX?

dmesg command is very useful you can issue it from any where saving having to change directory to read output file. The fact that it computes incrementally means you only display messages since you last executed the command ie only the ones you really want to read. The messages file is created through the output of dmesg vcheck cron. A full explanation of this can be attained by man dmesg.

:-) John.
Robert-Jan Goossens
Honored Contributor

Re: What's the point of /var/adm/messages on HPUX?

Hi again,

Yes the messages reported by dmesg will also be written to the syslog file. No dmesg is not an unusefull command because it will report on demand specific system errors, while syslog reports all kind off errors (login, ftp etc).

Dmesg is usefull when there is a sudden problem, if you need to search the syslog file it will take more time.

Regards,
Robert-Jan
Alex Glennie
Honored Contributor

Re: What's the point of /var/adm/messages on HPUX?

As to the var/adm/messages file .... anything in your crontab file to explain it ?
Bart_6
Advisor

Re: What's the point of /var/adm/messages on HPUX?

The crontab has indeed the dmesg entry.
I'm irged to delete it because it has nu direct use....
oh no.... not THAT again
Robert-Jan Goossens
Honored Contributor

Re: What's the point of /var/adm/messages on HPUX?

PS,

I have setup the messages file too, we are running as mixed system env ( solaris, aix and hpux ) admins tend to search the messages file if there is a panic situation. (:-)

Robert-Jan
Fabio Ettore
Honored Contributor

Re: What's the point of /var/adm/messages on HPUX?

Hi,

I know that /var/adm/messages is on Tru64, it is the equivalent of syslog.log of HP-UX.
Instead dmesg is a quick command for diagnostic messages and form error log, it usually reports messages that syslog.log contains too.

I hope this helps you.

Best regards,
Ettore
WISH? IMPROVEMENT!
John Carr_2
Honored Contributor

Re: What's the point of /var/adm/messages on HPUX?

Bart

you may think its of no use to you but another sys admin working in your absense having to deal with a problem may like to have this. Is there really anything to be gained by removing the service ?

:-) John.
Jakes Louw
Trusted Contributor

Re: What's the point of /var/adm/messages on HPUX?

AFAIAC, dmesg is a good supplemental diagnostic tool with Syslogger and STM.
The only drawback is that it works with a buffer, and that is the reason for the redirection from crontab using the "dmesg -" incremental switch to display only messages since the last call.

I have had cases where I've picked up problems (especially H/W) quicker from a remsh call to dmesg than from trying to filter out what's useful in the syslog.
Trying is the first step to failure - Homer Simpson
Pete Randall
Outstanding Contributor

Re: What's the point of /var/adm/messages on HPUX?

Take a look at the man page for dmesg for an explanation of the /var/adm/messages file:

If the - argument is
specified, dmesg computes (incrementally) the new messages since the
last time it was run and places these on the standard output. This is
typically used with cron (see cron(1)) to produce the error log
/var/adm/messages by running the command:

/usr/sbin/dmesg - >> /var/adm/messages

every 10 minutes.


Pete

Pete
Cheryl Griffin
Honored Contributor

Re: What's the point of /var/adm/messages on HPUX?

/var/adm/messages is a old cross-platform unix standard which we've gotten a bit away from since we use dmesg and syslog. Some unix die-hards want it, some don't.

Check out which platforms use it at the Rosetta Stone. http://bhami.com/rosetta.html

"Downtime is a Crime."