I/O

  • How can I determine the TOTAL I/O my SQL Server 7.0 production box is doing ?

  • Select SUM(physical_io) from sysprocesses

    quote:


    How can I determine the TOTAL I/O my SQL Server 7.0 production box is doing ?


  • 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.

  • 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 ???

  • 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