(PYVMS LOGO) Python on OpenVMS

(go to: table of contents, index, list of vms_lib, prev: GETQUI, next: GET_COMMAND)


GETSYI - Get Systemwide Information


Note: the 'vms_syidef' module contains bitmasks and constants that are defined in '$SYIDEF'. Access to the item codes ("SYI$_name") is possible via the 'pyvms' module.

@@ As of 01-MAR-1998 this function has not been tested in a VMScluster.

Format:

    ctx_out, item_value = vms_lib.getsyi (item_name, \
        csid_ctx [,node_name])
Returns:
csid_ctx
cluster system id (CSID) of nodename or a csid-context that can be used for the next step in a wildcard lookup
item_value
Return information requested from 'item_name'. Note: whenever possible items are returned as integer values. This eases wildcard lookups and other usages. 'Boolean' values (TRUE/FALSE) are returned as integers 1/0.
Arguments:
item_name
Text-string of item to retrieve (e.g. 'SYI$_NODENAME').
csid_ctx
cluster system id (CSID) of nodename to lookup or context-value for the next wildcard lookup.
node_name
Name of node to retrieve information from. Note: normally csid_ctx overrides node_name! Use csid_ctx = 'None' to force usage of node_name.
Examples:
>>> import vms_lib

>>> csid, item = vms_lib.getsyi ('SYI$_NODENAME',0)
>>> csid, item
(0, 'HERE')

>>> csid, item = vms_lib.getsyi ('SYI$_NODENAME',None,'HERE')
>>> csid, item
(0, 'HERE')

>>> vms_lib.getsyi ("SYI$_PAGFILCNT",0)
(0, 4)

>>> vms_lib.getsyi ('SYI$_NODE_HWVERS',0)
(0, (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 32))
>>> vms_lib.getsyi ("SYI$_NODE_SWTYPE",0)
(0, 'VMS ')
>>> vms_lib.getsyi ("SYI$_VERSION",0)
(0, 'V6.1    ')

>>> vms_lib.getsyi ("SYI$_RMS_GBLBUFQUO",0)
(0, 1024)

>>> l_sid, q_bootim = vms_lib.getsyi('SYI$_BOOTTIME',0)
>>> l_sid, q_bootim
(0, 44136120482800000L)

>>> import vms_sys
>>> vms_sys.asctim (q_bootim)
'27-SEP-1998 11:20:48.28'


>>> csid, item = vms_lib.getsyi ('SYI$_NODENAME',None,'NONONO')
Traceback (innermost last):
  File "<stdin>", line 1, in ?
vms_lib.error: (652, '%SYSTEM-F-NOSUCHNODE, remote node is unknown')
>>>


>>> vms_lib.getsyi (sys,0)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
TypeError: argument 1: expected read-only buffer, module found

>>> vms_lib.getsyi ("SYI$_RMS_GBLBUFQUO",sys)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
TypeError: argument 2: cluster-system-id - must be integer or None

>>> csid, item = vms_lib.getsyi ('SYI$_NODENAME',None,sys)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
TypeError: argument 3: expected read-only buffer, module found
>>>

(go to: table of contents, index, list of vms_lib, prev: GETQUI, next: GET_COMMAND)

04-DEC-1998 ZE.