The /var/cluster/logs/commandlog ASCII text file contains records of selected Sun Cluster commands that are executed in a cluster. The logging of commands starts automatically when you set up the cluster and ends when you shut down the cluster. Commands are logged on all nodes that are up and booted in cluster mode.
Commands that are not logged in this file include those commands that display the configuration and current state of the cluster.
Commands that are logged in this file include those commands that configure and change the current state of the cluster:
claccess
cldevice
cldevicegroup
clinterconnect
clnasdevice
clnode
clquorum
clreslogicalhostname
clresource
clresourcegroup
clresourcetype
clressharedaddress
clsetup
clsnmphost
clsnmpmib
clnsmpuser
cltelemetryattribute
cluster
clzonecluster
scconf
scdidadm
scdpm
scgdevs
scrgadm
scsetup
scshutdown
scswitch
Records in the commandlog file can contain the following elements:
Date and timestamp
Name of the host from which the command was executed
Process ID of the command
Login name of the user who executed the command
Command that the user executed, including all options and operands
Command options are quoted in the commandlog file so that you can readily identify them and copy, paste, and execute them in the shell.
Exit status of the executed command
If a command aborts abnormally with unknown results, the Sun Cluster software does not show an exit status in the commandlog file.
By default, the commandlog file is regularly archived once a week. To change the archiving policies for the commandlog file, on each node in the cluster, use the crontab command. See the crontab(1) man page for more information.
Sun Cluster software maintains up to eight previously archived commandlog files on each cluster node at any given time. The commandlog file for the current week is named commandlog. The most recent complete week's file is named commandlog.0. The oldest complete week's file is named commandlog.7.
View the contents of the current week's commandlog file, one screen at a time.
phys-schost# more /var/cluster/logs/commandlog |
The following example shows the contents of the commandlog file that are displayed by the more command.
more -lines10 /var/cluster/logs/commandlog 11/11/2006 09:42:51 phys-schost-1 5222 root START - clsetup 11/11/2006 09:43:36 phys-schost-1 5758 root START - clrg add "app-sa-1" 11/11/2006 09:43:36 phys-schost-1 5758 root END 0 11/11/2006 09:43:36 phys-schost-1 5760 root START - clrg set -y "RG_description=Department Shared Address RG" "app-sa-1" 11/11/2006 09:43:37 phys-schost-1 5760 root END 0 11/11/2006 09:44:15 phys-schost-1 5810 root START - clrg online "app-sa-1" 11/11/2006 09:44:15 phys-schost-1 5810 root END 0 11/11/2006 09:44:19 phys-schost-1 5222 root END -20988320 12/02/2006 14:37:21 phys-schost-1 5542 jbloggs START - clrg -c -g "app-sa-1" -y "RG_description=Joe Bloggs Shared Address RG" 12/02/2006 14:37:22 phys-schost-1 5542 jbloggs END 0 |