Command Line Options
GS_ADMIN Command Line Options Many of the Session Administrator features are available from the command line. The features available include Monitoring, Shadowing, and Terminating Session(s). Additionally you can create an ASCII text file on demand that will contain a snapshot of the information contained on the Session Administrator main screen.
The GS_ADMIN command line utility provides the capability to launch Session Monitoring or Session Shadowing etc. from your own application. Command line arguments are used to specify the operation (feature) and the session to perform the operation on.
Command: GS_ADMIN Description: Command line utility that performs GS_ADMIN functions.
The gs_admin command line utility has three possible syntaxes.
Syntax 1: GS_ADMIN [/m|/s|/t] [/pPID]|[ [/iIP]|[/uUser] ] [/k]
Syntax 2: GS_ADMIN [/T] [/k]
Syntax 3: GS_ADMIN [/I[Infofilename]] [/k]
Arguments: The number of arguments depends on the operation selected.
/m is for monitoring
/s is for Shadowing
/t is to terminate a specific session
/T is to terminate all sessions
/p select by Process ID (PID)
/i select by client’s IP Address
/u Select by user’s name
/k keep running gs_admin after completion of the operation This argument is valid with all 3 syntax formats.
/I is to create a snapshot of the SSH2/Telnet Status information in the file gs_ainfo.txt (default) or specified filename.
Syntax 1 is used to Monitor, Shadow or terminate a specific session
Syntax 2 is used to Terminate ALL SSH2/Telnet sessions
Syntax 3 is used to obtain a snapshot of the SSH2/Telnet server status information.
Note: Syntax formats not listed have undetermined results.
Syntax 1 – Monitoring/Shadowing/Terminating a specific session
Choose the operation (monitor, shadow, terminate) for the SSH2/Telnet session.
Next select one of the following [/pPID]|[ [/iIP]|[/uUser] ] to Filter the session.
/pPID Filter based on Process ID (PID). Where PID is the Process Id of the desired session. Each session will have a unique process id.
OR
/iIP Filter based on the IP address /uUser Filter based on the User Name Note: You may use either or both of the IP Address and User Name filter arguments.
Example – the GSW GS_ADMIN Command Line Utility – Syntax 1 - Monitor
The following is the syntax to use the GS_ADMIN command line utility to launch the Session Monitor for User “Doug”.
GS_ADMIN /m /uDoug
Example – the GSW GS_ADMIN Command Line Utility – Syntax 1- SHADOW
The following is the syntax to use the GS_ADMIN command line utility to launch the Session Shadowing for for User “david” with IP Address 10.110.244.103.
GS_ADMIN /s /udavid /i10.110.244.103
Example – the GSW GS_ADMIN Command Line Utility – Syntax 1 - Terminate
The following is the syntax to use the GS_ADMIN command line utility to terminate Session with user name Doug.
GS_ADMIN /t /uDoug
Syntax 2 – Terminate All Telnet/SSH2 Sessions
The /T operation does not use any additional arguments. This command terminates all SSH2/Telnet sessions.
Example – the GSW GS_ADMIN Command Line Utility – Syntax 2 - Terminate All Sessions
The following is the syntax to use the GS_ADMIN command line utility to terminate ALL SSH2/Telnet sessions.
GS_ADMIN /T
Syntax 3 – Obtain a snapshot of the SSH2/Telnet Server Status
The /I operation creates the file gs_ainfo.txt that contains the current status information for the GSW SSH2/Telnet Server. The file is created in the root GSW SSH2/Telnet Server installation folder. The file contains similar information as displayed in the Session Administrator main screen.
Example – the GSW GS_ADMIN Command Line Utility – Syntax 3 – Status #1
The following is the syntax to use the GS_ADMIN command line utility to create the GSW SSH2/Telnet Server Status Information file.
GS_ADMIN /I
You can also specify the filename and path for the information file.
Example – the GSW GS_ADMIN Command Line Utility – Syntax 3 - Status #2
The following is the syntax to use the GS_ADMIN command line utility to create the GSW SSH2/Telnet Status information file and put it in the file folder c:\telnetstatus\time with the filename mondaynoon.txt
GS_ADMIN /IC:\telnetstatus\time\mondaynoon.txt
Information File Layout
The file uses standard Windows ini format rules.
[File Info]
Version=1.1
GSWTelnetServer
Version=6.31.0010
CreationTime=09/26/03 16:18:42
[Counters]
UserCount=2
[Users]
User0=test1,09/26/03 16:18:22,3800,0,192.168.0.6,Conn
User1=luke,09/26/03 16:18:31,2312,0,192.168.0.6,Conn