Reports statistics on system usage.
sp_reportstats [loginame]
is the login name of the user to show accounting totals for.
Displays a report of current accounting totals for all Adaptive Server users:
sp_reportstats
Name Since CPU Percent CPU I/O Percent I/O ------ ----------- ----- ------------ ----- ------------- julie jun 19 1993 10000 24.9962% 5000 24.325% jason jun 19 1993 10002 25.0013% 5321 25.8866% ken jun 19 1993 10001 24.9987% 5123 24.9234% kathy jun 19 1993 10003 25.0038% 5111 24.865% Total CPU Total I/O --------- --------- 40006 20555
Displays a report of current accounting totals for user “kathy”:
sp_reportstats kathy
Name Since CPU Percent CPU I/O Percent I/O ------ ----------- ----- ------------ ----- ------------- kathy Jul 24 1993 498 49.8998% 48392 9.1829% Total CPU Total I/O --------- ---------- 998 98392
sp_reportstats prints out the current accounting totals for all logins, as well as each login’s individual statistics and percentage of the overall statistics. sp_reportstats accepts one parameter, the login name of the account to report. With no parameters, sp_reportstats reports on all accounts.
sp_reportstats does not report statistics for any process with a system user ID (suid) of 0 or 1. This includes deadlock detection, checkpoint, housekeeper, network, auditing, mirror handlers, and all users with sa_role.
The units reported for “CPU” are machine clock ticks, not Adaptive Server clock ticks.
The “probe” user exists for the two-phase commit probe process, which uses a challenge-and-response mechanism to access Adaptive Server.
Only a System Administrator can execute sp_reportstats.
System procedures sp_clearstats, sp_configure