The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

VMS::SysInfo - Perl extension to retrieve lots of system info for a node.

SYNOPSIS

  use VMS::SysInfo;

VMS::SysInfo will can access either system info for any node in the cluster (what info is available depends on whether you're local to the node being accessed or not), or parameters set by SYSGEN for the local node.

Routine to return a reference to a hash with all the system info for the node loaded into it:

  $SysInfo = VMS::SysInfo::get_all_sys_info_items([nodename]);
  $archtype = $SysInfo->{ARCH_TYPE};

  $SysParm = VMS::SysInfo::get_all_sys_parm_items();
  $Channelcnt = $SysInfo->{CHANNELCNT}

Fetch a single piece of info:

  $archtype = VMS::SysInfo::get_one_sys_info_item("ARCH_TYPE"[, nodename]);
  $ChannelCnt = VMS::SysInfo::get_one_sys_parm_item("CHANNELCNT");

Decode a bitmap into a hash filled with names, with their values set to true or false based on the bitmap.

  $hashref = VMS::SysInfo::decode_sys_info_bitmap("ARCHFLAGS", Bitmap);
  $hashref = VMS::SysInfo::decode_sys_parm_bitmap(<some bitmapped parameter>);

Get a list of valid info names:

  @InfoNames = VMS::SysInfo::sys_info_names(<nodename>);
  @ParmNames = VMS::SysInfo::sys_parm_names();

Tied hash interface (Info items only, not system parameters):

  tie %SysInfohash, VMS::SysInfo<, nodename>;
  $diolm = $SysInfohash{ARCH_TYPE};

Object access (Info items only, not system parameters):

  $SysInfoobj = new VMS::SysInfo <nodename>;
  $archtype = $SysInfoobj->one_info("ARCH_TYPE");
  $hashref = $SysInfoobj->all_info();

DESCRIPTION

Retrieve info for a node. Access is via function call, object and method, or tied hash. Choose your favorite.

Note that this module does not completely duplicate the DCL F$GETSYI lexical function. Quick rule of thumb is only single pieces of info are returned.

BUGS

May leak memory. May not, though.

LIMITATIONS

Quadword and hexword values are returned as string values rather than integers.

List info (like rightslists) is not returned.

The decode bitmap function doesn't currently decode anything.

You can't get all system info for all nodes in the cluster. This is a VMS limitation.

You can't get system parameter info for non-local cluster nodes. This is also a VMS limitation. Hopefully one to be lifted later. (If you've got a VMS source license, send me e-mail and we'll talk.)

You can't access system parameters via the tied hash or the object interface. This'll likely change later.

AUTHOR

Dan Sugalski <sugalsd@lbcc.cc.or.us>

SEE ALSO

perl(1), VMS::ProcInfo.