<div dir="ltr"><div>So what would it take me to edit NUT's code for my case to work? My Network Management Card sends its output state using unfortunately only (I guess so) this OID: <span class="gmail-im gmail-HOEnZb">1.3.6.1.4.1.318.1.1.1.11.1.1.0<br></span></div><div><span class="gmail-im gmail-HOEnZb">Weirdly the standard way of obtaining Battery Status (drivers/apc-mib.c) </span>1.3.6.1.4.1.318.1.1.1.2.1.1.0 gives me good results.</div><div>Unfortunately power status OID's value type differs (my: 64 digits binary number vs standard: integer).</div><div>I know i can retrieve each bit's value with no problem but the question is: How do I integrate my bit recognition with NUT's nut2mib struct and so on...</div><div>I am working on drivers/apc-mib.c UPS driver <br></div><div>Maybe is there something relatable already in the code so I can "make my work easier"?</div><div><br></div><div>Matthew<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">czw., 9 mar 2023 o 16:00 mateuszx <<a href="mailto:jasmati09@gmail.com">jasmati09@gmail.com</a>> napisał(a):<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"><div>I've got an update on this case</div><div>Using tkmib I discovered that my UPS (NMC per say) sends its state by OID 1.3.6.1.4.1.318.1.1.1.11.1.1.0</div><div>.iso.org.dod.internet.private.enterprises.apc.products.hardware.ups.upsState.upsBasicState.upsBasicStateOutputState.0 = 0001010000000000001000000000000000000000000000000000000000000000</div><div>(mib used for this snmpget was powernet441.mib)</div><div>(I got a description about each bit here, 4th bit is for OnLine, 6th stands for Serial Communication Established, 19th is "On")<br></div><div><br></div><div>Then
 I ran tcpdump grepping for this kind of OID. First using 
snmpget/snmpwalk, then using upsc asking for ups.status or the entire 
upsc output.</div><div>I've included tcpdump logs as well as the description of OID I've found.</div><div><br></div><div>My
 question: is getting ups.status about changing "a few lines of code" in
 let's say apc-mib.c file in the drivers folder of the repo or I should 
make a commit and code ups.status depending on bits received using this 
OID?</div><div>I am running NUT 2.8.0 at the moment.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">czw., 9 mar 2023 o 14:14 mateuszx <<a href="mailto:jasmati09@gmail.com" target="_blank">jasmati09@gmail.com</a>> napisał(a):<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"><div>I've got an update on this case</div><div>Using tkmib I discovered that my UPS (NMC per say) sends its state by OID 1.3.6.1.4.1.318.1.1.1.11.1.1.0</div><div>.iso.org.dod.internet.private.enterprises.apc.products.hardware.ups.upsState.upsBasicState.upsBasicStateOutputState.0 = 0001010000000000001000000000000000000000000000000000000000000000</div><div>(mib used for this snmpget was powernet441.mib)</div><div>(I got a description about each bit here, 4th bit is for OnLine, 6th stands for Serial Communication Established, 19th is "On")<br></div><div><br></div><div>Then I ran tcpdump grepping for this kind of OID. First using snmpget/snmpwalk, then using upsc asking for ups.status or the entire upsc output.</div><div>I've included tcpdump logs as well as the description of OID I've found.</div><div><br></div><div>My question: is getting ups.status about changing "a few lines of code" in let's say apc-mib.c file in the drivers folder of the repo or I should make a commit and code ups.status depending on bits received using this OID?</div><div>I am running NUT 2.8.0 at the moment.</div><div><br></div><div>Matthew<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">czw., 2 mar 2023 o 10:46 mateuszx <<a href="mailto:jasmati09@gmail.com" target="_blank">jasmati09@gmail.com</a>> napisał(a):<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"><div>NUT version is 2.7.4-14ubuntu2 indeed.</div><div>I think my next step will be examining data sent over SNMP, because I've recently spotted some more problems with my device and so I will try contacting APC for those reasons.</div><div>Anyway thanks for the output, I really appreciate it</div><div><br></div><div>Matthew<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">wt., 28 lut 2023 o 13:29 Jim Klimov via Nut-upsdev <<a href="mailto:nut-upsdev@alioth-lists.debian.net" target="_blank">nut-upsdev@alioth-lists.debian.net</a>> napisał(a):<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">Also, which version of NUT is involved? There were recently PRs (merged to master-branch, eventually will be in 2.8.1) about more SNMP-UPS support including APCs e.g. 1674, 1679, 1113 (should be in 2.8.0)...<div dir="auto"><br></div><div dir="auto">Many distros still ship 2.7.4...</div><div dir="auto"><br></div><div dir="auto">Jim</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 28, 2023, 00:57 Greg Troxel <<a href="mailto:gdt@lexort.com" target="_blank">gdt@lexort.com</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">mateuszx via Nut-upsdev <<a href="mailto:nut-upsdev@alioth-lists.debian.net" rel="noreferrer" target="_blank">nut-upsdev@alioth-lists.debian.net</a>> writes:<br>
<br>
> At my workplace I have exact UPS config as stated in the subject (APC MGE<br>
> Galaxy 5500 + AP9635CH).<br>
> I have it set up to work with snmp-ups NUT driver.<br>
> Despite many readings from *upsc* command I am not receiving "On Line<br>
> Status" (ups.status OL) nor "On Battery Status" (ups.status OB) and<br>
> therefore I can't get my systems to shutdown during a power outage event.<br>
> (device and ups) Serial Number seems to be missing too in both *upsc *AND Web<br>
> Interface of Network Management Card.<br>
> It can read battery charge just fine (it can even trigger Low Battery<br>
> Status!).<br>
> When I unplug the UPS from line power it does indeed log this event on the<br>
> Web Interface.<br>
<br>
I would run tcpdump and record and examine the SNMP traffic, and turn on<br>
debugging in the driver.  It is likely that the SNMP queries for status<br>
are not doing what the driver author expected.  You'll have to find out<br>
if your UPS has different variables.  snmpwalk may also be useful, or<br>
docs.<br>
<br>
_______________________________________________<br>
Nut-upsdev mailing list<br>
<a href="mailto:Nut-upsdev@alioth-lists.debian.net" rel="noreferrer" target="_blank">Nut-upsdev@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev" rel="noreferrer noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev</a><br>
</blockquote></div>
_______________________________________________<br>
Nut-upsdev mailing list<br>
<a href="mailto:Nut-upsdev@alioth-lists.debian.net" target="_blank">Nut-upsdev@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev" rel="noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>