Displays performance information.
sp_sysmon begin_sample
sp_sysmon interval [, noclear,[,section [, applmon]]]
sp_sysmon { end_sample | interval } [, section [, applmon] ]
sp_sysmon { end_sample | interval } [, applmon ]
starts sampling. You cannot specify a section when you specify begin_sample.
when this option is included, the monitor counters are not zeroed out.
is the abbreviation for one of the sections printed by sp_sysmon. Table 1-21 lists the values and corresponding names of the report sections.
specifies whether to print application detail, application and login detail, or no application detail. The default is to omit the application detail. Valid values are listed in Table 1-22.
This parameter is only valid when printing the full report and when you specify appmgmt for the section.
ends sampling and prints the report.
specifies the time period for the sample. It must be in HH:MM:SS form, for example “00:20:00”.
Prints monitor information after 10 minutes:
sp_sysmon "00:10:00"
Prints only the “Disk Management” section of the sp_sysmon report after 5 minutes:
sp_sysmon "00:05:00", diskio
Starts the sample, executes procedures and a query, ends the sample, and prints only the “Data Cache” section of the report:
sp_sysmon begin_sample go execute proc1 go execute proc2 go select sum(total_sales) from titles go sp_sysmon end_sample, dcache go
Prints the full report and includes application and login detail for each login:
sp_sysmon "00:05:00", @applmon = appl_and_login
Report usage without clearing the counters:
sp_sysmon "00:01:00", kernel, noclear
You can also use:
sp_sysmon "00:01:00", noclear
You can use the noclear parameter only when you specify a sample interval in sp_sysmon. If you specify begin_sample or end_sample you cannot use noclear.
sp_sysmon displays information about Adaptive Server performance. It sets internal counters to 0, then waits for the specified interval while activity on the server causes the counters to be incremented. When the interval ends, sp_sysmon prints information from the values in the counters. See the Performance and Tuning Guide for more information.
To print only a single section of the report, use the values listed in Table 1-22 for the second parameter.
If you use sp_sysmon in batch mode, with begin_sample and end_sample, the time interval between executions must be at least one second. You can use waitfor delay "00:00:01" to lengthen the execution time of a batch.
During the sample interval, results are stored in signed integer values. Especially on systems with many CPUs and high activity, these counters can overflow. If you see negative results in your sp_sysmon output, reduce your sample time.
Only a System Administrator can execute sp_sysmon.
Values in event and extrainfo columns from the sysaudits table are:
Event |
Audit option |
Command or access audited |
Information in extrainfo |
---|---|---|---|
38 |
exec_procedure |
Execution of a procedure |
|
Copyright © 2005. Sybase Inc. All rights reserved. |