By default, sp_sysmon does not clear the monitor counters that are used as source data for the report. If other applications or instances of the sp_sysmon report are running when this is done, clearing the counters may cause the data that they report to be invalid.
Use the optional noclear parameter with sp_sysmon to not clear the monitor counters. For example:
sp_sysmon “00:15:00”, noclear
This example runs the sp_sysmon report
for a 15-minute sample interval without clearing the monitor counters.
You can use the value of noclear
for any
of these parameters, which lets you specify noclear with
other parameter values:
@section
@applmon
@filter
@dumpcounters
For example, to create the report for kernel resource use
while using the noclear
option, issue:
sp_sysmon “00:15:00”, kernel, noclear
When you run sp_sysmon with
the noclear
option, you may
detect a slight increase in the amount of I/O activity
at the beginning of the sample period. The report creates a temporary
table in which to store initial counter values. The impact of this
activity on the data reported by sp_sysmon should
be negligible on any but the most quiescent systems.
You can also run multiple concurrent sessions of sp_sysmon reports using
the noclear
option. Consider
whether other running system monitoring applications use the monitor
counters. If they do, use the noclear
option.
When you execute sp_sysmon 'end_sample' from a session that is different from the one on which you executed 'begin_sample', sp_sysmon does not decrement the monitor counters, and Adaptive Server returns error message number 19374 to the client. This means that, if an application enables the monitor counters and does not disable them before logging out, the usage count continues to reflect the same number of users as it did before the application logged out.