Closed smahdink closed 4 years ago
got a same issue, it seems cased by my iphone charge wire which act as an usb adapter.
[root@pc ~]# sysmon
cat: /sys/class/net/enp0s20u9c4i2/speed: Invalid argument
Traceback (most recent call last):
File "/usr/local/bin/sysmon", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/sysmon/sysmon.py", line 604, in main
main = MainWindow()
File "/usr/local/lib/python3.7/site-packages/sysmon/sysmon.py", line 102, in __init__
self.s = sysinfo()
File "/usr/local/lib/python3.7/site-packages/sysmon/gather_data.py", line 59, in __init__
self.get_max_connection_speed()
File "/usr/local/lib/python3.7/site-packages/sysmon/gather_data.py", line 267, in get_max_connection_speed
self.max_connection_speed.append(processes[-1])
IndexError: list index out of range
may be an allowlist (configure file or command option) as a filter logic will working, here applyed an ugly patch (worked for me):
# https://github.com/MatthiasSchinzel/sysmon/blob/27d5627c/src/sysmon/gather_data.py#L241
--- if 'virtual' not in line:
+++ if 'virtual' not in line and 'usb' not in line:
When using two networks one of which is disabled in the settings. This error pops up:
Hi :) I am trying to replicate your issue. Could you please tell me the steps you used to disable one of your network adapters?
got a same issue, it seems cased by my iphone charge wire which act as an usb adapter.
[root@pc ~]# sysmon cat: /sys/class/net/enp0s20u9c4i2/speed: Invalid argument Traceback (most recent call last): File "/usr/local/bin/sysmon", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.7/site-packages/sysmon/sysmon.py", line 604, in main main = MainWindow() File "/usr/local/lib/python3.7/site-packages/sysmon/sysmon.py", line 102, in __init__ self.s = sysinfo() File "/usr/local/lib/python3.7/site-packages/sysmon/gather_data.py", line 59, in __init__ self.get_max_connection_speed() File "/usr/local/lib/python3.7/site-packages/sysmon/gather_data.py", line 267, in get_max_connection_speed self.max_connection_speed.append(processes[-1]) IndexError: list index out of range
may be an allowlist (configure file or command option) as a filter logic will working, here applyed an ugly patch (worked for me):
# https://github.com/MatthiasSchinzel/sysmon/blob/27d5627c/src/sysmon/gather_data.py#L241 --- if 'virtual' not in line: +++ if 'virtual' not in line and 'usb' not in line:
Thank you for your help! Let me check if I can get the same issue with my phone.
Some people might find it useful to have information about this network connection too, so maybe in case of usb we can get the maximum bandwidth with another command.
@MatthiasSchinzel Connected the phone with usb and turned on usb tethering. Went to gnome settings and turned off my ethernet connection by clicking on the switch.
I was able to replicate your issue and solved it on my system with sysmon 1.0.1
Please try again and feel free to open if you still have problems on your side!
When using two networks one of which is disabled in the settings. This error pops up:
`