Monitor utility for Windows (synxfmon)
WSupported on Windows
|
|
|
NSupported in Synergy .NET
|
The Monitor utility for Windows displays information about files opened by xfServer. It tells you which files are open, who opened them, and whether there are locked records within those files. It also indicates whether a connection is active or suspended and enables you to close a connection.
synxfmon [-k remote_port] [-n host_name] [-p port] [-v] [> redirect_file]
Options
-k remote_port
Close (kill) the xfServer connection on the specified remote (client) port.
-n host_name
Host name of the xfServer machine. Required when run from the client. The default is localhost.
-p port
Port where xfServer is running. The default is 2330.
-v
Verbose output.
redirect_file
(optional) The name of a file (including the path) to which output will be sent.
Discussion
The Monitor utility generates a list of all files opened by users for a specific instance of xfServer and displays status information about those files. Each line of nonverbose output has the following format:
[lock_status] username: filename [connection_status]
where [lock_status] is one of the following:
[ ] = There are no locked records in the file
[L] = One or more records in the file are locked
[E] = File is open in exclusive mode (exclusive write or exclusive read/write)
and [connection_status] is one of the following:
[ Active ] = Connection is active
[ Suspended ] = xfServer is holding the context of a client that is temporarily disconnected.
Suspended status can display only when xfServer connection recovery is enabled between the client and server. Suspended status indicates that an unexpected socket disconnect has been detected and xfServer has saved the client context awaiting reconnection. The length of time the connection has been suspended will display in HH:MM:SS format (see sample below). If the client successfully reconnects, connection_status will return to Active. You can use the -k option to kill a suspended connection and delete the context. (For more information on the connection recovery feature, see Using connection recovery (Windows).)
For username, if xfServer is running in run-as-user mode, synxfmon will display the user that originally connected, not the user used to start the service. If an IP address displays instead of a user name, it means the user name was null.
Valid port numbers for the -k and -p options are in the range 1024 through 65535.
The synxfmon utility may be run from either the client or the server. When run from a client, specify the server name with -n. Host_name must be a Windows server.
The -v option returns the remote port number of the client machine along with additional operational information, including the number of READ, STORE, etc., operations that have taken place since the file was opened. For example, synxfmon might yield the following output without the -v option:
[L] tiger\fred: C:\MyFiles\testfile.ism [ Suspended 00:05:22 ]
but if -v is specified, the output might look like this:
User: tiger\fred Port: 24785 [ Suspended 00:05:22 ] 1 file(s) open [L] ISAM: C:\MyFiles\testfile.ism File ops: READ.... 15 READS... 10 STORE... 52
This information can be used in conjunction with the Windows netstat utility on the client and server to assist in client process detection and to close connections when locks are not released.
The -k option kills the connection, releases all file and record locks, and deletes any saved client contexts. You must be a member of the administrator group to use this option. To obtain the remote port number to specify for -k, first run the Monitor utility with the -v option. If the xfServer connection is terminated successfully, a “Successfully closed connection on port remote_port” message is generated; otherwise, you will get an error message. A client that requests I/O from xfServer after synxfmon has terminated its connection receives a “Server session has expired or has been terminated” error ($ERR_SRVEXP).
Specify a redirect_file if you want output to be redirected to a file, rather than displayed to the screen.
Because the -v option can produce a significant amount of output when multiple files are open, we recommend that you redirect output to a file when using this option. |