Operating System - HP-UX
1753455 Members
5957 Online
108794 Solutions
New Discussion юеВ

Alert not getting logged in /var/adm/syslog/mail.log

 
SOLVED
Go to solution
boomerang
Frequent Advisor

Alert not getting logged in /var/adm/syslog/mail.log

Hi Admins,

I had purged the mail.log after that i had restarted sendmail.Now mail alerts are not getting logged in /var/adm/syslog/mail.log

OS : HP-UX 11.23

The below entry is already present in /etc/syslog.conf

mail.debug /var/adm/syslog/mail.log

Please advise.
7 REPLIES 7
Suraj K Sankari
Honored Contributor

Re: Alert not getting logged in /var/adm/syslog/mail.log

Hi,
Check your mail demon is running or not

$ ps -aef | grep -i mail
root 963 1 0 01:58:23 ? 0:06 sendmail: accepting connections on port 25


Suraj
boomerang
Frequent Advisor

Re: Alert not getting logged in /var/adm/syslog/mail.log

Yes its running.

>ps -ef | grep sendmail
root 236 1 0 10:02:42 ? 0:00 sendmail: accepting connections
rariasn
Honored Contributor
Solution

Re: Alert not getting logged in /var/adm/syslog/mail.log

Hi,

# /sbin/init.d/syslogd stop

# /sbin/init.d/syslogd start

rgs,
Bill Hassell
Honored Contributor

Re: Alert not getting logged in /var/adm/syslog/mail.log

Have you edited /etc/syslog.conf recently? There can be no spaces in this file, only tabs. To see the tabs and spaces:

cat -tv /etc/syslog.conf

There should be nothing but ^I between items in this file. A space causes the entire line to be ignored. To test the mail facility in syslog, use:

logger -p mail.info "Testing mail"
tail /var/adm/syslog/mail.log

Also check the tail of syslog.log.


Bill Hassell, sysadmin
boomerang
Frequent Advisor

Re: Alert not getting logged in /var/adm/syslog/mail.log

Hi rariasn,

Your tip solved ma problem.Many thanks


Hi Bill /Suraj,

Thanks for your valueable feedback and time.
Viktor Balogh
Honored Contributor

Re: Alert not getting logged in /var/adm/syslog/mail.log

boomerang, maybe you want to know why it has happened: by purging you simply deleted the logfile in use. after re-creating it, the logs were still written to the old inode, and the newly created file had got a new inode number. that's why you didn't see any logs in it. next time you must purge the logs like this:

# > /var/adm/syslog/mail.log

this way you don't need to restart the service. ok, i don't get any points for this, but - WHO CARES?
****
Unix operates with beer.
boomerang
Frequent Advisor

Re: Alert not getting logged in /var/adm/syslog/mail.log

Hello Viktor,

Thanks,It was very informative.