| United States-English |
|
|
|
![]() |
Using the Event Monitoring Service > Appendix B TroubleshootingLogging and Tracing |
|
Use logging for most troubleshooting activities. By default the monitors log to api.log. Logging to /var/adm/syslog/syslog.log is ON by default for the disk monitor and OFF by default for the remaining monitors. Tracing should only be used when instructed to do so by HP support personnel. This is not available with all monitors. Log files in /etc/opt/resmon/log/ contain information logged by the monitors. If you are having a problem with interfaces to EMS or MC/ServiceGuard, look at the client.log. With the default level of logging, only audit and error messages are logged. An example of an audit message is: User event occurred at Thu Jul 31 16:13:31 1997 Plus (+) indicates that a request has been added. Minus (-) indicates that a request has been deleted. A minus (-) followed by a plus (+) indicates a modification. Events sent to targets are marked with a period (.). Errors are marked with Log Level: Error or with Log Level: Warning. Look at the api.log if you seem to be having a problem with a specific monitor. Check for warnings or errors. Some monitors have their own logs, refer to the manpage for individual monitors. EMS log files are normally under /etc/opt/resmon/log. EMS requires 4 MB disk space in the /etc/opt directory for log files - api.log, registrar.log, client.log, emsagent.log, api.log.old, registrar.log.old, client.log.old, and emsagent.log.old. An additional 2 MB disk space is required for reslog.html, and reslog.old.html for archiving monitor data. Apart from 6 MB monitor disk space, you can reserve additional disk space for EMS monitors logging. To relocate the directory, enter the following commands: mkdir /newpath/resmon
EMS log files are stored in the following locations:
The following log files are stored in the /etc/opt/resmon/log path:
The following log files are stored in the /var/opt/resmon/log path:
To enable debug logging of the EMS framework, i.e. of the EMS clients, the EMS registrar and of the EMS API functions, one has to create the file /etc/opt/resmon/debug. # touch /etc/opt/resmon/debug Debug logging output will be available in /etc/opt/resmon/log when a system is rebooted or when EMS is restarted. To restart EMS, execute the following steps:
The p_client process will be restarted immediately. EMS monitor will be started if the persistent requests are present. The non persistent requests will be lost. resls is a client application that can verify that the communication between client, registrar and a monitor works. If you are dealing with a problem that seems to be related to some sort of communication issue between EMS processes, use resls to verify whether all monitors are affected or only some. For example: If you type the following command at the HP-UX prompt, 1) # resls /system/numUsers the above command fails to check if any request is available for a required resource. The resources managed by the mibmond can be listed with resls /system command. You should also verify if another resource of the same monitor fails, for example, mibmond. Another mibmond resource: 2) # resls /system/jobQueue1Min A diskmond resource: 3) # resls /vg/vg00/pv_summary
From EMS A.03.20 onwards, you can view the current value of the resource instance by using the new "-s" option with resls, e.g. # resls -s /vg/vgomni/pv_summary COntacting Registrar on grcdg236 There are 4 valid states reported for /vg/vgomni/pv_summary:State Value State Name------------------------ 1 UP The EMS persistence files are located under/etc/opt/resmon/persistence. They contain the monitoring requests that are persistent, that is reconfigured by p_client when the monitor dies or after a system reboot. For example, all monitor requests configured in HP SMH, through the EMS GUI or the EMS CLI, are persistent and are stored in the m.xxxxxxx file under /etc/opt/resmon/persistence. The EMS resource monitoring requests for MC/ServiceGuard are defined as package resource dependencies. These monitoring requests are not persistent requests, that is, if the monitor were to die, the p_client will not restart the monitor and reissue the monitoring requests. This is left to the cluster daemon (cmcld) to manage. MC/ServiceGuard has therefore its own persistence database. The persistence file names are normally having the format m.<number>, where <number> is created by using a hash algorithm on the EMS monitor start-up string stored in its dictionary file in /etc/opt/resmon/dictionary. If the invocation command changes (e.g. by adding command line options), the persistence file name also changes. Structure of the Persistence File The first 8 bytes give the length of monitor request: 0000014a, always followed by entries of the form "IIII,LLLL,DDDD;" where
Example: 2019,4,1002;2019: ID is RMObjectType4: Length is 4 byte1002: Data is RM_MONITOR_REQUEST_OBJECT High availability monitors provide additional logging support.
Entries in /var/adm/syslog/syslog.log are marked with the monitor daemon name, for example pkgmond or fsmond, followed by the resource name and logging data. Additions, deletions, notifications, and changes in resource states are logged. Errors explaining why a resource is not available for monitoring, or why the monitor cannot access a resource are also logged there. Look at the registrar.log if you are having trouble finding resources that you suspect exist on your system. This log contains any errors that were encountered when trying to read the dictionary. If a dictionary is corrupt, the registrar will not be able to read it, and EMS will not be able to find the resources associated with that dictionary. Some monitors provide tracing, which can be used for debugging monitor code. Use the -d option to turn on tracing for EMS. Tracing should only be used at the request of your HP support personnel when trying to determine if there may be a problem with EMS. To turn on tracing, modify the .dict file in /etc/opt/resmon/dictionary and add -d to the monitor you like to trace: MONITOR: /etc/opt/resmon/lbin/mibmond -l -d Kill the monitor process. The monitor will automatically restart with tracing enabled. To speed up monitor restart, use the resls command with the top level of the resource class as an argument, for example, resls /system. Tracing is customarily logged to /var/opt/resmon/log/monitor_name.log. The monitor_name usually matches the name used for the monitor in the dictionary file. For example, the MIBmonitor uses mibmond.dict and mibmond.log. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||