May 16, 2002 at 1:11 pm
How can I determine the TOTAL I/O my SQL Server 7.0 production box is doing ?
May 16, 2002 at 1:25 pm
Select SUM(physical_io) from sysprocesses
quote:
How can I determine the TOTAL I/O my SQL Server 7.0 production box is doing ?
May 16, 2002 at 1:39 pm
doesn't that give I/O #'s for processes since they were started ???
I want to take a quick snapshot and get that I/O for everything.
May 16, 2002 at 2:53 pm
USE MASTER
GO
DECLARE @get_date_and_time DATETIME
SET @get_date_and_time = GETDATE( )
WAITFOR DELAY '00:00:05'
SELECT SUM(physical_io) FROM sysprocesses WHERE last_batch > @get_date_and_time
-- BUT, physical_io is cumulative. I need total I/O for last 5 seconds that is non-cumulative.
Any ideas ???
May 16, 2002 at 4:29 pm
Actually directly there is nothing. But try this
DECLARE @beginval AS int
SELECT @beginval = @@IO_BUSY
WAITFOR DELAY '00:00:05'
SELECT @@IO_BUSY - @beginval FROM sysprocsses
Since @@IO_BUSY represents the amount of input and output operations since SQL Server last started it should be fairly accurate.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply