chpstat(8)
π chpstat(8) β channel-path statistics, bestie π
πΈ NAME πΈ
chpstat β Display channel-path statistics. No cap, that's the whole vibe.
β¨ SYNOPSIS β¨
chpstat [OPTIONS] [ACTIONS] [CHPIDS]
π¦ DESCRIPTION π¦
Okay so use chpstat to view channel-path statistics like utilization and throughput, and also to query and control the status of the channel-path statistics function. It's giving main character observability.
When run without further options, data for all channel-paths is displayed repeatedly with a 5 second delay in table format. You can limit output to specific channel-paths by listing the associated CHPIDs on the command line.
Note: Channel-path statistics are only available on systems running in anLPARorDPMpartition.
π Output options π
Without options, chpstat displays performance statistics data in table format. Use options --columns, --all and --cmg to change the list of columns to display.
You can use option --format to select a machine-readable list output format (JSON, key-value pairs, or comma-separated values), and option --keys to restrict output to only a specific set of data keys.
Additional options can be used to display the raw source data used for calculating channel-path statistics:
- Characteristics: Static data describing base characteristics of a channel-path.
Use option --chars to view characteristics data.
- Utilization: Raw data about a channel-path's current utilization. This data is updated regularly at model-dependent intervals that typically last a few seconds (see key
"interval").
Use option --util to view raw utilization data.
- Metrics: Performance statistics derived from utilization and characteristics data.
Note: Metrics data is calculated as averages over all utilization update intervals that fall within the selected chpstat update interval.
Use option --metrics to view metrics data.
π Authorization π
A special authorization setting needs to be enabled for a system to be able to access channel-path statistics data.
ποΈ Classic mode LPAR ποΈ
- Log on to the Hardware Management Console (HMC)
- Select the target LPAR
- Start
Customize Activation ProfilesHMC Task - Enable
Security/Global performance data controlsetting
Note: The LPAR needs to be deactivated/re-activated for the change to become effective.
π DPM Partition π
- Log on to the Hardware Management Console (HMC)
- Select the target partition
- Start
Partition DetailsHMC Task - Enable
Controls/Access global performance datasetting - Press
Applyβ the change will be active immediately
π Channel-Measurement Groups π
A Channel-Measurement Group (CMG) is a number associated with each channel-path that determines the type of available statistics data for that channel-path.
β‘ ACTIONS β‘
Pick your action, bestie. These are the controls. π
-s,--statusβ Show channel-path statistics status
Possible status values are:
enabled: Statistics facility is activedisabled: Statistics facility is inactiveunsupported: Statistics facility is not supported. Note that channel-path statistics are only available when running inLPARorDPMpartition.
-e,--enableβ Enable channel-path statistics
After booting Linux, the channel-path statistics facility starts in disabled state. Use option --enable to enable it.
-d,--disableβ Disable channel-path statistics-l,--list-columnsβ List available table columns
Use this option to get a list of available table column names and associated short description. A comma-separated list of column names can be used with option --columns to select the columns to display in table output format.
-L,--list-keysβ List available data keys
Use this option to get a list of available keys that can be used with option --keys to select data pairs to display in machine-readable output format.
-h,--helpβ Print usage information, then exit-v,--versionβ Print version information, then exit
π OPTIONS π
Here come the options. All of them. No skipping. π€
-n,--iterations NUMβ DisplayNUMreports before ending
By default, chpstat shows output repeatedly until interrupted. Use option --iterations to specify how many times output should be updated before exiting. A value of 0 indicates an unlimited number of iterations.
-i,--interval NUMβ PauseNUMseconds between display
Use this option to specify the number of seconds to wait between output updates. Valid values are between 1 and 2140.
Note: It is recommended to use interval values of at least the model-dependent statistics update interval (see key "interval").
-c,--columns COL,..β Select table columns to show in table output format
To get a list of available columns, use option --list-columns. If a channel-path does not provide data for a selected column, the corresponding table field is set to '-'.
-k,--keys KEY,..β Select keys to show in machine-readable output format
Use this option to select the data to show in machine-readable output format. To get a list of available keys, use option --list-keys. If a channel-path does not provide data for a selected key, the corresponding value is set to "".
-a,--allβ Show all table columns and key data
Use this option to select all supported columns and keys for output.
--scale UNITβ ScaleBPSvalues byUNIT
Use this option to specify a value by which bytes-per-seconds (BPS) values β such as read and write throughput β are scaled in human-readable output. Note that scaling is not applied to values in machine-readable output format as produced with option --format.
Accepted values are:
auto: Scale automatically to fit value into each column. To indicate the current scaling factor, an SI-suffix is added to each scaled number (e.g.Kfor1000). This is the default.auto-iec: Same asautobut using power-of-two based IEC-suffixes (e.g.Kifor1024).number: Scale by numberK: Scale by1000(KB)M: Scale by1,000,000(MB)G: Scale by1,000,000,000(GB)T: Scale by1,000,000,000,000(TB)Ki: Scale by1024(KiB)Mi: Scale by1,048,576(MiB)Gi: Scale by1,073,741,824(GiB)Ti: Scale by1,099,511,627,776(TiB)
--cmg CMG,..β Show data for specifiedCMGsonly
Use this option to limit output to CHPIDs with the specified Channel-Measurement-Groups (CMG). This option also selects table columns suitable for the specified CMGs.
--format FORMATβ Show data in specifiedFORMAT
Use this option to show output in a machine-readable format. FORMAT can be either of:
json: Single JavaScript Object Notation (JSON) data structure
Data for all iterations is formatted as one JSON data structure formatted in multiple lines to make them more readable by humans.
See section "OUTPUT FORMAT" for more details.
json-seq: Sequence ofJSONdata structures
Data for each iteration is formatted as separate JSON data structure prefixed with an ASCII Record Separator character (0x1e) and suffixed with an ASCII Line Feed character (0x0a) in accordance with RFC7464.
See section "OUTPUT FORMAT" for more details.
jsonl: Line-delimitedJSONdata structures
Data for each iteration is formatted as a single JSON data structure separated by an ASCII Line Feed character (0x0a, LF).
See section "OUTPUT FORMAT" for more details.
pairs: Textualkey=valuepairs
By default, keys have a prefix that makes them unique across one tool invocation. This prefix can be removed by specifying option --no-prefix.
csv: Comma-Separated-Value (CSV) list
All values are quoted with double-quotes and separated by commas. The first line of output contains a list of headings. Subsequent lines each represent data for one CHPID in one iteration.
--charsβ List channel-path measurement characteristics
Use this option to display static data describing base characteristics of a channel-path. This option implies a machine-readable format.
--utilβ List unprocessed utilization data
Use this option to display raw channel-path utilization data that is updated regularly by firmware at model-dependent intervals that typically last a few seconds (see key "interval"). This option implies machine-readable output format.
--metricsβ List performance metrics
Use this option to display performance statistics data derived from utilization and characteristics data. This option implies machine-readable output format.
Note: Metrics data is calculated as averages over all utilization update intervals that fall within the selected chpstat update interval.
--no-ansiβ Do not useANSIterminal codes in output
When specified, this option suppresses the use of ANSI terminal control characters in table output format. Such characters are used to clear the screen, and to invert the colors for table heading display. Use this option when an output terminal does not support these control characters.
--no-prefixβ Hide key prefix inpairsoutput format
By default, keys that are shown in the "pairs" machine-readable output format have a prefix that makes them unique across a tool invocation. Use option --no-prefix to remove this prefix.
π OUTPUT FORMAT π
okay so some of the output formats have β¨extra teaβ¨ for you, and this section is where we spill it.
json
the JSON output is one big top-level object, and it's holding these properties (key-value pairs, iykyk):
metaβ tool meta-data, like the API level, version, host name, and time of invocation πchpstatβ the channel-path statistics data π
note bestie: for a given API level, the output format is guaranteed to stay compatible, which means: - required child-objects are not removed - format and contents of existing objects and properties are retained - new child-objects and properties may be added
so your scripts are safe, fr fr. π«Ά
channel-path statistics data lives as an array of iteration objects under the "chpstat" property in the top-level object.
each iteration object has a property called "channel_paths", and its value is an array of objects representing data for one channel-path during one iteration. objects for a single channel-path contain further child-objects that group related properties together. very organized, very main character. π
these object properties are required and will always be part of the JSON output:
- for iteration objects:
"iteration","time","time_epoch", and"channel_paths" - for channel-path objects:
"chpid","type","cmg","shared"
all the other properties are optional and get omitted from JSON output if the associated value is unavailable. but if you pass --all, those unavailable properties are listed too β as either empty strings or negative values, depending on the value type. π
example JSON output for a single iteration and channel-path with all properties:
{
"meta": {
"api_level": 1,
"version": "2.32.0",
"host": "localhost",
"time_epoch": 1714663282,
"time": "2024-05-02 17:21:22+0200"
},
"chpstat": [
{
"iteration": 0,
"time_epoch": 1714663282,
"time": "2024-05-02 17:21:22+0200",
"channel_paths": [
{
"chpid": "0.00",
"type": 0,
"cmg": 0,
"shared": 0,
"speed": "",
"characteristics": {
"dpu_id": 0,
"max_bus_cycles": 0,
"max_channel_work_units": 0,
"max_write_data_units": 0,
"max_read_data_units": 0,
"data_unit_size": 0,
"data_unit_size_cpc": 0,
"msg_unit_size": 0,
"msg_unit_size_cpc": 0,
"dpu_num_cores": 0
},
"utilization": {
"timestamp": 0,
"bus_cycles_cpc": 0,
"channel_work_units_cpc": 0,
"channel_work_units": 0,
"data_units_written_cpc": 0,
"data_units_written": 0,
"data_units_read_cpc": 0,
"data_units_read": 0,
"total_ficon_ops_cpc": 0,
"total_deferred_ficon_ops_cpc": 0,
"sum_ficon_ops_cpc": 0,
"total_hpf_ops_cpc": 0,
"total_deferred_hpf_ops_cpc": 0,
"sum_hpf_ops_cpc": 0,
"channel_path_busy_time_cpc": 0,
"channel_path_busy_time": 0,
"msg_units_sent": 0,
"msg_units_sent_cpc": 0,
"unsuccessful_attempts_to_send": 0,
"unavailable_receive_buffers": 0,
"unavailable_receive_buffers_cpc": 0,
"data_units_sent": 0,
"data_units_sent_cpc": 0,
"dpu_channel_exec_time_cpc": 0,
"dpu_exec_time_cpc": 0
},
"metrics": {
"interval": 0.0,
"util_total": 0.0,
"util_part": 0.0,
"util_bus": 0.0,
"read_total": 0.0,
"read_part": 0.0,
"write_total": 0.0,
"write_part": 0.0,
"ficon_rate": 0.0,
"ficon_active": 0.0,
"ficon_defer": 0.0,
"hpf_rate": 0.0,
"hpf_active": 0.0,
"hpf_defer": 0.0,
"msg_rate_part": 0.0,
"msg_rate_total": 0.0,
"msg_size_part": 0.0,
"msg_size_total": 0.0,
"send_fail_part": 0.0,
"rcv_fail_part": 0.0,
"rcv_fail_total": 0.0,
"dpu_util": 0.0,
"dpu_util_total": 0.0,
"dpu_util_part": 0.0
}
}
]
}
]
}
like, look at all those properties. she's stunning. ππ
json-seq
json-seq is a variation on the JSON output format we just talked about, with these differences:
- output is a sequence of top-level JSON objects, each one contained in a single line with no indentation π§
- each top-level object is prefixed by an ASCII Record Separator character (
0x1e) and suffixed with an ASCII Line Feed character (0x0a), in accordance with RFC7464 - the first object contains the tool meta-data properties defined in the previous section
- subsequent objects each represent channel-path statistics data for one iteration
so it's the JSON you love, just chopped into a stream. slay. β¨
jsonl
jsonl is the data streaming variation of the JSON output format described above, with the same properties as the json-seq output β the only difference being that JSON data is separated only by an ASCII Line Feed character (0x0a, LF). no fancy record separator here, just vibes and newlines. π
π EXIT CODES π
0β program finished successfully. we love a happy ending π1β usage error. you called her wrong, bestie π2β a run-time error occurred. something went sideways mid-run π
πΈ EXAMPLES πΈ
display current channel-path statistics status in JSON format:
$ chpstat --status --format json
determine the model-dependent update interval for CHPID 0.f0:
$ chpstat --keys interval -n 1 --no-prefix 0.f0 --format pairs
collect partition write throughput statistics for 1 hour in CSV format:
$ chpstat -n 60 -i 60 --format csv --key time,chpid,write_part
go off, honestly. π₯
π SEE ALSO π
lschp(8), chchp(8) β your other faves, go give them a read π
and that's the whole page, bestie! this iconic little number ships with s390-tools and lives at chpstat(8) β go forth, stat those channel paths, and remember: the facts stay exactly where they were, only the vibe got upgraded. π
β¨π¦
π¦ where this page comes from
- opensuse-leap 16.0: s390-tools 2.44.1-160000.1.1 Β· MIT
- Copyright 2024 IBM Corp
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms