|
| This chapter explains how to control TG in the command-line. |
| |
| AUTOEXEC |
| |
Synopsis |
: |
autoexec < on | off > |
| options |
: |
|
| |
|
- |
| |
|
enables or disables a job executed automatically. When this setting is made "OFF", Even if the event set as a trigger occured, JOB is not executed. |
| |
| |
| CHECK |
| |
Synopsis |
: |
check config [ Agent | Operator ]
check driver [ MySQL | PostgreSQL | ORACLE ]
check isolation
|
| options |
: |
|
| |
|
config [ Agent | Operator ] |
| |
|
tests agent or operator(*) be able to connect to the target database using a current configration.
* "Operator " is the database user which is used when you execute SQL manually. |
| |
|
|
| |
|
driver [ MySQL | PostgreSQL | ORACLE ] |
| |
|
tests JDBC driver correctly loaded which is specified at "DRIVER_CLASS" parameter. When JDBC driver name is given , specified JDBC driver will be checked. |
| |
|
|
| |
|
isolation |
| |
|
tests transaction isolation level supported by JDBC driver which is specified at "DRIVER_CLASS" parameter. |
| |
|
|
| |
| DELETE |
| |
Synopsis |
: |
delete config < config-name > |
| options |
: |
|
| |
|
config < config-name > |
| |
|
deletes specified configration which is registered in TG. |
| |
| |
| EDIT |
| |
Synopsis |
: |
edit config
edit job <job-number> |
| options |
: |
|
| |
|
config |
| |
|
Open current configration using a editor which is specified by EDITOR system parmeter. |
| |
|
|
| |
|
job <job-number> |
| |
|
Open specified JOB by job-number using a EDITOR which is specified by EDITOR system parmeter. |
| |
| |
| EXECUTE |
| |
Synopsis |
: |
execute job < job-number > |
| options |
: |
|
| |
|
job < job-number > |
| |
|
execute specified JOB by job-number manually. The JOB of which JOB_TYPE is "USER_REQUEST" is never executed as long as this command is not used. |
| |
| |
| EXIT |
| |
Synopsis |
: |
exit |
| options |
: |
|
| |
|
- |
| |
|
Terminates TG when TG is running in COMMANDLINE-mode.
Exits from Terminal when TG is running in SERVER-mode. |
| |
| |
| HELP |
| |
Synopsis |
: |
help |
| options |
: |
|
| |
|
- |
| |
|
Access the command-line help system. |
| |
| |
| HISTORY |
| |
Synopsis |
: |
history |
| options |
: |
|
| |
|
- |
| |
|
Displayes command history that you have input.
* This command is supported by TG ver 0.86 or later. |
| |
| |
| LIST |
| |
Synopsis |
: |
list config |
| options |
: |
|
| |
|
config |
| |
|
Displays the list of jobs which are registed in TG. |
| |
| |
| MASTERSERVER |
| |
Synopsis |
: |
masterserver < on | off > |
| options |
: |
|
| |
|
- |
| |
|
Change Multi-server mode on / off. When this setting is made "OFF", REMOTE_SERVER parameter is ignored. |
| |
| |
| MONITOR |
| |
Synopsis |
: |
monitor [ detail | summary ] [ < monitoring-time > ] [ wait ]
|
| options |
: |
|
| |
|
shows transaction statistics every 1 second. |
| |
|
|
[ summary | details ] |
| |
|
When you use "details" option at Multi-server mode, per-server transaction statistics is displayed. |
| |
|
|
[ seconds ] |
| |
|
Specifies the monitoring period in seconds. When you want to stop the monitoring, use "monitor off" command. |
| |
|
|
[ wait ] |
| |
|
The prompt is not returned until the monitoring period ends. This command is used to execute TG from a batch file or shell script. |
| |
|
|
[ off ] |
| |
|
Finishes monitoring forcibly. |
| |
| |
|
|
| |
|
The meaning of each columns that are displayed by MONITOR command as follows : |
| |
| |
|
|
TRGT(TaRGeT agent status) |
| |
|
|
|
Shows the status which is treated as a target by virtual clients(Agents). Specifically,
If TARGET AGENT STATUS and CURRENT AGENT STATUS is different, Agent is trying to be a status
which is specified by TARGET AGENT STATUS.
There are 5 statues as follows :
- TERM(TERMINATED)
Agent is inactive and has been disconnected from the database.
- WAIT(WAITING)
Agent has been connected to the database, but does not anything.
-DISC(DISCONNECTED)
Agent is active, but has been temporally disconnected from the database.
- ACTV(ACTIVE)
Agent is active.
- KILL(KILLED)
Agent is inactive and has been forcibly disconnected from the database. |
| |
| |
|
|
CONN(CONNected) |
| |
|
|
|
Displays the number of agents which have been connected to the database. |
| |
| |
|
|
DISC(DISConnected) |
| |
|
|
|
Displays the number of agents which have been temporally disconnected from the database. |
| |
| |
|
|
TERM(TERMinated) |
| |
|
|
|
Displays the number of agents which are inactive and have been disconnected from the database. |
| |
| |
|
|
ERR(ERRorS per second) |
| |
|
|
|
Displays the number of errors which occured in one second. |
| |
| |
|
|
TPS(Transactions Per Second) |
| |
|
|
|
Displays the number of transactions which are executed in one second. |
| |
| |
|
|
HOSTNAME |
| |
|
|
|
Shows the hostname which TG is running on as a slave server. |
| |
| |
|
|
PORT |
| |
|
|
|
Shows the port number which TG is listening as a slave server. |
| |
| |
|
|
SERVER STATUS |
| |
|
|
|
Shows TG server status. There are 6 statuses as follows :
- SYSTEM
Indicates TG Master server.
- UNKNOWN
Slave server status is unknown.
- OFFLINE
Slave server is offline.
- CONNECTING
Master server is trying to connect to the slave server.
- ONLINE
Slave server is online.
- FAILED
Master server failed to connect to the slave server or the session between master and slave
is broken unexpectedly. |
| |
| |
| NORMAL |
| |
Synopsis |
: |
- |
| options |
: |
- |
| |
|
|
| |
|
This command is obsolete at TG version 0.84. Please see command "VERBOSE" instead. |
| |
| |
| RELOAD |
| |
Synopsis |
: |
reload config |
| options |
: |
|
| |
|
config |
| |
|
When configuration file (tg.conf) is changed, the change is reflected in TG. This command cannot be executed while Agent is connecting with the target database. In that case, execute this command again after issuing the DISCONNECT command and breaking the connection. |
| |
| |
| REGIST |
| |
Synopsis |
: |
regist config < config-name > |
| options |
: |
|
| |
|
config < config-name > |
| |
|
Registers a current configration in TG giving a name. The registered configuration can be called by the REPLACE command. |
| |
| |
| RENAME |
| |
Synopsis |
: |
rename config < old config-name > < new config-name > |
| options |
: |
|
| |
|
config < old config-name > < new config-name > |
| |
|
Renames specified configration name. |
| |
| |
| REPLACE |
| |
Synopsis |
: |
replace config < config-name > |
| options |
: |
|
| |
|
config < config-name > |
| |
|
Loads specified configuration which is registered in TG. When this command is issued, current configration is overwrited with the loaded configuration. |
| |
| |
| RESETMONITOR |
| |
Synopsis |
: |
- |
| options |
: |
- |
| |
|
|
| |
|
This command is obsolete at TG version 0.84. Please see command "MONITOR" instead. |
| |
| |
| SET |
| |
Synopsis |
: |
| |
SET JDBC_DRIVER |
|
< MySQL | PostgreSQL | ORACLE > |
| |
SET DRIVER_TYPE |
|
< thin | oci | oci8 > |
| SET DRIVER_CLASS |
|
< JDBC driver class string > |
| SET HOSTNAME |
|
[ target hostname ] |
| SET PORT |
|
[ target listener port number ] |
| SET DATABASE_NAME |
|
< target database name > |
| SET SID_NAME |
|
< target SID name > |
| SET TNSNAMES |
|
< target tnsnames > |
| SET JDBC_URL |
|
< JDBC URL string > |
| SET AGENT_USERNAME |
|
< username > |
| SET AGENT_PASSWORD |
|
< password > |
| AGENT_LOGON_OPTION |
|
< Normal | Sysdba | Sysoper > |
| SET SESSIONS |
|
< 1..2000 > |
| SET THINKTIME |
|
< in milli second > |
| SET EXECUTION_COUNT |
|
< -1 or higher > |
| SET RECONNECT_WAIT |
|
< in milli second > |
| SET DELAY_START |
|
< true or false > |
| SET ERROR_RETRY_COUNT |
|
< -1 or higher > |
| SET ERROR_RETRY_WAIT |
|
< in milli second > |
| SET ERROR_RECONNECT_COUNT |
|
< -1 or higher > |
| SET ERROR_RECONNECT_WAIT |
|
< in milli second > |
| SET AUTO_COMMIT |
|
< true or false > |
| SET ISOLATION_LEVEL |
|
< DEFAULT | READ_UNCOMMITTED | READ_COMMITTED | REPEATABLE_READ | SERIALIZABLE > |
| SET SHOW_RESULTSET_ROWS |
|
< number of rows > |
| SET SHOW_STMT_BEFORE_EXEC |
|
< true or false > |
| OPERATOR_USERNAME |
|
< username > |
| OPERATOR_PASSWORD |
|
< password > |
| OPERATOR_LOGON_OPTION |
|
< Normal | Sysdba | Sysoper > |
| INPUT_ENCODING |
|
< encoding name > |
| OUTPUT_ENCODING |
|
< encoding name > |
| OUTPUT_LINEFEED_STRING |
|
< linefeed character code > |
| COLUMN |
|
< column name > < column length > |
|
| options |
: |
|
| |
|
- |
| |
|
Gives a value to each parameter.
* When TG ends, the value given by the SET command is lost. |
| |
| |
| SHOW |
| |
Synopsis |
: |
show columns
show config system
show config database
show config agent
show config variables
show config transactions [ summary | details ]
show config mtransactions
show config jobs
show config terminal
show status agent
show status transactions
show status servers
show throughput [ summary | details ]
show version |
| options |
: |
|
| |
|
shows each configuration and status information. |
| |
| |
|
columns |
| |
|
Shows a list of columns which are registered in Terminal. |
| |
|
|
config system |
| |
|
Shows the whole attribution of TG. For example, log filename, editor, etc ... |
| |
|
|
config database |
| |
|
Shows the target atabase information. This information is specified at the field of DATABASE in "tg.conf" configuration file. |
| |
|
|
config agent |
| |
|
Shows username and password, the number of sessions which are used to connect to the target database by agents. This information is specified at the field of AGENT in "tg.conf" configuration file. |
| |
|
|
config variables |
| |
|
Shows the random variables information registered in TG. This information is specified at the field of VARIABLE in "tg.conf" configration file. |
| |
|
|
config transactions [ summary | details ] |
| |
|
Shows the transaction information registered in TG. This information is specified at the field of TRANSACTION in "tg.cong" configration file.
When you use "details" option, the modified transaction information is added.(random variables are replaced into "?" which means variable in JDBC API 'prepareStatement'). |
| |
|
|
config jobs |
| |
|
Shows the jobs information registered in TG. This information is specified at the field of JOB in "tg.conf" configration file. |
| |
| |
|
config terminal |
| |
|
Shows information about Terminal. |
| |
|
|
status agent |
| |
|
Shows virtual client(Agents) statuses. |
| |
|
|
status transaction |
| |
|
Shows transaction information for last one second. |
| |
|
|
status servers |
| |
|
When you use MultiServer mode, Slave server's information will be displayed. |
| |
|
|
throughput [ summary | details ] |
| |
|
Shows througput statistics information (execution time for one transaction). Time scale is millisecond. Incidenally, when a transaction execution time is less than millisecond, the execution time is treated as "0(zero)" second.
With "Summary(default)" or "details" argument, The output is changed.
+ Summary
Following information is displayed :
- Transaction name : the name of transaction
- Min : minimum execution time
- Max : maximum execution time
- Average : average execution time
+ Details
The above information is displayed at each agent.
* This throughput statistics function is supported by TG ver 0.82 or later. |
| |
|
|
version |
| |
|
Shows TG product version. |
| |
| |
| SLEEP |
| |
Synopsis |
: |
sleep <sleep time > |
| options |
: |
|
| |
|
<sleep time > |
| |
|
specify the sleep time in second. TG doesn't recieve a command during this time.
This command is useful when TG is executed in a batch file or schell script.
* This command is supported by TG ver 0.83 or later. |
| |
| |
| SPOOL |
| |
Synopsis |
: |
spool <spool filename | on | off > |
| options |
: |
|
| |
|
<spool filename > |
| |
|
Stores query results in the specified logfile. |
| |
|
|
| |
|
< on | off > |
| |
|
Stores query results in the "YYYYMMDDHH24MISS.log" logfile. |
| |
| |
| SQL |
| |
Synopsis |
: |
sql < SQL statement > |
| options |
: |
|
| |
|
< SQL statement > |
| |
|
Executes a specified SQL statement. SQL statement is executed by an user who is set to OPERATOR_USERNAME parameter.
Incidentally, You can fix a resultset is get by SELECT SQL statement using COLUMN parameter.
* This command is supported by TG ver 0.85 or later. |
| |
| |
| SWITCH |
| |
Synopsis |
: |
switch |
| Others |
: |
This command is supported by TG ver 0.91 or later. |
| Options |
: |
|
| |
|
- |
| |
|
Change the mode of TG into SQL-mode. In this mode, you can execute SQL statements.
Incidentally, you can not use transaction. A SQL statement which is executed is committed immediately.
About available commands in SQL-mode, See "SQL-mode". |
| |
| |
| TERMINATE |
| |
Synopsis |
: |
terminate |
| options |
: |
|
| |
|
- |
| |
|
terminates TG when TG is running in SERVER-mode. |
| |
| |
| VERBOSE |
| |
Synopsis |
: |
verbose [Agent-ID] |
| options |
: |
|
| |
|
- |
| |
|
Changes agent status into the verbose-mode. Verbose Mode lets you look at the actual agents processing. Executing SQL statements, getting results of the query, etc... However, verbose-mode consumes a lot of CPU time. Please use this mode only for specific. |
| |
|
|
| |
|
[ Agent-ID ] |
| |
|
Changes specified agent into the verbose-mode with Agent-ID. |
| |
| |
| ! |
| |
Synopsis |
: |
!<command> |
| options |
: |
|
| |
|
< command > |
| |
|
Executes external commands or batch files, shell scripts, etc. |
| |
| |
| CONNECT |
| |
Synopsis |
: |
connect [ all ] |
| options |
: |
|
| |
|
- |
| |
|
Generates agents and makes them connect to the target database. The number of agents is specified at SESSIONS parameter in "tg.conf" configration file.。 |
| |
|
|
| |
|
[ All ] |
| |
|
The prompt is not returned until all Agents connect to the target database. This option is used when TG is executed in a batch file or schell script. |
| |
| |
| DISCONNECT |
| |
Synopsis |
: |
connect [ all ] |
| options |
: |
|
| |
|
- |
| |
|
Makes agents disconnect from the target database. |
| |
|
|
| |
|
[ All ] |
| |
|
The prompt is not returned until all Agents disconnect from the target database. This option is used when TG is executed in a batch file or schell script. |
| |
| |
| KILL |
| |
Synopsis |
: |
kill agent < AgentID | all > |
| options |
: |
|
| |
|
< AgentID | all> |
| |
|
Makes agent disconnect from the target database forcibly. You can kill all of the agent and the specified agent only. |
| |
|
|
| |
| |
| START |
| |
Synopsis |
: |
start |
| options |
: |
|
| |
|
- |
| |
|
Changes agent status from "WAIT" into "ACTIVE".
*This command can be issued When agent status is "WAIT". |
| |
| |
| STOP |
| |
Synopsis |
: |
stop |
| options |
: |
|
| |
|
- |
| |
|
Changes agent status from "ACTIVE" into "WAIT".
*When this command is issued, the session between Agents and the target database is kept, never cut. |
| |
| |
| CONNECT |
| |
Synopsis |
: |
connect <USERNAME>/<PASSWORD> [as] [SYSDBA | SYSOPER] |
| Others |
: |
This command is supported by TG ver 0.91 or later. |
| Options |
: |
|
| |
|
<USERNAME>/<PASSWORD> [as] [SYSDBA | SYSOPER] |
| |
|
Specifies database username and password, logon-option who executes SQL statements. |
| |
| |
| SWITCH |
| |
Synopsis |
: |
switch |
| Others |
: |
This command is supported by TG ver 0.91 or later. |
| Options |
: |
|
| |
|
- |
| |
|
Change the mode of TG into NORMAL. |
| |
|