Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  • Internet Information Server (IIS) with ASP.NET
  • SQL Server
  • Visual Studio .NET

Please also refer to Running up.time on MS SQL Server.


Setting up a Database Connection


  1. In Microsoft Visual Studio .NET, right-click Reports and choose Add New Report.

    The Report Wizard starts.

  2. Click Next.
  3. Select Shared data source and then select the database from which you are retrieving data.

  4. Click Next.
  5. Enter the following query string:

    Code Block
    SELECT e.display_name AS 'Description',
    AVG(p.cpu_usr + p.cpu_sys + p.cpu_wio) 
    AS 'CPU Workload Average',(CONVERT(char(10),s.sample_time,102)) AS 'Date' 
    FROM performance_sample s, performance_aggregate p, entity 
    WHERE = p.sample_
    AND e.entity_id = s.uptimehost_
    AND s.sample_time > '
    AND s.sample_time < DATEADD(day,5,'
    GROUP BY (convert(char(10),s.sample_time,102)), e.display_
    ORDER BY (convert(char(10),s.sample_time,102)), e.display_name;

    This example will report on the CPU workload average for all systems over the five day period from 2006-11-29 to 2006-12-03 (simply change the dates or the interval as required).

  6. Click Next after you change the range to suit your needs.
  7. Choose the Matrix option and then click Next.

    The Design the Matrix window appears, which enables you to change the way in which data is arranged in the report.

    In this example:

    • Description is moved to the Rows field.
    • Date is moved to the Columns field.
    • CPU Workload Average is moved to the Details field.


  8. Click Next.
  9. In the Choose Matrix Style window, select Compact.

    The Design the Matrix window appears.

  10. Select to display all of the fields in the report and then click Next.
  11. Click the Preview Report check box at the bottom of the page.

  12. Click Finish to generate a preview of the report.


Published reports may not render properly in web browsers other than Internet Explorer. If, for example, you have set your default browser to Firefox and the report does not open properly after you have published it, copy and paste the URL of the report into Internet Explorer. You can also view the report by navigating to the Report Manager URL in Internet Explorer. By default, the URL is http://localhost/Reports/Pages/Folder.aspx.