The ldm set-logctl, ldm list-logctl, and ldm list-history commands enable you to specify fine-grained logging characteristics, view the logging settings, and list ldm command history, respectively. See the ldm(8) man page.
Oracle VM Server for SPARC logs messages to its standard log, /var/svc/log/ldoms-ldmd:default.log.
This section covers the following topics:
Use the ldm set-logctl command to specify the fine-grained logging characteristics that control the messages written to the log. Note that you cannot disable the logging of fatal or warning messages. See the ldm(8) man page.Example 87 Controlling Event Logging Operations
The following examples show ways in which to use the ldm set-logctl command:
Enable logging for notice messages, which indicate that an event requires user attention.
primary# ldm set-logctl notice=on
Specify the number of messages that the ldm list-history command outputs.
The following command sets the number to 20.
primary# ldm set-logctl history=20
Reset logging properties to the default values.
primary# ldm set-logctl defaults
Use the ldm set-logctl command to specify the logging characteristics for Oracle VM Server for SPARC events to be written to the log.
The following command logs ldm commands:
primary# ldm set-logctl cmd=on
When you configure command logging, the following types of information are logged:
The following entry is logged for an ldm list command:
cmd: ldm list cmd: OK
The following entry is logged for a badly formed ldm list command:
cmd: ldm list -x cmd: USAGE
The following entry is logged for an ldm list command that specifies a non-existent domain:
cmd: ldm list non-existent-domain-name cmd: ERROR: cmd: LDom "non-existent-domain-name" was not found
The following command logs ldm commands and command responses:
primary# ldm set-logctl cmd=resp
For example, when you issue the ldm list command, the following command information is logged:
cmd: ldm list cmd: OK: cmd: NAME STATE FLAGS CONS VCPU MEMORY UTIL NORM UPTIME cmd: primary active -n-cv- SP 16 9248M 0.8% 118d 3h cmd: ldg1 active -t---- 5000 16 4G 6.2 % 2d 22h 24m
The ldmd/logctl property specifies the property values that you can also set by using the ldm set-logctl command. Separate each property with a colon character (:).
For example, use the svccfg command to set the cmd property value to resp and to set the debug property value to on. Then, make the changes take affect by refreshing and restarting the ldmd service as follows:
primary# svccfg -s ldmd setprop ldmd/logctl = "cmd=resp:debug=on" primary# svcadm refresh ldmd primary# svcadm restart ldmd
The ldm list-logctl command shows you the current behavior of the logging types.
View settings for all logging types.
primary# ldm list-logctl
View the settings for the notice and cmd logging types.
primary# ldm list-logctl notice cmd
View the default settings.
primary# ldm list-logctl -d
View the logging capability values for all logging types and the number of commands output by the ldm list-history command.
primary# ldm list-logctl -a
Use the ldm list-history command to view the Oracle VM Server for SPARC command history log. This log captures ldm commands and commands that are issued through the XMPP interface. By default, the number of the commands shown by the ldm list-history command is ten.
The short form of the ldm list-history command is the ldm history command.
To change the number of commands output by the ldm list-history command, use the ldm set-logctl command to set the history property value. If you set history=0, the saving of command history is disabled. You can re-enable this feature by setting the history property to a non-zero value.
Note that enabling and disabling command history is logged in the command log.