Dazed and confused, but trying to continue 🇵🇱/🏴󠁧󠁢󠁥󠁮󠁧󠁿/🇷🇺 ⚧ they

Maintains homie/hoe stasis. Store horizontally when not in use. Contains sulfites.


   #!/bin/sh    base=.1.3.6.1.4.1.8072.9999.9999.1    get() {        case "${get#$base}" in            .0)                echo $get                echo STRING                echo hello world                ;;           .1)               echo $get               echo INTEGER               echo 8675309               ;;           *)               echo NONE               ;;       esac   }   while :; do       read -r op       case "$op" in           get)               read -r get               echo "get $get (${get#$base})" | logger               get               ;;           getnext)               read -r get               echo "getnext $get (${get#$base})" | logger               case "${get#$base}" in                   .0)                       get=$base.1                       get                       ;;                   .1)                       echo NONE                       ;;                   *)                       get=$base.0                       get                       ;;               esac               ;;           set)               read -r val               echo "set $val" | logger               echo not-writable               ;;           PING)               echo PONG               ;;           *)               echo "HUH $op" | logger               ;;       esac   done  $ snmpwalk  -v1 -c public localhost .1.3.6.1.4.1.8072.9999.9999 NET-SNMP-MIB::netSnmpPlaypen.1.0 = STRING: "hello world" NET-SNMP-MIB::netSnmpPlaypen.1.1 = INTEGER: 8675309 Feb 08 02:50:04 tarta Debian-snmp[2678083]: getnext .1.3.6.1.4.1.8072.9999.9999.1 () Feb 08 02:50:04 tarta Debian-snmp[2678085]: getnext .1.3.6.1.4.1.8072.9999.9999.1.0 (.0) Feb 08 02:50:04 tarta Debian-snmp[2678087]: getnext .1.3.6.1.4.1.8072.9999.9999.1.1 (.1)

the most shocking part is i might have a usecase for this


the active energy field is pretty sussy but it's just a 4-byte integer sucked off as 2 2-byte ones, $ printf '%4s\n' $(printf '%s\n' obase=16 58932 60 | bc) | tr ' ' 0 | tac | paste -sd\\0 | bc
399634
and that's what the LCD shows too


SNMPv2-MIB::snmpSilentDrops.0 = Counter32: 0 SNMPv2-MIB::snmpProxyDrops.0 = Counter32: 0 HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (124201485) 14 days, 9:00:14.85 HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2023-2-9,16:17:23.0,+1:0 HOST-RESOURCES-MIB::hrSystemInitialLoadDevice.0 = INTEGER: 393216 HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0 = STRING: "BOOT_IMAGE=/@/vmlinuz-5.10.0-20-amd64 ro root=zfs:AUTO mce=dont_log_ce intel_iommu=on zfs.zfs_arc_max=96636764160 zfs.zfs_arc_lo" HOST-RESOURCES-MIB::hrSystemNumUsers.0 = Gauge32: 3 HOST-RESOURCES-MIB::hrSystemProcesses.0 = Gauge32: 0 HOST-RESOURCES-MIB::hrSystemMaxProcesses.0 = INTEGER: 0 ORNO-MIB::ornoOrWe504DeviceIndex.1 = INTEGER: 1 ORNO-MIB::ornoOrWe504Voltage.1 = INTEGER: 6.4 V ORNO-MIB::ornoOrWe504Current.1 = INTEGER: 6.5 A ORNO-MIB::ornoOrWe504Frequency.1 = INTEGER: 6.6 Hz ORNO-MIB::ornoOrWe504ActivePower.1 = INTEGER: 67 W ORNO-MIB::ornoOrWe504ReactivePower.1 = INTEGER: 68 VAr ORNO-MIB::ornoOrWe504ApparentPower.1 = INTEGER: 69 VA ORNO-MIB::ornoOrWe504PowerFactor.1 = INTEGER: .070 ORNO-MIB::ornoOrWe504TotalEnergy.1 = INTEGER: 71 Wh ORNO-MIB::ornoOrWe504DeviceIndex.2 = INTEGER: 2 ORNO-MIB::ornoOrWe504Voltage.2 = INTEGER: 7.2 V ORNO-MIB::ornoOrWe504Current.2 = INTEGER: 7.3 A ORNO-MIB::ornoOrWe504Frequency.2 = INTEGER: 7.4 Hz ORNO-MIB::ornoOrWe504ActivePower.2 = INTEGER: 75 W ORNO-MIB::ornoOrWe504ReactivePower.2 = INTEGER: 76 VAr ORNO-MIB::ornoOrWe504ApparentPower.2 = INTEGER: 77 VA ORNO-MIB::ornoOrWe504PowerFactor.2 = INTEGER: .078 ORNO-MIB::ornoOrWe504TotalEnergy.2 = INTEGER: 79 Wh End of MIB $ #snmpwalk -Cc   localhost .1 $ snmptranslate    .iso.org.dod.internet.private.enterprises.orno -Tp +--orno(69)    |    +--ornoMIB(0)    |    +--ornoWe504Table(504)    |  |    |  +--ornoOrWe504Entry(0)    |     |  Index: ornoOrWe504DeviceIndex    |     |    |     +-- -R-- Integer32 ornoOrWe504DeviceIndex(0)    |     |        Range: 1..255    |     +-- -R-- Integer32 ornoOrWe504Voltage(1)    |     |        Textual Convention: Tenths    |     +-- -R-- Integer32 ornoOrWe504Current(2)    |     |        Textual Convention: Tenths    |     +-- -R-- Integer32 ornoOrWe504Frequency(3)    |     |        Textual Convention: Tenths    |     +-- -R-- Integer32 ornoOrWe504ActivePower(4)    |     +-- -R-- Integer32 ornoOrWe504ReactivePower(5)    |     +-- -R-- Integer32 ornoOrWe504ApparentPower(6)    |     +-- -R-- Integer32 ornoOrWe504PowerFactor(7)    |     |        Textual Convention: Thousandths    |     +-- -R-- Integer32 ornoOrWe504TotalEnergy(8)    |    +--ornoWe505Table(505)       |       +--ornoOrWe505Entry(0)          |  Index: ornoOrWe505DeviceIndex          |          +-- -R-- Integer32 ornoOrWe505DeviceIndex(0)          +-- -R-- TimeTicks ornoOrWe505Update(1)          |        Textual Convention: TimeStamp          +-- -R-- TimeTicks ornoOrWe505Since(2)          |        Textual Convention: TimeStamp          +-- -R-- Integer32 ornoOrWe505Energy(3)

sysv message queues? kinda slick with it; world's most insane interface, natch, but

also thanks to @ThePhD's n3030 i can have enum or_we_504_msgtype : long { in c and c++ with -std=c2x, which makes this much less insane


You must log in to comment.