Active IQ Unified Manager Discussions

dfm graph and timestamp

kavan_bhatt
3,032 Views

Hi all,

I am tryint to get the historical figures for volumes. Eg : for a particular volume i want to know the capacity at the end of last month .

I am not getting the correct output i require.

C:\Documents and Settings\admin>dfm graph -F csv volume-usage-1d 2463
"Timestamp","Capacity Used","Trend"
"1261420200","2519940911104","2518603468279"
"1261422900","2519942881280","2518803101349"
"1261424700","2520492810240","2518936190062"
"1261426500","2520492838912","2519069278774"

Now i can't understand this Timestamp bit, i mean there is no proper date and time that i can read. Also how is this Trend calculated.

dfm graph help has following output.  I can't understand -D option and there is no proper way to specify exact date range , rather than calculating seconds etc.

C:\Documents and Settings\admin>dfm graph help

NAME
    graph -- create graphs of data over time

SYNOPSIS
    dfm graph [ <options> ] <graph-name> <name-or-id-to-graph>

DESCRIPTION
    The graph command generates data over time for a particular
    item in the database.

    Use 'dfm graph' with no arguments to get the list of
    graphs.

    The options are
        -s <start-date>
        -e <end-date>
        -D <date-format> (how this option is worked, i cant find)
        -F <output-format>

    The <date-format> is a time format string as defined
    by the strftime library routine.  The default date format
    is the one appropriate for your locale.

    The <start-date> is the number of seconds in the past that
    the graph should start; the <end-date> is the number of seconds
    in the future that the graph should end. Use a negative
    value for <end-date> if the graph should stop in the past.

    Use a suffix afer the <graph-name> to select a different
    range of valid dates; use suffix

        -1d (the default) for data going back 24-48 hours
        -1w for data going back 1-2 weeks
        -1m for data going back 1-2 months
        -3m for data going back 3-6 months
        -1y for data going back indefinitely

    The values above are ranges because the amount of data
    still available depends on whether the current time is near
    the beginning or the end of a day, week, month, or quarter.

    For example, to see the last 60 days of CPU usage for a
    particular storage system, use the "-3m" suffix, because "-1m"
    may not have all the data you request.  The command is

        $ dfm graph -s 5184000 -e 0 cpu-3m system1

    The <output-format> is the type of format in which the output will
    be generated. Supported output formats are text, html, csv, xls,
    png and gif. The output for html, png and gif is in binary format
    and needs to be redirected to a file with proper extension to open it.

    For example, to see the output of the graph 'volume-usage'
    in gif format, issue the command like below

        $ dfm graph -F gif volume-usage > graph.gif

Please can any one help on this , thanks in advance.

1 REPLY 1

hiyer
3,032 Views

The timestamp displayed by default is the seconds since Epoch time. As the help specifies, you can use any of the flags that strftime allows to specify your own format - if you have access to a linux machine, run 'man strftime' on it. The simplest would be to specify "%c", which would give the time format specific to your locale, as:

[root@trinity ~]# dfm graph -D "%c" qtree-usage-1d
Tuesday 22,December,2009 01:15:00 AM IST 616771584 2108146768
Tuesday 22,December,2009 02:15:00 AM IST 616771584 2234593948
Tuesday 22,December,2009 02:30:00 AM IST 616771584 2266205743
Tuesday 22,December,2009 03:15:00 AM IST 2717454336 2361041128
Tuesday 22,December,2009 03:30:00 AM IST 2717454336 2392652923
Tuesday 22,December,2009 03:45:00 AM IST 2717454336 2424264718
Tuesday 22,December,2009 04:15:00 AM IST 3990343680 2487488307
Tuesday 22,December,2009 05:00:00 AM IST 3990343680 2582323692
Tuesday 22,December,2009 05:15:00 AM IST 3990343680 2613935487
Tuesday 22,December,2009 05:30:00 AM IST 3990343680 2645547282
Tuesday 22,December,2009 05:45:00 AM IST 3990343680 2677159077
...

Check the following link for the complete list of format specifiers:

http://www.manpagez.com/man/3/strftime/

Public