Returns performance statistics for SQL Anywhere database servers on Unix.
dbstats [ options ] [ interval ] [ iterations ]
Option | Description |
---|---|
@data |
Reads in options from the specified environment variable or configuration file. See Using configuration files. If you want to protect passwords or other information in the configuration file, you can use the File Hiding utility to obfuscate the contents of the configuration file. See File Hiding utility (dbfhide). |
-d statistic-definition-string |
Specifies the statistic name and the scope (database server, database, or connection) at which the statistic is monitored. For a complete list of statistics that can be monitored, see Performance Monitor statistics. |
-e server-definition-string |
Specifies a comma-separated list of database server names to monitor. If this option is not specified, the dbstats utility reports statistics only for the default database server. |
-l |
Lists the statistics that are available to be monitored. |
-o |
Writes output messages to the named file. |
-v verbosity |
Reports messages at the specified level. The supported values are error, warning, and info. The default level is info. |
interval |
Specifies how often, in seconds, statistics are reported. If you only specify interval, then the utility returns the value of statistics at the specified interval until you stop the reporting of statistics. |
iterations |
Specifies the total number of times statistics are reported. You must specify an interval value if you specify a value for iterations. |
The dbstats utility uses a shared memory connection to monitor SQL Anywhere servers running on the same computer. This utility cannot be used to monitor remote database servers.
A statistic-definition-string takes the following form:
[ [ statistic-name ][ ,[ statistic-name ],[ ... ] ] ] [ :[ database-servers ]/[ databases ]/[ connections ] ]
The values database-servers, databases, and connections are comma-separated lists of database server names, database names, and connection names to monitor. In addition to specifying a comma-separated list of names, you can specify an asterisk (*), which indicates that all database servers, databases, and connections should be monitored. If you do not specify a value for one of the supported scopes, then that scope is not monitored.
If no options are specified for the dbstats utility, the utility automatically monitors the statistics ActiveReq, ConnCount, CurrentCacheSize, DiskRead, DiskWrite, MainHeapPages, and UnschReq, for all scopes in which they are valid.
Exit codes are 0 (success) or non-zero (failure). See Software component exit codes.
Query only the ActiveReq statistic for all databases and connections on the default database server and then exit:
dbstats -c ActiveReq |
Query only the ActiveReq statistic for all databases and connections on the default database server, once per second forever:
dbstats -c ActiveReq 1 |
Query only the ActiveReq statistic for all databases and connections on the default database server five times, once per second, then exit:
dbstats -c ActiveReq 1 5 |
Query the ActiveReq and ConnCount statistics for all databases and connections and then exit:
dbstats -c "[ ActiveReq, ConnCount ]" |
Query the ActiveReq and ConnCount statistics at the database server scope only and then exit:
dbstats -c "[ActiveReq, ConnCount]:*" |
Query the ActiveReq and ConnCount statistics at the database scope only for databases named db1 and db2 running on the default server and then exit:
dbstats -c "[ActiveReq, ConnCount]:/db1,db2/" |
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |