LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Message file is not writting (https://www.linuxquestions.org/questions/linux-server-73/message-file-is-not-writting-695386/)

hfloresl 01-06-2009 12:26 PM

Message file is not writting
 
Hello, I have a server with Red Hat AS 2.1, and the file message is not being updated by syslog service. I restarted the syslog service but I couldn't solve the problem. Please, do you have any suggestion with this task? Thank you in advance.

colucix 01-07-2009 04:51 AM

Can you post the content of /etc/syslog.conf? And what is the output of the following commands?
Code:

ps -fC syslogd
lsof /var/log/messages


hfloresl 01-08-2009 08:29 AM

ok, this is /etc/syslog.conf:

[09:28:30] root-pgccmail:/var/log# cat /etc/syslog.conf
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none;* /var/log/messages

# The authpriv file has restricted access.
authpriv.* /var/log/secure

# Log all the mail messages in one place.
mail.* /var/log/maillog


# Log cron stuff
cron.* /var/log/cron

# Everybody gets emergency messages
*.emerg *

# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler

# Save boot messages also to boot.log
local7.* /var/log/boot.log

# Syslog Switch CISCO
local7.debug /var/log/cisco/switch

===================================================================================

[09:29:03] root-pgccmail:/var/log# ps -fC syslogd
UID PID PPID C STIME TTY TIME CMD
root 8001 1 0 Jan06 ? 00:00:43 syslogd -m 0 -r -x
[09:29:04] root-pgccmail:/var/log# lsof /var/log/messages

==================

Thanks again

colucix 01-08-2009 10:19 AM

Hmmm... the last command shows that /var/log/messages is not opened by syslogd. How did you restart the syslog daemon? Try again using the following command
Code:

pkill -SIGHUP syslogd
this will re-initialize syslogd forcing it to re-read the configuration file. Also check for the presence of /dev/log and issue the following command to see if it is opened by some process
Code:

lsof /dev/log

hfloresl 01-08-2009 12:39 PM

It seems that the opctions of pkill are wrong. About the /dev/log, only syslogd is using it:

pkill -SIGHUP syslogd
pkill: invalid option -- S
Usage: pgrep [-flnvx] [-d DELIM] [-P PPIDLIST] [-g PGRPLIST] [-s SIDLIST]
[-u EUIDLIST] [-U UIDLIST] [-G GIDLIST] [-t TERMLIST] [PATTERN]


[13:35:32] root-pgccmail:/var/log# lsof /dev/log
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
syslogd 8001 root 0u unix 0xf5d54080 43391350 /dev/log

chrism01 01-09-2009 01:34 AM

Example from man page:
Code:

      unix$ pkill -HUP syslogd
ie drop the 'SIG' string.

hfloresl 01-09-2009 09:48 PM

OK, that command is ok now, but the syslogd is not writting the message log yet

hfloresl 01-12-2009 08:18 AM

Hey guys, what else can I do?. The message is not writting yet, I restarte syslogd service buy nothing works!


All times are GMT -5. The time now is 06:58 PM.