Command line log reader – HP System Management Homepage-Software User Manual
Page 77
Command Line Log Reader
The command line log reading tool provides the users with a command line tool for reading the SMH log
messages without using the UI. The command is:
smhlogreader [options]
where, the [options] are:
-h|--help
, displays the help message.
-f|--file FILE
, FILE represents a path to a file.
--from FROM
, FROM: to display a range of messages, this option describes the ID of the first message.
--to TO
, TO: to display a range of messages, this option describes the ID of the last message.
--lang LANG
, LANG: the language used to display the log messages.
IMPORTANT:
smhlogreader CLI also allows the combined use of these options in a single command.
For example, smhlogreader --lang LANG --from FROM --to TO --file FILE
The different options provided by the smhlogreader CLI are:
•
Help
It allows the user to run the command to display the help message for this tool.
The following command displays the help message for the smhlogreader CLI.
smhlogreader -h|--help
•
Version
It allows the user to run the command to display the version of SMH.
The following command displays the SMH version number.
smhlogreader --version
•
Language
It allows the user to select language of choice for the messages to be displayed
The following command allows the user to select the language of choice for the messages to be displayed.
smhlogreader --lang en|ja
By default the SMH Logs and UI supports “en” for English and “ja” for Japanese.
NOTE:
To display the messages properly, the necessary fonts to display the messages must be installed
on the system. For example, on a non-Japanese version of Windows the user needs to install Japanese
fonts to read the log in that language.
•
Reading Logs
It displays a list with the most recent messages.
The following command displays a list with the most recent messages.
smhlogreader
•
Range
It allows the user to set the range of messages that smhlogreader CLI should display.
The following command displays a list of messages in the range selected by the user.
smhlogreader --from VALUE --to VALUE
For example, to display messages the recent five messages, the user should use the following command:
smhlogreader --from 1 --to 5
•
File-based command line log reading
The smhlogreader CLI allows the user to use a properly-formatted log file as an input.
Command Line Interface Configuration
77