Re: Machine readable output for tgtadm --lld [driver] --op show --mode target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Dr. Volker Jaenisch" <volker.jaenisch@xxxxxxxxx> writes:

> We are coding a fencing daemon for the stgt target in python/zope3/grok.

We use stgt as part of a infrastructure management system too, and would
find more regular and parseable output invaluable. However, our system is
written in shell and C, so JSON would be as bad for us as the current 'human
readable' form: it's just not a very 'system-level' format choice.

> killer:/home/volker/workspace/tgt-0.9.6/usr# ./tgtadm --lld iscsi --op
> show --mode target
> {'1':
>    {'class' : 'target'
>      'name' : 'de.inqbus.storage:vmigration',
>      'driver' :'iscsi',
>      'state' : 'ready',
>      'nexus' : {                          <<<< here we stopped coding :-)
>    LUN information:
>        LUN: 0
>            Type: controller
>            SCSI ID: IET     00010000
>            SCSI SN: beaf10
>            Size: 0 MB
>            Online: Yes
>            Removable media: No
>            Backing store: No backing store
>    Account information:
>    ACL information:

How about just a straight list of

  de.inqbus.storage:vmigration iscsi ready
  [...]

for --op show-brief --mode target, which is a small change given where
you've stopped coding :-) and can be trivially parsed in any language
including C and shell, so it'll be more widely useful to administrators.

Cheers,

Chris.
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux