table of contents
PRPT(1) | peripety | PRPT(1) |
NAME¶
prpt - Peripety command line interface
SYNOPSIS¶
prpt subcommand [COMMAND OPTIONS]...
DESCRIPTION¶
prpt is the command line tool for the peripety project. This tool allows users to:
* Retrieve block information. Example:
prpt info /dev/sda7
* Query existing peripety events. Example:
prpt query --since today -J
* Monitor follow up peripety events. Example:
prpt monitor --severity Error -J
SUBCOMMANDS¶
help¶
Print help message.
info¶
Query block information on specified block. The block string could be any of following forms:
* major:minor. E.g. "8:0".
* Block name. E.g. "sda", "dm-0".
* Full path of device path. E.g. "/dev/sda", "/dev/dm-0",
"/dev/mapper/mpatha".
* UUID. E.g. "7ef54c0b-b81c-4d4b-8ed4-5297ec54fadd".
* WWID used by peripety events.
The returned block information will contains:
* preferred_blk_path
The preferred block path which will be consistent after reboot.
E.g. When query on a path of multipath `mpatha`, the `blk_path` will be set
to `/dev/mapper/mpatha` instead of `/dev/sda` or `/dev/dm-0`.
* blk_path
The block path commonly known by kernel. Might be change after reboot.
* wwid
The unified ID for the block device.
* blk_type
The type of block device. Possible values are:
'SCSI', 'Device Mapper', 'Device Mapper Multipath',
'Device Mapper LVM', 'Partition'
* owners_wwids
If specified block device is from other device, this field will contains
unified ID of all its dependency blocks.
* owners_types
If specified block device is from other device, this field will contains
block type of all its dependency blocks.
* owners_paths
If specified block device is from other device, this field will contains
block path of all its dependency blocks.
* uuid
The UUID of file system if avaiable.
* mount_point
The mount pointe of file system if avaiable.
Example:
$ prpt info /dev/sda7
blk_path : /dev/sda7
blk_type : Partition
wwid : t10.ATA-SAMSUNG-MZ7LN512HMJP-000L7-S2X9NX0H706455-part7
owners_wwids : ["t10.ATA-SAMSUNG-MZ7LN512HMJP-000L7-S2X9NX0H706455"]
owners_paths : ["/dev/sda"]
owners_types : ["SCSI"]
uuid : f8c9b4e6-b762-49cb-aee5-1a70a748c8b0
mount_point : /home
query¶
Query existing peripety events from journald. When multiple option are defined, only event matches all different options will be displayed.
- -J
- Optional. Display events in JSON format. If not defined, display the event message only with timestamp only. Each event is devided by an empty line.
- --blk <BLOCK>
- Optional. Only show event related to specified block. Support all types of string used by above info subcommand.
- --event-type <EVENT-TYPE>...
- Optional. Repeatable. Only show event with specified event type. If you are interested on multiple event types, you may repeat this option.
- --severity <SEVERITY>...
- Optional. Only show event with equal or higher severity. If not defined,
show all event.
Possible values are(severity high to low): Emergency, Alert, Ctritical, Error, Warning, Notice, Info, Debug.
- --since <SINCE>...
- Optional. Only show event on or newer than the specified time. The supported formats are "2018-05-21" or "today", "yesterday" or "2012-10-30 18:17:16".
- --sub-system <SUB-SYSTEM>...
- Optional. Only show event from specific sub-system The supported formats are "2018-05-21" or "today", "yesterday" or "2012-10-30 18:17:16". If you are interested on multiple sub-system, you may repeat this option.
monitor¶
Monitor follow up peripety events.
- -J
- Optional. Display events in JSON format. If not defined, display the event
message only with timestamp only. Each event is devided by an empty line.
--blk <BLOCK> Optional. Only show event related to specified block. Support all types of string used by above info subcommand.
- --event-type <EVENT-TYPE>...
- Optional. Repeatable. Only show event with specified event type. If you are interested on multiple event types, you may repeat this option.
- --severity <SEVERITY>...
- Optional. Only show event with equal or higher severity. If not defined,
show all event.
Possible values are(severity high to low): Emergency, Alert, Ctritical, Error, Warning, Notice, Info, Debug.
- --sub-system <SUB-SYSTEM>...
- Optional. Only show event from specific sub-system The supported formats are "2018-05-21" or "today", "yesterday" or "2012-10-30 18:17:16". If you are interested on multiple sub-system, you may repeat this option.
BUGS¶
Please report bugs to https://github.com/cathay4t/peripety/issues
AUTHOR¶
Gris Ge <fge@redhat.com>
May 2018 | prpt 0.1.0 |