Mircea (5/21/2015)
I did not urge anyone to use the script, so please short of explaining exactly why - do not urge anyone to do anything else but analyse the script and decide for themselves whether to use it or not.
I thought that the whole purpose of posting ready-to-use scripts is that other people don't have to spend a lot of time doing code review and making sure that script does what is was designed to do.
To name a few:
1. spid is not unique in sysprocesses
2. spid can be easily assigned to another connection from different user during 3 seconds interval
3. cpu in sysprocesses will show only cpu consumed by main thread in multi-threaded plan