/var/log file system and monitoring health of system
Hi
I'm trying to understand how to monitor health of redhat system. I know the follwoing : ----------------------- /var/log/messages ---> error messages related system and its services /var/log/boot ---> init error messages /var/log/dmesg ---> boot error messages Questions : ------------ 1. So if I want to seee whether some disk have I/O errors I read /var/log/dmesg ? 2. It depends whether a service is configured to use syslog or not by using 'logger'cmd or syslog API ? 3. What is 'dmesg' cmd for ? Is'nt the same as /var/log/dmesg ? thx forl help |
Hi,
2. Not sure about it, perhaps someone else has some explanation on it. 1&3. It's the same log. Disk I/O and SMART related messages usually go to this log. |
Quote:
Please see code below. Output from dmesg cmd last 16 lines : Code:
[ 112.932370] wlan0: direct probe to AP 00:23:33:1f:28:a3 (try 1) Code:
Apr 29 19:27:35 ibmr61e kernel: [ 29.131575] Bluetooth: SCO socket layer initialized It look like both have some common messages but each one have some additional messages too. thx for help. |
--
Sorry, I think I have misread the question; dmesg and /var/log/messages (I thought it was /var/log/dmesg) are different. /var/log/messages is written to by syslogd daemon with verbosity level defined in /etc/syslog.conf. On the other hand, dmesg is a kernel ring buffer message and not dependent on syslogd. dmesg invocation defined in /etc/rc.sysinit (usually goes to /var/log/dmesg) and its verbosity level set in /etc/sysconfig/init (in Red Hat). I think the loglevel/verbosity level setting that made their output different. |
Sorry it was my mistake.
I wanted to know what is the difference between output from 'dmesg'cmd and /var/log/dmesg file. I see that there is not the same info. output from dmesg cmd : Code:
[ 5621.991005] [UFW BLOCK] IN=wlan0 OUT= MAC=00:1c:bf:6f:a9:57:00:23:33:1f:28:a0:08:00 SRC=193.17.41.111 DST=10.0.250.55 LEN=40 TOS=0x00 PREC=0x00 TTL=56 ID=0 DF PROTO=TCP SPT=80 DPT=41444 WINDOW=0 RES=0x00 RST URGP=0 Code:
[ 26.418966] Registered led device: iwl-phy0::radio |
--
/var/log/dmesg gets written when the system boots, near the end of sysinit process to enable us to see what kernel sees at booting phase. From /etc/rc.sysinit : Code:
# Now that we have all of our basic modules loaded and the kernel going, |
I understand.
What kind of useful info admin can find with dmesg cmd ? Because I/O errors and SMART can be found in /var/log/messages. |
--
Occasionally it might be useful to have a booting-phase information from the kernel ring saved somewhere, in this case, in /var/log/dmesg. Beyond that, since syslogd catches kernel messages from level .info all the way up to .panic, I don't think there's so much significance in differentiate between the two. After all, the default kernel loglevel as defined in /etc/sysconfig/init will be reset by syslogd configuration in /etc/syslog.conf. From /etc/sysconfig/init : Code:
# default kernel loglevel on boot (syslog will reset this) Code:
*.info;mail.none;authpriv.none;cron.none /var/log/messages |
All times are GMT -5. The time now is 10:58 AM. |