RaspeberryPi support - dmidecode crash #144

Open
opened 2020-07-01 21:39:14 +02:00 by strus38 · 2 comments
strus38 commented 2020-07-01 21:39:14 +02:00 (Migrated from github.com)

running netbox_agent on a rapsberry PI makes the program crash:

# netbox_agent -c nbagent.yaml --register
Traceback (most recent call last):
  File "/usr/local/bin/netbox_agent", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/netbox_agent/cli.py", line 44, in main
    return run(config)
  File "/usr/local/lib/python3.7/dist-packages/netbox_agent/cli.py", line 22, in run
    dmi = dmidecode.parse()
  File "/usr/local/lib/python3.7/dist-packages/netbox_agent/dmidecode.py", line 74, in parse
    _data = _parse(buffer)
  File "/usr/local/lib/python3.7/dist-packages/netbox_agent/dmidecode.py", line 216, in _parse
    raise ParseError("Unable to parse 'dmidecode' output")
netbox_agent.dmidecode.ParseError: Unable to parse 'dmidecode' output

root@node05:/home/pi# dmidecode
# dmidecode 3.2
Scanning /dev/mem for entry point.
# No SMBIOS nor DMI entry point found, sorry.

where I guess we could use other info like:

$cat /proc/cpuinfo
...
$cat /proc/device-tree/model
Raspberry Pi 4 Model B Rev 1.1
$ inix -F
inxi -F
System:    Host: node05.home.lab Kernel: 4.19.97-v7l+ armv7l bits: 32 Console: tty 1
           Distro: Raspbian GNU/Linux 10 (buster)
Machine:   Type: ARM Device System: Raspberry Pi 4 Model B Rev 1.1 details: BCM2835 rev: c03111
           serial: 10000000256decd8
Argument "Raspberry Pi 4 Model B Rev 1.1" isn't numeric in sprintf at /usr/bin/inxi line 6969.
CPU:       Topology: Quad Core model: ARMv7 v7l variant: cortex-a72 bits: 32 type: MCP
           Speed: 1500 MHz min/max: 600/1500 MHz Core speeds (MHz): 1: 1500 2: 1500 3: 1500 4: 1500
Graphics:  Device-1: bcm2835-vc4 driver: vc4_drm v: N/A
           Device-2: bcm2835-hdmi driver: N/A
           Display: server: No display server data found. Headless machine? tty: 120x48
           Message: Advanced graphics data unavailable in console for root.
Audio:     Device-1: bcm2835-audio driver: bcm2835_audio
           Device-2: bcm2835-hdmi driver: N/A
           Sound Server: ALSA v: k4.19.97-v7l+
Network:   Message: No ARM data found for this feature.
           IF-ID-1: eth0 state: down mac: xxxx
          IF-ID-2: wlan0 state: up mac: xxx

or even all usefull commands in there: https://raw.githubusercontent.com/raspberrypi/utils/master/raspinfo/raspinfo

Any way it could be supported in some way?
Thanks

running netbox_agent on a rapsberry PI makes the program crash: ``` # netbox_agent -c nbagent.yaml --register Traceback (most recent call last): File "/usr/local/bin/netbox_agent", line 10, in <module> sys.exit(main()) File "/usr/local/lib/python3.7/dist-packages/netbox_agent/cli.py", line 44, in main return run(config) File "/usr/local/lib/python3.7/dist-packages/netbox_agent/cli.py", line 22, in run dmi = dmidecode.parse() File "/usr/local/lib/python3.7/dist-packages/netbox_agent/dmidecode.py", line 74, in parse _data = _parse(buffer) File "/usr/local/lib/python3.7/dist-packages/netbox_agent/dmidecode.py", line 216, in _parse raise ParseError("Unable to parse 'dmidecode' output") netbox_agent.dmidecode.ParseError: Unable to parse 'dmidecode' output root@node05:/home/pi# dmidecode # dmidecode 3.2 Scanning /dev/mem for entry point. # No SMBIOS nor DMI entry point found, sorry. ``` where I guess we could use other info like: ``` $cat /proc/cpuinfo ... $cat /proc/device-tree/model Raspberry Pi 4 Model B Rev 1.1 $ inix -F inxi -F System: Host: node05.home.lab Kernel: 4.19.97-v7l+ armv7l bits: 32 Console: tty 1 Distro: Raspbian GNU/Linux 10 (buster) Machine: Type: ARM Device System: Raspberry Pi 4 Model B Rev 1.1 details: BCM2835 rev: c03111 serial: 10000000256decd8 Argument "Raspberry Pi 4 Model B Rev 1.1" isn't numeric in sprintf at /usr/bin/inxi line 6969. CPU: Topology: Quad Core model: ARMv7 v7l variant: cortex-a72 bits: 32 type: MCP Speed: 1500 MHz min/max: 600/1500 MHz Core speeds (MHz): 1: 1500 2: 1500 3: 1500 4: 1500 Graphics: Device-1: bcm2835-vc4 driver: vc4_drm v: N/A Device-2: bcm2835-hdmi driver: N/A Display: server: No display server data found. Headless machine? tty: 120x48 Message: Advanced graphics data unavailable in console for root. Audio: Device-1: bcm2835-audio driver: bcm2835_audio Device-2: bcm2835-hdmi driver: N/A Sound Server: ALSA v: k4.19.97-v7l+ Network: Message: No ARM data found for this feature. IF-ID-1: eth0 state: down mac: xxxx IF-ID-2: wlan0 state: up mac: xxx or even all usefull commands in there: https://raw.githubusercontent.com/raspberrypi/utils/master/raspinfo/raspinfo ``` Any way it could be supported in some way? Thanks
Solvik commented 2020-07-02 17:38:47 +02:00 (Migrated from github.com)

It seems that Raspberry doesn't have dmidecode infos and the agent relies heavily on dmidecode informations.

I have it on arm64 servers.

It'd mean special development for Raspberry PI. Would you be able propose a PR ? I don't have a rasp on hand

It seems that Raspberry doesn't have dmidecode infos and the agent relies heavily on dmidecode informations. I have it on arm64 servers. It'd mean special development for Raspberry PI. Would you be able propose a PR ? I don't have a rasp on hand
strus38 commented 2020-07-02 17:48:11 +02:00 (Migrated from github.com)

Yes, let me think about it, it could be nice.
Thanks

Le jeu. 2 juil. 2020 à 17:39, Solvik notifications@github.com a écrit :

It seems that Raspberry doesn't have dmidecode infos and the agent relies
heavily on dmidecode informations.

I have it on arm64 servers.

It'd mean special development for Raspberry PI. Would you be able propose
a PR ? I don't have a rasp on hand


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Solvik/netbox-agent/issues/144#issuecomment-653079617,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABM6DUZ3KNZPP67LYULL5EDRZSSZNANCNFSM4ON5CIVA
.

Yes, let me think about it, it could be nice. Thanks Le jeu. 2 juil. 2020 à 17:39, Solvik <notifications@github.com> a écrit : > It seems that Raspberry doesn't have dmidecode infos and the agent relies > heavily on dmidecode informations. > > I have it on arm64 servers. > > It'd mean special development for Raspberry PI. Would you be able propose > a PR ? I don't have a rasp on hand > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/Solvik/netbox-agent/issues/144#issuecomment-653079617>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ABM6DUZ3KNZPP67LYULL5EDRZSSZNANCNFSM4ON5CIVA> > . >
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: DGNum/netbox-agent#144
No description provided.