OpsMgr Crossplatform Logging on the Unix Agent
I’m currently busy with learning more about Crossplatform monitoring with OpsMgr 2007 R2 and stumbled on Logging on the Unix Agent for troubleshooting issues. As you may know on the Linux agent you can troubleshoot, manage and manually control the agent by using the scxadmin tool.
/opt/microsoft/scx/bin/tools/scxadmin -stop [all|cimom|provider]
/opt/microsoft/scx/bin/tools/scxadmin -start [all|cimom|provider
/opt/microsoft/scx/bin/tools/scxadmin -restart [all|cimom|provider]
You can view the running status by executing:
/opt/microsoft/scx/bin/tools/scxadmin -status [all|cimom|provider]
And you can view the agent version by executing:
/opt/microsoft/scx/bin/tools/scxadmin –version
You can enable debug level logging on all 3 components - wsman, cimom (openPegasus) and the providers. The following command creates the necessary entries in the agent configuration for logging:
/opt/microsoft/scx/bin/tools/scxadmin -log-set [all|cimom|provider] {verbose | intermediate | errors}
The following logs are created in /var/opt/microsoft/scx/log:
- scx.log
- scxcimd.log
- cimserver.trc
- cimserver.trc.SCXCoreProviderModule.root
The initial Linux Logging setting shows this:
As you can see no logging is currently configured.
When we change the logging level to verbose for all components the logging level changes to TraceLevel 4.
Let’s have a look at the log files first to see what’s happening now.
You can see the log file size is growing fast ;-)
Ok, after you have found what you are looking for you want to stop the Linux Agent logging. But how do you stop the Linux Agent Logging?
According to the scxadmin --help you can stop the logging with the next commando: scxadmin –log-reset
Let’s run that command now and check the new settings.
Huh? Even though we did a –log-reset according to the –log-list the traceLevel is still 1.
If we look at the log files for info if there is still logging going on we see that no logging is taking place after the –log-reset. The reason why the –log-list command still shows a tracelevel of 1 is due to explicit config files (/etc/opt/microsoft/scx/conf/cimserver_current.conf). So you can ignore the tracelevel=1 in the –log-list of scxadmin after enabling and resetting logging on a Linux Agent.
Have fun with OpsMgr and Crossplatform monitoring.