NSSTATUS Intrinsic [ Using NS3000/XL Network Services ] MPE/iX 5.0 Documentation
Using NS3000/XL Network Services
NSSTATUS Intrinsic
The NSSTATUS intrinsic returns information about services, servers, and
NS users on local or remote nodes. This information is equivalent to the
data displayed by NSCONTROL STATUS.
Syntax
__________________________________________________________________________
| |
| BA IV BA IV I |
| NSSTATUS ( name, namelength, nodename, nodelength,status|
| (IV) (BA) |
| [,itemnum1, item1] |
| [,itemnum2, item2] |
| [,itemnum3, item3] |
| [,itemnum4, item4] |
| [,itemnum5, item5]); |
| where: BA = Byte array |
| I = Integer |
| IV = Integer value |
__________________________________________________________________________
Parameters
name(input)
26-byte character array, by reference. Service name, server name, or
user name, depending on which items are specified. May be omitted for
certain items.
namelength(input)
16-bit integer, by value. Length of name in bytes. May be omitted for
certain items.
nodename(input)
52-byte character array, by reference. Name of a remote node from that
information will be obtained. If omitted, NSSTATUS information will be
obtained from the local node.
nodelength(input)
16-bit integer, by value. Length of nodename in bytes. If omitted,
NSSTATUS information will be obtained from the local node.
status(output)
Required 16-bit by value. 0 is returned if call is successful; otherwise
an error number is returned.
itemnum i(input)
16-bit integer, by value. Item number identifying the item of data to be
retrieved.
item i(output)
Data type varies. By reference. Array in which data identified by
itemnum i will be returned. Required parameter if itemnum i present.
Itemnum/item parameters must appear in pairs. Up to five items of
information can be retrieved by specifying one or more itemnum/item.
Data Items
1. service list
2000-byte character array (output). List of all services installed on
indicated node. Format for the list is given in the data structure shown
in Figure 1-4. NM capability is not required.
Service List Fields
Number of The number of Service List Entries included.
Services
Service List One for each configured server. Format for the list
Entry entry is given in the data structure shown in Figure
1-5.
Service List Entries
Service Name The name of the service; a port name for a local service
or a socket name for a remote service.
Server Type The name of the server created for service requests to
Name this service.
ST If 0, the service has not been started. If1, the
service has been started.
RM If 0, the service is local. If 1, the service is
remote.
2. server list
2000-byte character array (output). List of all servers installed on
indicated node. Format for the list is given in the data structure shown
in Figure 1-6.
Server List Fields
Server Type One for each type of server.
List
3. user list
2400-byte character array (output). List of all users currently using NS
on indicated node. Formats for the data structures of the user list and
user list entries are shown in Figures 1-9 and 1-10 respectively.
4. service started
16-bit integer. Returns a value indicating one of the following
conditions:
-1 = Named service not installed.
0 = Named service not started.
1 = Named service started.
NM capability is not required.
5. service local
16-bit integer. Returns a value indicating one of the following
conditions:
-1 = Named service not installed.
0 = Named service is remote.
NM capability is not required.
6. service server
8-byte character array. Name of server associated with named service.
If the named server is not available, then eight ASCII spaces are
returned. Network manager capability is not required.
7. min servers
16-bit integer. Minimum number of servers for the named server type on
the indicated node. A returned value of -1 implies that the named server
does not exist.
8. max servers
16-bit integer. Maximum number of servers of the named server type on
the indicated node. A returned value of -1 implies that the named server
is not available.
9. debug create
16-bit integer. Returns a value indicating one of the following
conditions:
-1 = Named server is not available.
0 = Named server is not created with debug option.
1 = Named server is created with debug option.
10. active servers
16-bit integer. Current number of active servers of the named server
type on the indicated node. A returned value of -1 implies that the
named server type is not available.
11. reserved servers
16-bit integer. Current number of reserved servers for the named type on
the indicated node. A returned value of-1 implies that the named server
type is not available.
12. server type list
2000-byte character array (output). List of servers of named server type
on the indicated node. Format of the data structure of the server type
list is shown in Figure 1-7.
Server Type List Fields
Server Name The name of the server program file, without the group
and account.
Minimum Servers The minimum allowed number of servers for this type.
Maximum Servers The maximum allowed number of servers for this type.
Create With If 0, servers are not created with the debug option.
Debug If 1, servers are created with a debug breakpoint.
Number of The number of active and reserved servers for this type.
Servers
Server Type One for each active and reserved server process. Format
Entry of the data structure of each server type entry is shown
in Figure 1-8.
Server Type Entry Fields
Server PIN The process ID number for the server.
Job Number The number of the job or session into which the server
has adopted. If the server is in the system
environment, the job number is 0.
Service The service using the server (DSSERVER only). Values
are:
0- VTL (Normal VT Terminal Monitor)
1- VT (Normal VT Application Monitor)
2- RFA 4- RPM
5- VTR (Reverse VT Terminal Monitor)
6- VTRL (Reverse VT Application Monitor)
AC If 0, the server is reserved. If 1, the server is
active.
13. user.acct
26-byte character array. The user and account for the named session on
the indicated node. If the named user is not present, then 26 ASCII
spaces returned.
14. job number
16-bit integer. The job number for the named session on the indicated
node. If the specified session is not present, then -1 is returned.
15. session ID
16-bit integer. The first 16 bits of the session ID assigned to the user
on the indicated node. If the named user is not present, then -1 is
returned.
16. user type
16-bit integer. Returns a value indicating one of the following
conditions:
-1 = Named user is not present.
0 = Named user is remote.
1 = Named user is local.
17. num environments
16-bit integer. Number of active environments for the named user on the
indicated node. If the named user is not present, then-1 is returned.
18. environment list
2400-byte character array (output). List of environments for the named
user on the indicated node. Formats for the data structures of the
environment list and environment list entries are shown in Figures 1-11
and 1-12 respectively
Description
For items 1 through 3, the name and namelength parameters are ignored.
For items 4 through 6, the name and namelength parameters specify the
service for which NSSTATUS information will be returned.
For items 7 through 12 the name and namelength parameters specify the
server type.
For items 13 through 18, the name and namelength parameters specify the
user for whom information will be returned. The format can be user.acct
(specifying the user and account), or #J/Snnn (whereJ is the job number
and S is the session number). Note: if there is more than one session
for a user.acct, only information on the first session found will be
returned.
The calling user must have Node Manager (NM) capability to retrieve all
except item numbers 1, 4, 5, and 6. This intrinsic may not be called in
split stack mode. The condition code remains unchanged.
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,VtStarted);
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 to1 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,NodeLength, 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.
Figure 1-4. Service List Data Structure
Figure 1-5. Service List Entry Data Structure
Figure 1-6. Server List Data Structure
Figure 1-7. Server Type List Data Structure
Figure 1-8. Server Type Entry Data Structure
Figure 1-9. User List Data Structure
Figure 1-10. User List Entry Data Structure
Figure 1-11. Environment List Data Structure
Figure 1-12. Environment List Entry Data Structure
Table 1-2. NSSTATUS Error Codes
---------------------------------------------------------------------------------------------
| | |
| Error Number | Meaning |
| | |
---------------------------------------------------------------------------------------------
| | |
| 0 | Successful completion of NSSTATUS intrinsic. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 1 | Required parameter missing. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 2 | Invalid item number. Item number must be an integer in the range 1 |
| | to 18. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 3 | Item number specified without corresponding item array. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 4 | Item array specified without corresponding item |
| | |
---------------------------------------------------------------------------------------------
| | |
| 5 | Name length too large. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 6 | Name length too small. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 7 | Expected a job or session number. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 8 | Non-numeric character in the job or session number. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 9 | Expected '#' as first character in Name parameter. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 10 | Bounds violation. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 11 | Unknown or invalid node name. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 12 | Node name specified without node name length. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 13 | Node name length specified without node name. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 14 | Communications error occurred with the remote NSSTATUS server. Most |
| | likely the remote system does not support the NSSTATUS intrinsic. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 15 | Node Manager (NM) capability required to retrieve the requested item. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 16 | DB not stack. (NM) capability required to retrieve the request. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 17 | Local NSSTATUS service has not been started. See Node Manager. |
| | |
---------------------------------------------------------------------------------------------
MPE/iX 5.0 Documentation