Command systool
outputs - Commands¶
Command systool uses APIs provided by libsysfs to gather information.
Parser included in this module is:
SystoolSCSIBus - command /bin/systool -b scsi -v
¶
-
class
insights.parsers.systool.
SystoolSCSIBus
(context, extra_bad_lines=None)[source]¶ Bases:
insights.core.LegacyItemAccess
,insights.core.CommandParser
Class for parsing
/bin/systool -b scsi -v
command outputTypical command output:
Bus = "scsi" Device = "1:0:0:0" Device path = "/sys/devices/pci0000:00/0000:00:01.1/ata2/host1/target1:0:0/1:0:0:0" delete = <store method only> device_blocked = "0" device_busy = "0" dh_state = "detached" eh_timeout = "10" evt_capacity_change_reported= "0" evt_inquiry_change_reported= "0" evt_lun_change_reported= "0" evt_media_change = "0" evt_mode_parameter_change_reported= "0" evt_soft_threshold_reached= "0" iocounterbits = "32" iodone_cnt = "0x15b" ioerr_cnt = "0x3" iorequest_cnt = "0x16c" modalias = "scsi:t-0x05" model = "CD-ROM " queue_depth = "1" queue_type = "none" rescan = <store method only> rev = "1.0 " scsi_level = "6" state = "running" timeout = "30" type = "5" uevent = "DEVTYPE=scsi_device DRIVER=sr MODALIAS=scsi:t-0x05" unpriv_sgio = "0" vendor = "VBOX " Device = "2:0:0:0" ...
Examples
>>> len(res.data) 2 >>> res.data.keys() ['1:0:0:0', '2:0:0:0'] >>> res.device_names ['1:0:0:0', '2:0:0:0'] >>> res.data['1:0:0:0'] == res.devices[0] True >>> res.get_device_state('1:0:0:0') 'running' >>> res.get_device_state('2:0:0:0') None