With the begin_sample and end_sample parameters, you can invoke sp_sysmon to start sampling, issue queries, and end the sample and print the results at any point in time. For example:
select sum(total_sales) from titles
On systems with many CPUs and high activity, counters can overflow if the sample period is too long.
If you see negative results in your sp_sysmon output, reduce your sample time.