This service script enables you to view log messages from the system journal in a consistent format. It also enables you to specify additional arguments and to filter or display additional information. Use this script as a triage tool to troubleshoot issues.
Show current boot or the boot for the specified ID.
-k,
--dmesg
Show the kernel message log from the current boot.
-t,
--identifier
Show entries with the specified syslog identifier.
-p,
--priority
Filter output by message priorities or priority range.
-g,
--grep
Filter output to entries where the specified field matches the specified regular expression.
--case-sensitive
Make pattern matching case sensitive or case insensitive. Valid values are
TRUE or
FALSE.
-S,
--since
Show entries not older than the specified date.
-U,
--until
Show entries not newer than the specified date.
--system
Show the system journal.
--user
Show the user journal for the current user.
-D,
--directory
Show journal files from the specified directory.
--file
Show the specified journal file.
-f,
--follow
Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.
--output-fields
Show a comma-separated list of the fields that you want to include in the output.
Fields
The system journal contains entries with information (binary data) stored in fields with specific meaning. In addition, you can use the optional arguments to filter the information that is based on these fields or on the value that these fields contain. For example:
The following command establishes a basic field matching query to view log messages associated with the
Platform component. The command has a marker value of
NDU and a message priority level of
ERROR:
When you run the script, the output appears in a set order of default fields. The following is a sample of the default output from the script:
2019 Mar 11 14:51:45 FNM00175000815-A DEBUG CC CP bedrock.config.ConfigManagerVerticle vert.x-eventloop-thread-0 no_ctx_id Starting to set injector.
Where:
Field
Value
__REALTIME_TIMESTAMP
2019 Mar 11 14:51:45
_HOSTNAME
FNM00175000815-A
PRIORITY
DEBUG
MARKER
CC
COMPONENT
CP
SUB_COMPONENT
bedrock.config.ConfigManagerVerticle
THREAD_NAME
vert.x-eventloop-thread-0
CONTEXT_ID
no_ctx_id
MESSAGE
Starting to set injector.
If you want to view additional fields in the output, specify them in the
--output-fields argument. For example:
svc_journalctl --output-fields=CODE_LINE,CODE_FUNC
2019 Mar 11 14:51:45 FNM00175000815-A DEBUG CC CP bedrock.config.ConfigManagerVerticle vert.x-eventloop-thread-0 no_ctx_id [814] [validatePlatformResponseStateTask] Starting to set injector.
Where:
Field
Value
CODE_LINE
[814]
CODE_FUNC
[validatePlatformResponseStateTask]
Data is not available for the Topic
Please provide ratings (1-5 stars).
Please provide ratings (1-5 stars).
Please provide ratings (1-5 stars).
Please select whether the article was helpful or not.
Comments cannot contain these special characters: <>()\