LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-06-2009, 12:26 PM   #1
hfloresl
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Rep: Reputation: 0
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.
 
Old 01-07-2009, 04:51 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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

Last edited by colucix; 01-07-2009 at 04:52 AM.
 
Old 01-08-2009, 08:29 AM   #3
hfloresl
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 01-08-2009, 10:19 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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
 
Old 01-08-2009, 12:39 PM   #5
hfloresl
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 01-09-2009, 01:34 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,348

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Example from man page:
Code:
       unix$ pkill -HUP syslogd
ie drop the 'SIG' string.
 
Old 01-09-2009, 09:48 PM   #7
hfloresl
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
OK, that command is ok now, but the syslogd is not writting the message log yet
 
Old 01-12-2009, 08:18 AM   #8
hfloresl
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Hey guys, what else can I do?. The message is not writting yet, I restarte syslogd service buy nothing works!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why a file writting command resulting an empty file? marhen Programming 9 05-05-2008 03:49 AM
Reading text file-writting binary file cdog Programming 5 06-13-2006 11:56 AM
writting to file in php blitzX Programming 2 01-16-2005 02:57 PM
Is a file in writting ? stephnane AIX 3 08-02-2004 11:17 PM
Is a file in writting stephnane Linux - General 2 07-30-2004 09:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration