samrep(1M)
samrep -- analyze the SAM event log and display availability report
Synopsis
- samrep [ -r SUMMARY ]
- [-b beg_time] [-e end_time | LAST] [-f file] [-k PLANNED | UNPLANNED]
- samrep -r FAILURES | EVENTS -t objtype -n objname
-
[-b beg_time] [-e end_time | LAST] [-f file] [-k PLANNED | UNPLANNED]
- samrep -q EVENTS | OBJECTS [-t objtype] [-n objname]
- [-b beg_time] [-e end_time | LAST] [-f file] [-k PLANNED | UNPLANNED]
[sub_options]
-
- samrep -c time
-
- samrep -h
Description
The samrep command analyzes the SAM event log and displays
system availability reports. It also provides a programmatic query and dump interface along with an interface for converting between SAM's supported time formats. You can display the following reports:
- Summary
- Shows basic information about each monitored object on a single line. This report is the default.
- Failures
- Shows detailed information about the failures for a single specified object.
- Events
- Shows detailed information about every event for a single specified object.
The programmatic query and dump interface has more powerful filtering suboptions and shows its output in a keyword=value format.
For detailed descriptions of the reports, see the
intro_sam(1M)
manual page.
The -r, -q, and -c options cannot be used together, and the -h option overrides any other options specified on the same command line. Entering the command with no parameters provides a Summary report that satisfies most needs.
Options
- -r SUMMARY | FAILURES | EVENTS
- Displays a Summary, Failures, or Events report
in human-readable format.
If you specify FAILURES
or EVENTS, you must also use
the -t objtype
and -n objname options to
indicate the specific object for the report. If you specify the
-r option, you
cannot use the -q option.
- -t objtype
- Specifies the type of object about which to display information. The object type can be one of the following:
- CLUS
- The cluster itself.
- NODE
- A single node of the cluster.
- TIME
- The system time for the cluster.
- APPL
-
An application.
- -n objname
- Specifies the name of the object. Within a given object type, the name must be unique. Object names can be restricted based on the object type:
- CLUS
- The object name must be SELF.
- NODE
- The object name must be the node number (1, 2, 3, ...).
- TIME
- The object name must be CHANGE.
- APPL
-
The object name can be user-specified.
- -b beg_time
- Specifies a starting point for the report in
Unix Epoch seconds or
YYYY.MM.DD_HH.MM.SS
format. The default time is the earliest event
in the log. If a start time earlier than the first event is specified, each object is treated as being in its initial state during that time. This earlier time affects the up-time percentage, and a note indicating so appears in the report.
- -e end_time | LAST
- Specifies an alternate cut-off
point for the report in Unix Epoch seconds or
YYYY.MM.DD_HH.MM.SS format.
The default time is current time. If a cut-off time later than the current time is used, each object is treated as being in its latest state during that time. This later time affects the up-time percentage, and a note indicating so appears in the report. The keyword LAST specifies the time of the latest event recorded in the event log. It is typically used when the log file being analyzed is not on a live cluster.
- -f file
- Specifies an alternate log file from which to read log entries.
Because samrep uses the current time as the end
time by default, the -e LAST
option is useful to combine with this option.
- -k PLANNED | UNPLANNED
- Specifies the type of down time to count as
up time for the up-time percentages of each object.
- -q EVENTS | OBJECTS [sub_options]
- Specifies a report in the programmatic form of
keyword=value pairs.
You can specify a report about events or objects.
If you specify the -q option,
you cannot use the -r option.
Several suboptions are available with the -q
option that filter log entries on specific criteria. If you specify
EVENTS, you can filter using the following suboptions:
-
-i evid
- Specifies an event id. You can obtain this id from the Failures report.
- -w time
- Specifies the exact time for the event occurrence. You can obtain this time from the occurred when column of the Events report. Specify the time in Unix Epoch seconds or in YYYY.MM.DD_HH.MM.SS format.
- -t objtype
- Specifies the type of the object.
- -n objname
- Specifies the name of the object.
- -s state
- Specifies the new object state.
The state can be one of UP,
DOWN, or GONE.
The GONE state indicates that the object
has been removed from the system.
- -p plan
- Specifies the type of down time associated with the event. Specify either PLANNED or UNPLANNED.
- -u utoken
- Specifies a user-specific keyword that was previously added to the event log with the samlog command.
- -m msg
- Specifies a message string, which can be a substring of the full message in the log entry.
If you specify OBJECTS, you can filter using the preceding -t, -n, and -s filtering options. In this usage, -s refers to the last state of the specified object.
- -c time
- Converts the specified time value into the other supported format. The time can be specified in Unix Epoch seconds or in YYYY.MM.DD_HH.MM.SS format.
- -h
- Displays help information.
Files
- /var/avail/sam/eventlog
- SAM event log file
Examples
To display a Summary report, enter:
samrep
The following command displays a Failures report for node 2:
samrep -r FAILURES -t NODE -n 2
The following command displays a Summary report as if the cluster had been installed on January 31 2000, enter:
samrep -b 2000.01.31_00:00:00
Diagnostics
In addition to the standard SAM diagnostics described in intro_sam(1M), samrep can display report notes at the bottom of a report. These notes provide information that helps you interpret the report. Additionally, for queries and dumps, warnings may be displayed in separate keyword = value entries to bring attention to unexpected but non-fatal conditions detected by samrep.
References
intro_sam(1M),
ncms(1M),
samd(1M)
samdctl(1M),
samlog(1M),
04 Feb 2000
© 2000 The Santa Cruz Operation, Inc. All rights
reserved.
UnixWare 7 Release 7.1 - 19 March 2000
© 2000 Compaq Computer Corporation.