From 002742ad5b1fd76d539c2fb8736622e63e757f98 Mon Sep 17 00:00:00 2001 From: bryan Date: Wed, 26 Aug 2026 11:47:10 +0200 Subject: Initial commit --- README | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 README (limited to 'README') diff --git a/README b/README new file mode 100644 index 0000000..a77fcee --- /dev/null +++ b/README @@ -0,0 +1,60 @@ +prtmib — SNMPv2c printer marker dump + + prtmib [-v] + +One UDP GET per host listed in config.h. Prints a dense table of +the values the device actually returned. No JSON, no daemon, no +layout flags. Filter with grep(1). + +Columns + + idx index in the printers[] table (config.h) + host FQDN with trailing .obspm.fr stripped + ms round trip, milliseconds + err SNMP error-status (0 = noError); RFC 1905 names with -v + up sysUpTime as days+hours+minutes + hrDev hrDeviceStatus + hrPrt hrPrinterStatus + eflags hrPrinterDetectedErrorState bits that are set + pages prtMarkerLifeCount, else kmLifeCount, else xrxImpressions + toner Y/M/C/K percent, letters taken from + prtMarkerSuppliesDescription (not slot index). Order + matches Konica PageScope (Yellow, Magenta, Cyan, Black). + F_XRX is a tag only. Else Konica enterprise OIDs. + '*' = <= LOWPCT, '!' = <= CRITPCT + src which mapping filled toner: std | xrx | km | - + model sysDescr up to ';' (Xerox firmware blob stripped), + trailing " vN" dropped, then truncated + +-v also prints every varbind (OID, MIB name, BER tag, value) and a +short packet trace. + +Exit status + + 0 every host answered a parseable GetResponse + 1 at least one DNS failure, timeout, or bad PDU + 2 usage + +Build + + Windows (MinGW, default config.mk): + make + + as(1) and ld(1) must be the MinGW ones; config.mk prepends + MINGWBIN to PATH so a stock prompt is enough. + + Linux: edit config.mk (comment the Windows block, uncomment Linux), + then make. `RM = rm -f` on Unix. + + Hosts, community, timeouts, thresholds: config.h. Recompile. + +Protocol + + SNMPv2c GET, UDP/161. One PDU per host carrying sysDescr, sysName, + sysUpTime, hrDeviceStatus, hrPrinterStatus, + hrPrinterDetectedErrorState, prtMarkerLifeCount, supplies + description/max/level 1-4, Konica 18334 page+toner OIDs, Xerox 253 + impressions. Missing objects arrive as noSuchObject / noSuchInstance. + + Standard supply indices are CMYK. Konica enterprise indices are KCMY. + Supply -1/-2/-3 (other/unknown/some) are not treated as percentages. -- cgit v1.2.3