mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Introduce a new command line flag ("--format") to specify the output
format. Valid options are "pairs" for shell-compatible key
value pairs, "csv" for CSV, "json" for a formatted JSON document, and
"json-seq" for a stream of JSON text sequences as per RFC7464[1].
[1]: https://datatracker.ietf.org/doc/html/rfc7464
Signed-off-by: Volkan Unal <vunal@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
191 lines
3.4 KiB
Groff
191 lines
3.4 KiB
Groff
.\" Copyright 2017 IBM Corp.
|
|
.\" s390-tools is free software; you can redistribute it and/or modify
|
|
.\" it under the terms of the MIT license. See LICENSE for details.
|
|
.\"
|
|
.TH LSCHP 8 "Mar 2007" s390\-tools
|
|
|
|
.SH NAME
|
|
lschp \- list information about available channel\-paths.
|
|
|
|
.SH SYNOPSIS
|
|
.B lschp
|
|
.RB [ \-h|\-\-help ]
|
|
.RB [ \-v|\-\-version ]
|
|
.RB [ \-\-format
|
|
.IR FORMAT ]
|
|
.RB [
|
|
.I CHPID
|
|
]
|
|
|
|
.SH DESCRIPTION
|
|
The lschp command lists status and type information about available
|
|
channel\-paths. A
|
|
.I CHPID
|
|
argument can be specified to return the information for the respective
|
|
channel-path identifier only.
|
|
Channel\-path identifiers are specified in hexadecimal notation either simply
|
|
as the CHPID\-number (e.g. e0) or in the form
|
|
|
|
.RS
|
|
<cssid>.<id>
|
|
.RE
|
|
|
|
where <cssid> is the channel\-subsystem identifier and <id> is the CHPID\-number (e.g. 0.7e).
|
|
|
|
.B Column description:
|
|
|
|
CHPID
|
|
.RS
|
|
Channel\-path identifier.
|
|
.RE
|
|
|
|
Vary
|
|
.RS
|
|
Logical channel\-path state:
|
|
.br
|
|
0 = channel\-path is not used for I/O
|
|
.br
|
|
1 = channel\-path is used for I/O
|
|
.RE
|
|
|
|
Cfg.
|
|
.RS
|
|
Channel\-path configure state:
|
|
.br
|
|
0 = stand\-by
|
|
.br
|
|
1 = configured
|
|
.br
|
|
2 = reserved
|
|
.br
|
|
3 = not recognized
|
|
.RE
|
|
|
|
Type
|
|
.RS
|
|
Channel\-path type identifier.
|
|
.RE
|
|
|
|
Cmg
|
|
.RS
|
|
Channel measurement group identifier.
|
|
.RE
|
|
|
|
Shared
|
|
.RS
|
|
Indicates whether a channel\-path is shared between LPARs:
|
|
.br
|
|
0 = channel\-path is not shared
|
|
.br
|
|
1 = channel\-path is shared
|
|
.RE
|
|
|
|
PCHID
|
|
.RS
|
|
Physical channel-ID unless the 4-digit hexadecimal value is enclosed in
|
|
parenthesis.
|
|
|
|
If the value is enclosed in parenthesis, no physical channel-ID is
|
|
associated with the CHPID, and the value is an internal channel-ID.
|
|
|
|
For example, 0501 specifies a PCHID whereas (0502) specifies an internal
|
|
channel-ID.
|
|
.RE
|
|
|
|
A column value of '\-' indicates that a facility associated with the respective
|
|
channel\-path attribute is not available.
|
|
|
|
.SH OPTIONS
|
|
.B \-h
|
|
.br
|
|
.B \-\-help
|
|
.RS
|
|
Print a short help text, then exit.
|
|
.RE
|
|
|
|
.B \-v
|
|
.br
|
|
.B \-\-version
|
|
.RS
|
|
Print version number, then exit.
|
|
.RE
|
|
|
|
.br
|
|
.B \-\-format \fIFORMAT\fR
|
|
.RS
|
|
Specify the output format. Supported formats include
|
|
\fIjson\fR, \fIjson-seq\fR, \fIpairs\fR and \fIcsv\fR.
|
|
See section "OUTPUT FORMAT" for more details.
|
|
.RE
|
|
|
|
|
|
.SH "OUTPUT FORMAT"
|
|
This section contains additional information for json output format.
|
|
|
|
.SS json
|
|
|
|
JSON output consists of a top-level object with the following properties
|
|
(key-value pairs):
|
|
|
|
.IP \(bu 3
|
|
.BR meta :
|
|
Tool meta-data including API level, version, host name, and time of invocation
|
|
.PP
|
|
.IP \(bu 3
|
|
.BR channel-paths :
|
|
Information about available Channel\-path
|
|
.PP
|
|
|
|
Example JSON output for channel-path with all properties:
|
|
|
|
.nf
|
|
{
|
|
"meta": {
|
|
"api_level": 1,
|
|
"version": "2.39.0-build-20260119",
|
|
"host": "localhost",
|
|
"time_epoch": 1769092556,
|
|
"time": "2026-01-22 15:35:56+0100"
|
|
},
|
|
"channel_paths": [
|
|
{
|
|
"chpid": "0.32",
|
|
"vary": 1,
|
|
"cfg": 1,
|
|
"type": 27,
|
|
"cmg": 2,
|
|
"shared": 1,
|
|
"chid": 576,
|
|
"chid_external": true
|
|
},
|
|
{
|
|
"chpid": "0.34",
|
|
"vary": 1,
|
|
"cfg": 0,
|
|
"type": 27,
|
|
"cmg": null,
|
|
"shared": null,
|
|
"chid": 608,
|
|
"chid_external": true
|
|
},
|
|
{
|
|
"chpid": "0.f8",
|
|
"vary": 1,
|
|
"cfg": 1,
|
|
"type": 36,
|
|
"cmg": 3,
|
|
"shared": 1,
|
|
"chid": 2040,
|
|
"chid_external": false
|
|
}
|
|
]
|
|
}
|
|
.fi
|
|
|
|
.SH SEE ALSO
|
|
.BR chchp (8)
|
|
|
|
More information on the \fBChannel\-path type identifier\fR can be found at
|
|
.br
|
|
\fBhttps://www.ibm.com/docs/en/zos/3.1.0?topic=iee196i\-iee174i\-form\-2\-37\fR
|