12-30-2008
I'm not supposed to touch any system related configuration as the same is maintained by different set of guys (administrator group) and they keep it optimized as per their requirements.
Still will you please tell me how can I get the /var/log/messages data redirected to my daemon (my app will run as a daemon); if possible without any change in the config files for the syslog daemon?
Is it possible that I get the data directly from the /dev/log socket as a copy of the messages?
If I could get a way as to hook to /dev/log directly; its the most preffered way.
I had initially tried even by opening files and calling select() on the descriptors but I never get the intimation of the arrival of the new data into the /var/log/messages file from select().
I tested this by logging messages using logger utility and also wrote my own logger program but select() didn't report me of any new data logs.
Last edited by Praveen_218; 12-30-2008 at 07:52 AM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Which programm, deamon or script is responsible for filling the file /var/log/messages ? (1 Reply)
Discussion started by: Cozmic
1 Replies
2. Solaris
hi sirs
can u tell the difference between /var/log/syslogs and /var/adm/messages
in my working place i am having two servers.
in one servers messages file is empty and syslog file is going on increasing..
and in another servers message file is going on increasing but syslog file is... (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies
3. UNIX for Advanced & Expert Users
The /var/adm/messages in Solaris seem to log more system messages/errors compared to /var/log/messages in Linux.
I checked the log level in Linux and they seem OK.
Is there any other log file that contains the messages or is it just that Linux doesn't log great many things? (2 Replies)
Discussion started by: gomes1333
2 Replies
4. Solaris
Hi,
Is the contents in /var/log/syslog and /var/adm/messages are same??
Regards (3 Replies)
Discussion started by: vks47
3 Replies
5. Shell Programming and Scripting
How can view log messages between two time frame from /var/log/message or any type of log files.
when logfiles are very big and especially many messages with in few minutes, I would like to display log messages between 5 minute interval.
Could you pls give me the command? (1 Reply)
Discussion started by: johnveslin
1 Replies
6. UNIX for Dummies Questions & Answers
Whenever a user uses su I get the following error messages in /var/log/messages:
Nov 23 04:24:55 <REMOVED> abrt: saved core dump of pid 26141 (/usr/libexec/fprintd) to /var/spool/abrt/ccpp-1322018695-26141.new/coredump (753664 bytes)
Nov 23 04:24:55 <REMOVED> abrtd: Directory... (3 Replies)
Discussion started by: JakesHat
3 Replies
7. SuSE
How are you?
SUSE V10 and 11.
In /var/log/messages I see these lines in some servers. I'd like to know what causes these errors and how to fix them.
Thank you,
error: PAM: Authentication failure for root from XXXXXXXX
Did not receive identification string from XXXXXXX
Invalid user suse-gm... (2 Replies)
Discussion started by: JDBA
2 Replies
8. Shell Programming and Scripting
Below is my script to log all the command input by any user to /var/log/messages. But I cant achieve the desired output that i want. PLease see below.
function log2syslog
{
declare COMMAND
COMMAND=$(fc -ln -0)
logger -p local1.notice -t bash -i -- "$USER:$COMMAND"
}
trap... (12 Replies)
Discussion started by: invinzin21
12 Replies
9. Shell Programming and Scripting
I have been searching and reading about syslog. I would like to know how to Transfer the logs being thrown into /var/log/messages into another file example /var/log/volumelog.
tail -f /var/log/messages
dblogger: msg_to_dbrow: no logtype using missing
dblogger: msg_to_dbrow_str: val ==... (2 Replies)
Discussion started by: kenshinhimura
2 Replies
10. Red Hat
I am getting a lot of message as follows in /var/log/message files as follows.
messages.1:559:May 4 20:01:56 SERVER2 kernel: session_stat: sync=0 async=33 aretr=0
messages.1:560:May 4 20:02:42 SERVER2 kernel: session_stat: dev=fd:5 state=6 blksize=4096 mmapsize=262144
messages.1:561:May 4... (2 Replies)
Discussion started by: Anjan Ganguly
2 Replies
LEARN ABOUT DEBIAN
ha_logd
HA_LOGD(8) System administration utilitie HA_LOGD(8)
NAME
ha_logd - Logging Daemon for High-Availability Linux
SYNOPSIS
ha_logd [-s] [-k] [-d] [-h] [-c file]
DESCRIPTION
ha_logd is a logging daemon for Linux-HA. It receives messages from a local domain socket /var/lib/heartbeat/log_daemon, and writes them to
appropriate files and syslog if enabled. The reason for utilizing this logging daemon is that occasionally Heartbeat suffers from disk I/O
delays. By sending log messages to a logging daemon, heartbeat can avoid such I/O delays.
OPTIONS
The following options are supported:
-s
Show ha_logd status (either running or stopped)
-k
Stop (kill) the daemon
-d
Daemonize (without this option, ha_logd will run in the foreground)
-h
Show a brief usage message
-c file
Configuration file. You may configure a regular log file, debug log file, log facility, and entity. For details, see the example
ha_logd.cf file found in the documentation.
FILES
o /var/run/ha_logd.pid - PID file
o ha_logd.cf - example configuration file
SEE ALSO
heartbeat(8), ha_logger(1)
AUTHORS
Alan Robertson <alanr@unix.sh>
ha_logd
Guochun Shi <gshi@ncsa.uiuc.edu>
ha_logd
Marowsky-Bree Lars <lmb@suse.de>
ha_logd
Florian Haas <florian.haas@linbit.com>
man page
cluster-glue 1.0.9 December 8, 2009 HA_LOGD(8)