Agent-Logging

From pressy's brainbackup
Jump to: navigation, search

Agent Logging

Example with HA-Storage-Plus; Configure syslog with new options:

# echo daemon.debug\\t/var/adm/messages.hsp >> /etc/syslog.conf
# touch /var/adm/messages.hsp
# pkill -HUP syslogd

Test teh addition to /etc/syslog.conf with:

# logger -p daemon.debug test

You should see output with "test" on the console and at the end of /var/adm/messages.hsp

The file that controls the debug level is called "loglevel". To turn on debugging for a the HAStoragePlus type, you would do the following:

# mkdir -p /var/cluster/rgm/rt/SUNW.HAStoragePlus
# echo 9 > /var/cluster/rgm/rt/SUNW.HAStoragePlus/loglevel

Debug levels: 0 no debug messages - error and information messages only 1 fewest debug messages, as well as all error and information 2-8 increasingly more debug messages 9 most debug messages

Notes: The debug level is read at the start of each method invocation. Changing the debug level will take effect on the next call of a given method.

# scswitch -z -h <host> -g <resoure group>