Collecting metrics

After starting the system, run your applications and collect metrics into an XML file. Use the -o option to specify the output metrics file. The -v option provides a verbose output. The -M option indicates custom or standard modes.

You can collect metrics either:

For example, the command below writes XML into a file named a2.xml. The custom mode is depicted within the <bestmode> tags.

QPTune -S host:port/database -A collect -T 0 
        -o a2.xml -v
Program has configured the data source for metrics collection.
Now collecting information from sysquerymetrics on "Tue Feb 19 22:16:04 PST 2008".
<?xml version="1.0" encoding="UTF-8"?>
 <server url="jdbc:sybase:Tds:SHANGHI:5000" type="ASE" mode="custom_1" datetime="Tue Feb 19 22:16:04 PST 2008">
<query id="1">
<qtext> select count(T.title_id) from authors A, titleauthor T 
where A.au_id = T.au_id </qtext>
<elap_avg>300</elap_avg>
<bestmode> custom_1
</bestmode>
</query>
</server>

NoteYou can use the output XML file from the collect operation as input to compare, fix, or start operations.