Ad Widget

Collapse

Table for CPU usage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • prasenjit
    Junior Member
    • Jan 2012
    • 5

    #1

    Table for CPU usage

    I am monitoring the CPU usage of Win2003 server with items SNMPv1 agent. My question is which MySQL table stores the data for this item. I need to generate a report from this table for last 90 days of CPU usage.
    Thanks in advance.
  • justinc
    Junior Member
    • Aug 2011
    • 20

    #2
    First it depends on the value type you are storing unsigned or float.

    Raw data will be stored in history tables. But if you are looking at 90days of data most likely this is out of the range you are storing history data. If this is the case you will need to grab it from the trends table.

    you can run a describe on your tables to figure out what type of value is stored in which table.

    Here are basic examples to get trend data

    For a specific item that is storing Numeric (unsigned) between a specific time frame:
    select * from trends_uint where itemid = 500063 and clock BETWEEN 1328100000 and 1328300000;

    For a specific item that is storing Numeric (float) from a specific time to now:
    select * from trends where itemid = 500263 and clock > 1323820800;

    you can use something http://www.epochconverter.com/ to figure out what epoch time you want to use.
    Last edited by justinc; 14-03-2012, 05:41. Reason: typo

    Comment

    Working...