[Linux-cluster] How does log option work in RHEL5 cluster
Lon Hohberger
lhh at redhat.com
Wed Jul 25 14:52:19 UTC 2007
On Tue, Jul 24, 2007 at 03:13:20PM -0400, siman hew wrote:
> I got confused with log option setting in cluster.conf.
>
> I specified log_level 3 in tag rm, verify with ccs_test, but does not look
> like it works as expected.
>
> here are commands I run and the results:
>
> [root at node02 log]# ccs_test connect
> Connect successful.
> Connection descriptor = 29700
>
> [root at node02 log]# ccs_test get 29700 //rm/@log_level
> Get successful.
> Value = <3>
>
> [root at node02 log]# clulog -s 5 -p progName "severity 5 should not be shown"
>
> [root at node02 log]# tail -1 /var/log/messages
> Jul 24 14:52:08 node02 clulog[22819]: <notice> severity 5 should not be
> shown
>
> [root at node02 log]# clulog -s 5 -l 5 -p progName "severity 5 should show"
>
> [root at node02 log]# tail -1 /var/log/messages
> Jul 24 14:54:04 node02 clulog[23000]: <notice> severity 5 should show
>
> [root at node02 log]# clulog -s 5 -l 4 -p progName "severity 5 should not
> show, filter is 4"
>
> [root at node02 log]# tail -1 /var/log/messages
> Jul 24 14:54:04 node02 clulog[23000]: <notice> severity 5 should show
>
>
> My question is why severity 5 is shown in log file even if I did not specify
> filter in my command, clulog should uses the service manager's assigned log
> level that is 3.
> The cluster has 2 nodes, and all nodes are rebooted and restarted before run
> the commands.
>
> Any explanation ?
Seems to work for me? I have log_facility set, though. (though that
shouldn't matter).
Debug output didn't happen.
-- Lon
[root at red utils]# ccs_test connect
Connect successful.
Connection descriptor = 5939640
[root at red utils]# ccs_test get 5939640 /cluster/rm/@log_facility
Get successful.
Value = <local4>
[root at red utils]# ccs_test get 5939640 /cluster/rm/@log_level
Get successful.
Value = <6>
[root at red utils]# grep rgmanager /etc/syslog.conf
local4.* /var/log/rgmanager
[root at red utils]# cp /dev/null /var/log/rgmanager
cp: overwrite `/var/log/rgmanager'? y
[root at red utils]# clulog -s 1 'alert_log_test'
[root at red utils]# clulog -s 5 'notice_log_test'
[root at red utils]# clulog -s 6 'info_log_test'
[root at red utils]# clulog -s 7 'debug_log_test'
[root at red utils]# cat /var/log/rgmanager
Jul 25 10:45:42 red clulog[25281]: <alert> alert_log_test
Jul 25 10:45:57 red clulog[25291]: <notice> notice_log_test
Jul 25 10:46:03 red clulog[25296]: <info> info_log_test
[root at red utils]# tail -3 /var/log/messages
Jul 25 10:45:42 red clulog[25281]: <alert> alert_log_test
Jul 25 10:45:57 red clulog[25291]: <notice> notice_log_test
Jul 25 10:46:03 red clulog[25296]: <info> info_log_test
--
Lon Hohberger - Software Engineer - Red Hat, Inc.
More information about the Linux-cluster
mailing list