Several server administrative functions have been provided. The functions report the status of the server, remove clients from the server, modify the number of processes the server can run, and shut down the server.
The server administrative functions are performed by empsvadm which has the following syntax:
| empsvadm server_name |
|svinfo
|svstats
|svrmall
|svshut
|svnprocs no_of_processes
|svremove client_id {client_id} |
| | | | | | |
where:
| server_name | is the name of the server. It must exist in the Server Configuration File. |
| no_of_processes | is the number of the server sub-processes. |
| client_id | is the client identification number. It can be obtained from the status report generated by using the option svinfo. |
The functions svstats and svinfo report the status of the server and can be used by anyone. The function svinfo produces a subset of a report whereas svstats produces a full report on the status of the server.
svremove and svrmall remove clients from the server, and can only be used by the server administrator or the user who started the server. These commands may be used, for example, if one or more client processes has "hung", and will remove client information from the server.
svnprocs changes the number of server sub-processes. It can only be used by the server administrator or the user who started the server. If the number of server sub-processes is increased, then new clients will be allocated to the new server sub-processes. If the number of server sub-process is decreased, then the corresponding number of server sub-processes will be terminated if they are not currently assigned to clients. If all server sub-processes are assigned to clients, the command will take effect as each server sub-process completes all of its client requests.
svshut shuts down the server and can only be used by the server administrator or the user who started the server.
If the specified server is not running, empsvadm will return an error after the appropriate timeout and retry conditions have been met.
The following is an example of the output from an svstats request:
Server Name: zinc_server Machine ID: 192.43.219.20 Number of servers = 3 Server ID Number of Clients 23118 1 Number of Clients = 1 Client ID Proc ID Server ID Machine ID 1204516035 25079 23118 192.43.219.21 Username Status sumh NOT ASSIGNED Number of requests - 28 Number of repeated requests - 19 Average request size - 120.75 Size of largest request - 357 Current request frequency - 0 Maximum request frequency - 2 Total queued requests - 0
The first section provides the name of server and the Machine ID.
The first line of the second section gives the number of server sub-processes running and some details for each sub-process. Server ID is the process ID of the server sub-process on the host machine. Number of clients indicates how many clients each server sub-process is currently handling.
The next section gives information on active clients. The first line of this section indicates the number of active clients. It should match the sum of the number of clients in the previous section. The client ID is a unique identifier for each client process. The Proc ID is the process id of that client. The Server ID is the process ID of the server handling requests for that client. It will be zero for all administrative functions. Machine ID is the network identifier of the machine where the client is running. Username is the client's user name. Status shows the client's relationship to a server sub-process where:
| ASSIGNED | Request is assigned to a server sub-process. |
| NOT ASSIGNED | This is a server administrative function and is therefore not assigned to a server sub-process. |
| SERVER DIED | The server sub-process no longer exists. |
The statistics section comes next. Please note that statistics are cumulative since the server started.