lsportsas
使用 lsportsas 命令可显示集群系统中所有 SAS 端口的状态。
语法
>>- lsportsas -- --+---------------------------------+-- -------> '- -filtervalue --attribute=value-' >--+-----------------+-- --+----------+-- ----------------------> '- -filtervalue? -' '- -nohdr -' >--+---------------------+------------------------------------->< '- -delim --delimiter-'
参数
- -filtervalueattribute=value
- (可选)指定一个或多个过滤器的列表。仅返回值与过滤器属性值匹配的对象。 如果指定了容量,那么还必须包含单位。
- -filtervalue?
- (可选)显示有效的过滤器属性。lsportsas 命令的以下过滤器属性有效:
- node_id
- status
- attachment
- type
- -nohdr
- (可选)缺省情况下,将在简明样式视图中显示每个数据列的标题,在详细样式视图中显示每个数据项的标题。此参数用于禁止显示这些标题。注: 如果没有要显示的数据,那么不会显示标题。
- -delimdelimiter
- (可选)缺省情况下,简明视图中的所有数据列都以空格分隔。每列的宽度设置为每个数据项允许的最大宽度。在详细视图中,每个数据项各占一行,如果显示标题,将用空格来分隔数据与标题。如果在命令行中输入 -delim :,那么在简明视图中将用冒号字符 (:) 分隔所有数据项;例如,不会出现列间距。在详细视图中,数据与标题间以指定的定界符分隔。
描述
此命令可用于查看有关系统端口状态的信息。
此命令输出显示按分区定义的所有可用路径,而不依赖于其用途。这意味着命令输出中将会包含由于端口屏蔽而未使用的路径。
表 1 提供了可显示为输出视图数据的属性值。
属性 | 描述 |
---|---|
id | 指定所显示信息中的行号(数字字符串)。 |
port_id | 指示端口的标识。 切记: 端口 1 到 4 是每个控制容器中标记的 SAS 端口。端口 1 到 3 用于 SAS 到主机的直接连接,端口 4 用于扩展连接。
|
port_speed | 指示 I/O 端口的速度(以 XGb 为单位)。 这是 SAS 端口的最快本地链路速度。如果端口处于不活动状态,那么值为上一个已知端口速度;如果端口未使用且从未处于活动状态,那么值为 N/A。 |
node_id | 指示包含端口的节点的标识(数字字符串)。 |
node_name | 指示包含端口的节点的名称(字母数字字符串)。 |
WWPN | 指示 I/O 端口的全球端口名 (WWPN)(16 个字符的十六进制字符串)。 |
status | 指示端口的状态(数字字符串)。
值可以是:
|
switch_WWPN | 如果连接到交换机,那么指示交换机端口的 WWPN(16 字符十六进制字符串);或者为空白。如果端口处于脱机状态,那么显示上一个已知值。 |
attachment | 指示与端口相连的对象。可能的值如下所示:
|
type | 指示端口的配置方式。该字段还显示可连接到 SAS 端口的设备。可能的值如下所示:
|
adapter_location | 显示包含以太网端口的适配器的位置(从 0 到 6 的任何数字)。 |
adapter_port_id | 显示适配器中以太网端口的位置(从 1 到 4 的任何数字)。 |
调用示例
lsportsas
生成的输出:
id port_id port_speed node_id node_name WWPN status switch_WWPN attachment type adapter_location adapter_port_id
0 1 3Gb 1 node1 500507680140004A offline enclosure enclosure 0 1
1 2 6Gb 1 node1 500507680150004A online 5001234567892000 switch host_controller 0 2
4 1 3Gb 2 node2 50050768014051E5 online host host_controller 0 3
5 2 3Gb 2 node2 50050768015051E5 offline_unconfigured none none 0 4
调用示例
lsportsas
生成的输出:
id port_id port_speed node_id node_name WWPN status switch_WWPN attachment type adapter_location adapter_port_id
0 1 12Gb 1 node1 50050768056C009E online 500507680600B63F enclosure enclosure 0 0
1 2 12Gb 1 node1 50050768056C009F online 500507680600B64F enclosure enclosure 0 1
2 0 12Gb 1 node1 50050768056C009G online 500507680600B65F enclosure internal 0 2
4 1 12Gb 2 node2 50050768056C009I online 500507680600B66F enclosure enclosure 0 3
5 2 12Gb 2 node2 50050768056C009J online 500507680600B67F enclosure enclosure 0 4
6 0 12Gb 2 node2 50050768056C009K online 500507680600B68F enclosure internal 1 1