[rrd-users] Start graph at 1st of current month?

SAPPERS Collector collector at sappers.de
Mon Nov 3 10:27:09 CET 2014

I am using in my shell skript:

graph_start_month=$(date --date "$(date "+%Y%m01") 00:00" +%s)

This will give you the unix time (an integer) of the first of the current month.
It will use the timezone of your linux / unix environment.

Example for rrdtool call:

			eval "rrdtool graph tempday.png \
			-t \"am $(date -d @$j '+%A, den %d.%m.%Y')\" \
			-e $(($graph_start_month + 86399)) -s $graph_start_month $graph_defs $graph_caption_past"


-----Ursprüngliche Nachricht-----
Von: rrd-users [mailto:rrd-users-bounces+collector=sappers.de at lists.oetiker.ch] Im Auftrag von defkev
Gesendet: Montag, 3. November 2014 01:53
An: rrd-users at lists.oetiker.ch
Betreff: [rrd-users] Start graph at 1st of current month?


i am looking for the monthly equivalent - if there is any - to the daily "midnight" AT-TIME

if i want my graph to start today at midnight i simple use something like:

but what if i want my graph to start at the 1st of the current month?
all i could come up with was something like this:
>start=midnight 01.11
which will indeed start the graph at the 1st of November, but not very handy as i have to modify the RPN for every concurrent month.

Any advice greatly appreciated!


View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Start-graph-at-1st-of-current-month-tp7582582.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

rrd-users mailing list
rrd-users at lists.oetiker.ch

More information about the rrd-users mailing list