[rrd-users] Automatic Timestamp in RRD graphs
rrd-users at ficos.de
Thu Nov 27 16:01:15 CET 2008
Tobias Oetiker wrote:
> Today Martin Knoblauch wrote:
>> I think my reply/question did not hit the list ...
>> ----- Original Message ----
>>> From: Erik de Mare <erik at oezie.org>
>>> To: Martin Knoblauch <spamtrap at knobisoft.de>
>>> Cc: rrd-users rrd-tool <rrd-users at lists.oetiker.ch>
>>> Sent: Wednesday, November 26, 2008 2:57:35 PM
>>> Subject: Re: [rrd-users] Automatic Timestamp in RRD graphs
>>> add something like COMMENT:`date`
>> OK, while this does not necessary satisfy my laziness, it seems to work kind of. So I add the following to my legend:
>> " COMMENT:'\s' COMMENT:'\s' COMMENT:'$datestring'"
>> "$datestring" has my desired timestamp. All is good so far, but the
>> string is left aligned. I would like to have it on the right lower
>> corner of my graph? I read about "\r", but it does not work.
> this does generally work well, make sure though,
> a) that \r actually reaches rrdtool and does not get eaten by some
> intermediary step
> b) try with a more recent version of rrdtool ... not sure about the
> exact bug/feature set of 1.2.15.
ok, I guess I wasn't precise enough. And I remebered it wrong (sorry Martin)
It doesn't seem possible to used left *and* right alignment in one line.
I'd like to add a timestamp in this graph rightbound in *the same line* with
the legend: see http://mail.ficos.de/rrdtool/test0.png
rrdtool graph $1 \
--title="CPU stats" \
So I added:
"COMMENT: Date\: $(date "+%F %T" | sed 's/:/\\:/g')\r"
which leads to: http://mail.ficos.de/rrdtool/test1.png
(entire line right bound)
If I now change the last line above to
which leads to: http://mail.ficos.de/rrdtool/test2.png
So now the legend is left-bound and the timestamp is
right-bound, however, on two different lines ...
More information about the rrd-users