HP-UX Reference (11i v2 07/12) - 1 User Commands N-Z (vol 2)
s
samlog_viewer(1) samlog_viewer(1)
mm Month specified as a two digit number (e.g.,
08).
dd Day specified as a two digit number.
hh Hour specified as a two digit number (24-hour clock form).
mm Minute specified as a two digit number.
cc Century minus one. cc is optional when specifying the year.
yy The last two digits of the desired year. If this is not specified, the
current year is used.
Note: To specify a year in two digits, the valid ranges are 70-99
(20th century) and 00-37 (21st century).
To specify a year in four digits, the valid range is 1970-2037.
If no start time is given, the beginning of the log is used as the start time.
-e mmddhhmm[[cc]yy]The
-e option sets the end date/time filter to the date/time given by its
argument. The date and time is specified as described above for the
-s
option. If no end time is given, then an end date/time of infinity (no end
time) is used.
-l SDVC The -l option sets the desired level of detail. One of the letters SDVC
must be specified as the required argument. The level of detail is set as fol-
lows:
S = Summary
D
= Detail
V
= Verbose
C
= Commands Only
If the -l option is not specified, the Detail level of detail is used by
default.
-u user The -u option sets the user filter to the user name or user ID specified by
user. Only entries logged by this user are displayed. If the -u option is
omitted, entries logged by all users are displayed by default.
-o ofile The -o option causes the filtered output to be written to the output file
ofile. The -o option implies the -n option described below. If ofile is
-,
the output is written to stdout. If
-o is omitted, the output is written to
either stdout (if -n is specified) or to the interactive samlog_viewer
display (if -n is omitted).
-t The -t option enables automatic timestamping. If specified, each log entry
is tagged with the time of day at which it was written. Timestamping is
disabled by default.
-n The -n option forces noninteractive behavior. If specified,
samlog_viewer runs noninteractively, using the default or specified
values for all supported options and source/destination files.
file Specifies the name of the file from which log data is read. The format of
the data in the specified file must be the same as that used for raw SAM
logfile data. If omitted, the SAM logfile is read. If file is -, stdin is read
and samlog_viewer runs noninteractively. If given, file must be the
last argument specified on the command line.
EXAMPLES
Capture the current contents of the SAM logfile using default filtering, and put into the file
sam.out:
samlog_viewer -n >sam.out
The following example does the same thing:
samlog_viewer -o sam.out
View only the commands executed by SAM on behalf of user tom, between 8am June 5, 1994 and 10pm
August 14, 1994, and view the data interactively:
HP-UX 11i Version 2: December 2007 Update − 2 − Hewlett-Packard Company 243