<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 12/20/22 11:08, Dark Corner via
Nut-upsuser wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAE-E5wZ3vTAn_tvWxkXf03s_g=bPZfTbG3cgRCubAkR=JUKpJQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">I see in the status panel on the Master and on
WinNUT-Client that the "Input Voltage" and "Frequency" values
are reported.<br>
These are values that I am interested in statistic, as well as
others, for example when the current has failed.<br>
Sometimes we find systems stopped and no one knows if, when and
how many times the power has failed or if there has been a
voltage overload.<br>
As well as output I would like to keep a statistic of the load
connected to the UPS to know when someone has connected
something else to the UPS and all the shutdown parameters are
then skipped because the load was excessive.<br>
<div><br>
</div>
<div>If there isn't already something that does this, I would
like to create a script with commands to read some values and
put them into a file which I will then pass to a spreadsheet.<br>
<br>
</div>
</div>
</blockquote>
<p><br>
</p>
<p>A very very very long time I used a script similar to the one
below in order to monitor an UPS and alert me by mail if the
current temperature exceeded a specific threshold. If you adjust
the parameters for awk ( or instruct upsc to report only what you
need - in my case I wanted rounded values so I did not use the
syntax "upsc <UPS> ups.temperature" ) you can monitor
whatever variables you are interested in. <br>
</p>
<p>----- cut here -----<br>
</p>
<p>#!/bin/bash<br>
<br>
CURTMP=`upsc ablerex@db | awk '/ups.temperature/ {print rounded =
sprintf("%.0f", $2)}'`<br>
HIGHTMP="40"<br>
<br>
MAILTO=""<br>
DEST="tech@$DOMAIN"<br>
<br>
if [ $CURTMP -ge $HIGHTMP ]; then<br>
<br>
echo "Current UPS temperature: $CURTMP" | mail -s "UPS temperature
> 40" $DEST > /dev/null<br>
<br>
fi<br>
<br>
</p>
<p>----- end here -----</p>
<p>Note that upslog is probably a better solution for you because it
can do continuous monitoring, writing to a file with specific
formatting while also selecting only the variables you are
interested in<br>
</p>
<p>Unfortunately I no longer have access to the machine where I used
it so I cannot copy/paste that old script.</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CAE-E5wZ3vTAn_tvWxkXf03s_g=bPZfTbG3cgRCubAkR=JUKpJQ@mail.gmail.com">
<div dir="ltr">
<div>What should MRTG help me with UPS?<br>
</div>
</div>
</blockquote>
<p>it can create nice graphs.</p>
<p>wolfy<br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CAE-E5wZ3vTAn_tvWxkXf03s_g=bPZfTbG3cgRCubAkR=JUKpJQ@mail.gmail.com"><br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Il giorno mar 20 dic 2022 alle
ore 07:49 Jim Klimov <<a
href="mailto:jimklimov%2Bnut@gmail.com"
moz-do-not-send="true">jimklimov+nut@gmail.com</a>> ha
scritto:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="auto">Do you mean presence of wall power? That would
be `upsc` momentarily asking for `ups.status`. For its
quality - `input.voltage` etc. assuming your UPS reports it.
<div dir="auto"><br>
</div>
<div dir="auto">For history - some monitoring tool (MRTG
etc.) doing the same continuously. Maybe `upslog` would
do.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Jim</div>
<div dir="auto"><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Dec 19, 2022,
23:49 Dark Corner via Nut-upsuser <<a
href="mailto:nut-upsuser@alioth-lists.debian.net"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">nut-upsuser@alioth-lists.debian.net</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Is there a tools that gives me a history of
the power in the wall?<br>
If not, how can I get the values
of the power in the wall with an online command?<br>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>