Closed ezio-melotti closed 9 months ago
This PR adds the hostinfo.py script and the info, sensors-info, network-info commands to simoc-sam.py.
hostinfo.py
info
sensors-info
network-info
simoc-sam.py
The hostinfo.py can be run directly with python3 hostinfo.py (the venv must be active), or can be invoked using python3 simoc-sam.py info.
python3 hostinfo.py
venv
python3 simoc-sam.py info
It will print something like:
===== Network info ===== Hostname: samrpi1 IP/MAC addresses: * wlan0: MAC : e4:5f:01:b5:73:90 IPv6: fe80::e65f:1ff:feb5:7390%wlan0 * bat0: MAC : 42:3d:94:c7:3e:30 IPv4: 172.27.0.1 IPv6: fe80::403d:94ff:fec7:3e30%bat0 ===== Sensors info ===== MCP2221 connected: True Found 2 sensors: * SGP30 (I2C addr: 0x58) * SCD30 (I2C addr: 0x61)
In addition, the network-info and sensors-info commands have been added to simoc-sam.py to print only network or sensors information.
These commands will help with troubleshooting and with host identification.
This PR adds the
hostinfo.py
script and theinfo
,sensors-info
,network-info
commands tosimoc-sam.py
.The
hostinfo.py
can be run directly withpython3 hostinfo.py
(thevenv
must be active), or can be invoked usingpython3 simoc-sam.py info
.It will print something like:
In addition, the
network-info
andsensors-info
commands have been added tosimoc-sam.py
to print only network or sensors information.These commands will help with troubleshooting and with host identification.