1829693 Members
6233 Online
109992 Solutions
New Discussion

/var/adm/messages

 
SOLVED
Go to solution
Angus John-Phillips
Occasional Advisor

/var/adm/messages

Hi,

I have deleted my /var/adm/message file by mistake so copied back the prev with cp /var/adm/message.prev /var/adm/message but this is not being written to could you please advise.

Thanks,
Angus
14 REPLIES 14
Robert-Jan Goossens
Honored Contributor
Solution

Re: /var/adm/messages

Hi Angus,

/sbin/init.d/syslogd stop
/sbin/init.d/syslogd start

regards.
Robert-Jan
Ron Irving
Trusted Contributor

Re: /var/adm/messages

Hi!!

Perhaps a permissions problem?

Hope this helps.

ron
Should have been an astronaut.
Yogeeraj_1
Honored Contributor

Re: /var/adm/messages

hi angus!

if you have not already restarted the syslogd as mentioned by Robert-Jan, you can verify the file permissions by doing:

ll /var/adm/message*

the permissions for all similar files should be the same.

you should have done the following:
either
restart as mentioned by Robert-Jan
or
touch /var/adm/message
chown root:root /var/adm/message
chmod 600 /var/adm/message

(also normally, if you had to do a copy, you should have run "cp -p" instead or "cp")


hope this helps too!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Angus John-Phillips
Occasional Advisor

Re: /var/adm/messages

Hi,

Thanks for getting back to me.

I have checked the permissions and stopped and restarted syslogd but there is still nothing writing to /var/adm/messages file any other ideas.

I have also touched the file as mentioned.

Thanks,
Angus
Robert-Jan Goossens
Honored Contributor

Re: /var/adm/messages

Hi again,

could you post the /etc/syslog.conf file?

Are you sure you are using the /var/adm/messages file in the syslog.conf and not the default /var/adm/syslog/syslog.log file?

Robert-Jan
Steven E. Protter
Exalted Contributor

Re: /var/adm/messages

Shalom Angus,

Someone "Linuxed" this system by modifying syslog.conf

This is a very bad idea, because anyone you bring in to look at a problem or cover for a vacation will not be able to quickly identify the syslog file.

I recommend you change syslog.conf to the default location /var/adm/syslog/syslog.log

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Yogeeraj_1
Honored Contributor

Re: /var/adm/messages

hi again angus,

Was this file being updated previously??

Unless you have a crontab entry that runs command:
/usr/sbin/dmesg - >> /var/adm/messages

every 10 minutes, nothing will be logged to this file. (see man dmesg)

As mentioned by Robert-Jan above, the default location of messages is /var/adm/syslog/syslog.log and this is defined in the /etc/syslog.conf

please check and revert back!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Ian Box
Advisor

Re: /var/adm/messages

It's quite likely that /var/adm/messages isn't written by syslogd, but by a cron entry like: 0,10,20,30,40,50 * * * * /usr/sbin/dmesg - >>/var/adm/messages

If it's not being written check the cron entry and the file /var/adm/msgbuf, which is a scratchpad used by dmesg -. I think the latter can just be replaced with an empty file if it has been deleted or corrupted.

Ian
Angus John-Phillips
Occasional Advisor

Re: /var/adm/messages

Hi,

Thanks for getting back I have enclosed the syslog.conf file for you to look at.

root> /var/adm # ls -ltr /var/adm/messages
-rw-r--r-- 1 root root 0 Apr 2 14:12 /var/adm/messages
root > /var/adm # ls -ltr /var/adm/messages
-rw-r--r-- 1 root root 0 Apr 2 14:12 /var/adm/messages
root > /var/adm # cd /etc
root > /etc # ls -ltr syslog*
-rw-r--r-- 1 root other 1001 Jun 9 2004 syslog.conf.old
-rw-r--r-- 1 root sys 1038 Jun 9 2004 syslog.conf
lrwxrwxrwx 1 root other 21 Apr 2 14:11 syslog.pid -> ../var/run/syslog.pid

Thanks,
Angus
Tim Nelson
Honored Contributor

Re: /var/adm/messages

typcially syslogd is configured to write log entries to /var/adm/syslog/syslog.log.

As mentioned please send your /etc/syslog.conf to determine where the syslogd is logging to
Tim Nelson
Honored Contributor

Re: /var/adm/messages

That is a crazy looking syslog.conf file. Looks like it is from Solaris system.

Typical looks like this:
# @(#)B.11.11_LR
#
# syslogd configuration file.
#
# See syslogd(1M) for information about the format of this file.
#
mail.debug /var/adm/syslog/mail.log
*.info;mail.none /var/adm/syslog/syslog.log
*.alert /dev/console
*.alert root
*.emerg *

Torsten.
Acclaimed Contributor

Re: /var/adm/messages

Are you sure your server runs hp-ux???

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Patrick Wallek
Honored Contributor

Re: /var/adm/messages

This is definitely from a Solaris system (/* SunOS 5.0 */). It would have been helpful if you had mentioned that in the initial post.
Aashique
Honored Contributor

Re: /var/adm/messages

Hi,
you can just make the message file using touch command.
Then restart the service:
/sbin/init.d/syslogd stop
/sbin/init.d/syslogd start

Thanks
Aashique