Time stamp on graphs

Devante Vargas <[email protected]>
Newsgroups gmane.comp.db.rrdtool.user
Message-ID <CAC-+=+OuZUC15KpsHYqsh-yG5JHdtAUArHjgrja5g9X1NVtgvw@mail.gmail.com>
Hello,

I am trying to add timestamps to my graphs. I use a scheduled PowerShell
script to execute the rrdtool to generate the graphs. I typically do it in
the format of:

$CMD = "C:\path\to\rrdtool.exe"
$arg1 = "graph"
$arg2 = "graph.png"
$arg3 = "--title"
$arg4 = "Graph title"
$arg5 = "--width"
$arg6 = "400"
$arg7 = "--vertical-label"
$arg8 = "Percentage"
$arg9 = "--rigid"
$arg10 = "DEF:sload=rrdfile.rrd:load:LAST"
$arg11 = "DEF:sservers=rrdfile.rrd:servers:LAST"
$arg12 = "DEF:balanced=rrdfile.rrd:lbo:LAST"
$arg13 = "GPRINT:sservers:LAST:%4.lf\j"

& $CMD $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7 $arg8 $arg9 $arg10 $arg11
$arg12 $arg13

I googled around and found someone adding *"Date\: $(date "+%F %T" | sed
's/:/\\:/g')\r" *but not sure how this would get added in the context above.

Any suggestions?

Thanks,

Devante

_______________________________________________
rrd-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.