Hi There,
for anyone reading along I hope the following example helps you figure out how to work with historical data using the "dfm graph" command (for OnCommand developers, it would be great if you could update the documentation and provide additional examples).
The -s <start-date> and -e <end-date> parameters in the help example are based on the number of seconds (because providing a real date like "2013-07-02" would be way too logical right!)
For example, in the following command:
the -D "%Y-%m-%d %H:%M:%S" formats the results (which should work nicely with SQL server %yyyy%-%mm%-%dd% %hh%-%mm%-%ss%")
The -s 86400 is the number of seconds in the past you want to query the data from (86400 = 1 Day (60 seconds * 60 minutes * 24 hours))
The -e 0 means the end time in seconds you want to query
The "cpu" is the name of the graph (to view available graphs run "dfm graph" which will list the defaults)
The -1d is for one day
The "32563" is the DFM object ID of the storage controller you want to run query the data for (To find the dfm object ID run "dfm report view -F csv controllers" and search for the hostname)
Example:
C:\>dfm graph -F csv -D "%Y-%m-%d %H:%M:%S" -s 86400 -e 0 cpu-1d 32563
"Timestamp","CPU Used"
"2013-07-02 12:00:00","17.6"
"2013-07-02 12:15:00","20.4"
"2013-07-02 12:45:00","16.7"
"2013-07-02 13:00:00","9.6"
"2013-07-02 14:00:00","15.9"
"2013-07-02 15:00:00","17.2"
"2013-07-02 16:00:00","14.4"
"2013-07-02 17:00:00","17.0"
"2013-07-02 18:00:00","20.7"
"2013-07-02 19:00:00","16.9"
"2013-07-02 20:00:00","12.4"
"2013-07-02 21:00:00","8.2"
"2013-07-02 22:00:00","10.1"
"2013-07-02 23:00:00","8.4"
"2013-07-03 00:00:00","8.7"
"2013-07-03 01:00:00","31.8"
"2013-07-03 02:00:00","10.0"
"2013-07-03 03:00:00","8.1"
"2013-07-03 04:00:00","11.2"
"2013-07-03 05:00:00","2.7"
"2013-07-03 06:00:00","5.9"
"2013-07-03 07:00:00","13.0"
"2013-07-03 07:45:00","11.3"
"2013-07-03 08:45:00","14.4"
"2013-07-03 09:45:00","15.0"
"2013-07-03 10:45:00","12.6"
"2013-07-03 11:45:00","15.2"
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.