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

Chris Webb chris at arachsys.com
Sat Jun 6 10:19:03 CEST 2009

"Dr. Volker Jaenisch" <volker.jaenisch at inqbus.de> 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.


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

More information about the stgt mailing list