<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1444315555033_4226"><span id="yui_3_16_0_1_1444315555033_4289">There are specific commands to be used on a Unix shell. You will have to adapt/convert those commands to Powershell.</span></div><div id="yui_3_16_0_1_1444315555033_4303"><br><span id="yui_3_16_0_1_1444315555033_4289"></span></div><div id="yui_3_16_0_1_1444315555033_4330"><span id="yui_3_16_0_1_1444315555033_4289">The date commands provides a date in the specific format. Just to give you some more information (form the data manpage):</span></div><div id="yui_3_16_0_1_1444315555033_4402"><br><span id="yui_3_16_0_1_1444315555033_4289"></span></div><div id="yui_3_16_0_1_1444315555033_4403" dir="ltr"><i id="yui_3_16_0_1_1444315555033_4477"><span id="yui_3_16_0_1_1444315555033_4289">FORMAT controls the output.  Interpreted sequences are:</span></i></div><div id="yui_3_16_0_1_1444315555033_4446" dir="ltr"><i id="yui_3_16_0_1_1444315555033_4476"><span id="yui_3_16_0_1_1444315555033_4289">%F     full date; same as %Y-%m-%d</span></i></div><div id="yui_3_16_0_1_1444315555033_4447" dir="ltr"><span id="yui_3_16_0_1_1444315555033_4289"><i id="yui_3_16_0_1_1444315555033_4475">%T     time; same as %H:%M:%S</i><br></span></div><div id="yui_3_16_0_1_1444315555033_4331"><br><span id="yui_3_16_0_1_1444315555033_4289"></span></div><div id="yui_3_16_0_1_1444315555033_4333" dir="ltr"><span id="yui_3_16_0_1_1444315555033_4289">sed is replacing the text ":" with "\:", probably to escape the character. Maybe you won't need to do that if your Date object on Powershell does the right thing you need.</span></div><br> <blockquote id="yui_3_16_0_1_1444315555033_4230" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div id="yui_3_16_0_1_1444315555033_4229" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1444315555033_4228" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1444315555033_4227" dir="ltr"> <hr id="yui_3_16_0_1_1444315555033_4427" size="1">  <font id="yui_3_16_0_1_1444315555033_4247" face="Arial" size="2"> <b><span style="font-weight:bold;">De:</span></b> Devante Vargas <devantev@gmail.com><br> <b><span style="font-weight: bold;">Para:</span></b> "rrd-users@lists.oetiker.ch rrdtool" <rrd-users@lists.oetiker.ch> <br> <b id="yui_3_16_0_1_1444315555033_4435"><span id="yui_3_16_0_1_1444315555033_4434" style="font-weight: bold;">Enviadas:</span></b> Quinta-feira, 8 de Outubro de 2015 11:21<br> <b><span style="font-weight: bold;">Assunto:</span></b> [rrd-users]  Time stamp on graphs<br> </font> </div> <div id="yui_3_16_0_1_1444315555033_4249" class="y_msg_container"><br><div id="yiv3515659350"><div id="yui_3_16_0_1_1444315555033_4248" dir="ltr">Hello,<div id="yui_3_16_0_1_1444315555033_4287"><br></div><div id="yui_3_16_0_1_1444315555033_4286">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:</div><div id="yui_3_16_0_1_1444315555033_4250"><br></div><div id="yui_3_16_0_1_1444315555033_4252"><div id="yui_3_16_0_1_1444315555033_4285">$CMD = "C:\path\to\rrdtool.exe" </div><div id="yui_3_16_0_1_1444315555033_4284">$arg1 = "graph" </div><div id="yui_3_16_0_1_1444315555033_4251">$arg2 = "graph.png" </div><div id="yui_3_16_0_1_1444315555033_4283">$arg3 = "--title"</div><div id="yui_3_16_0_1_1444315555033_4253">$arg4 = "Graph title" </div><div id="yui_3_16_0_1_1444315555033_4282">$arg5 = "--width" </div><div id="yui_3_16_0_1_1444315555033_4281">$arg6 = "400"</div><div id="yui_3_16_0_1_1444315555033_4255"><div id="yui_3_16_0_1_1444315555033_4254">$arg7 = "--vertical-label" </div><div id="yui_3_16_0_1_1444315555033_4280">$arg8 = "Percentage" </div><div id="yui_3_16_0_1_1444315555033_4279">$arg9 = "--rigid" </div><div id="yui_3_16_0_1_1444315555033_4256">$arg10 = "DEF:sload=rrdfile.rrd:load:LAST" </div><div id="yui_3_16_0_1_1444315555033_4278">$arg11 = "DEF:sservers=rrdfile.rrd:servers:LAST" </div><div id="yui_3_16_0_1_1444315555033_4257">$arg12 = "DEF:balanced=rrdfile.rrd:lbo:LAST" </div></div><div id="yui_3_16_0_1_1444315555033_4277">$arg13 = "GPRINT:sservers:LAST:%4.lf\j"<br></div><div id="yui_3_16_0_1_1444315555033_4276"><br></div><div id="yui_3_16_0_1_1444315555033_4258">& $CMD $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7 $arg8 $arg9 $arg10 $arg11 $arg12 $arg13<br></div><div id="yui_3_16_0_1_1444315555033_4346"><br></div><div id="yui_3_16_0_1_1444315555033_4260">I googled around and found someone adding <b id="yui_3_16_0_1_1444315555033_4259">"Date\: $(date "+%F %T" | sed 's/:/\\:/g')\r" </b>but not sure how this would get added in the context above.</div><div id="yui_3_16_0_1_1444315555033_4261"><br>Any suggestions?</div><div id="yui_3_16_0_1_1444315555033_4266"><br></div><div id="yui_3_16_0_1_1444315555033_4262">Thanks,</div><div><br></div><div>Devante</div><div><br></div><div> </div></div></div></div><br>_______________________________________________<br>rrd-users mailing list<br><a ymailto="mailto:rrd-users@lists.oetiker.ch" href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><br><a href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users" target="_blank">https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a><br><br><br></div> </div> </div> </blockquote>  </div></body></html>