Using NS3000/iX Network Services (36920-90008)

Chapter 6 127
Intrinsics for Node and Environment Status
NSSTATUS Intrinsic
NSSTATUS Intrinsic Examples
1. Determine if the VT service is started on the local node:
Name := ‘VT’;
NameLength:=2;
ItemNum:=4;
NSSTATUS (Name, NameLength, , , Status, ItemNum,
VtStarted);
If the VT service is started, VtStarted will be set to 1; otherwise it
will be set to -1 or 0.
2. Determine if the VT service is started on the remote node NODE1:
Name := ‘VT’;
NameLength:=2;
Node Name:= ‘NODE1’
NodeLength:=5;
ItemNum:=4;
NSSTATUS (Name, NameLength, NodeName, NodeLength,
Status, ItemNum, VtStarted0;
If the VT service on NODE1 is started, VtStarted will be set to 1;
otherwise it will be set to -1 or 0.
3. Determine if the NFT service is started and to find out how many
active and reserved NFT servers currently exist on the local node:
Name := ‘NFT’;
NameLength:=3;
ItemNum4:=4;
ItemNum10:=10;
ItemNum11:=11;
NSSTATUS (Name, NameLength, , , ,Status,
ItemNum4,NftStarted,
ItemNum10, ActiveServers,
ItemNum11, ReservedServers);
This sets NftStarted to 1 if NFT is started, and returns the
number of active and reserved NFT servers to ActiveServers and
ReservedServers, respectively. This example uses the fact that
NFT is the name of both the service and the server.
4. To obtain all the status information for services, servers, and users
on the remote node NODE1:
NodeName := ‘NODE1’
NSSTATUS (, , NodeName, NameLength, Status,
ItemNum1,ServiceList,
ItemNum2, ServerList,
ItemNum3, UserList);
This returns to the arrays ServiceList, ServerList, and Userlist the
information formatted as defined in the data structures in this
chapter.
5. Suppose #S1 (Manager.sys) on node A creates a remote session #S5
(using VT) on node B. The initiator of #S5 information can be
obtained by running the following NSSTATUS intrinsic call on
node B.
Name := ‘#S5’ {or logon string of #S5}
NameLength :=3; ItemNum :=21;