MatthiasSchinzel / sysmon

Graphical system monitor for linux, including information about CPU, GPU, Memory, HDD/SDD and your network connections. Similar to windows task manager.
GNU General Public License v3.0
294 stars 25 forks source link

GPU index error #3

Closed andre-merzky closed 3 years ago

andre-merzky commented 3 years ago

I see this error:

$ python3 -V
Python 3.6.9

$ uname -a
Linux xxx 5.0.0-1043-oem-osp1 #48-Ubuntu SMP Thu Mar 12 09:53:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

$ python3 sysmon.py
Traceback (most recent call last):
  File "sysmon.py", line 593, in <module>
    main()
  File "sysmon.py", line 587, in main
    main = MainWindow()
  File "sysmon.py", line 216, in __init__
    self.update_gpuinfo()
  File "sysmon.py", line 525, in update_gpuinfo
    num = data[gpu_ind][4]
IndexError: list index out of range

Let me know if you need additional information.

andre-merzky commented 3 years ago

Looking a bit further, this seems to happen because I have a disabled nvidia card - nvidia-smi will not return any data in this case. You should check if any data are returned there...

$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
MatthiasSchinzel commented 3 years ago

Thanks for the submission! I will add this, please give me a few moments!

MatthiasSchinzel commented 3 years ago

Please try again now!

andre-merzky commented 3 years ago

Looks good now - thanks! :-)

rany2 commented 3 years ago
user@debian~/D/s/src> python3 ./sysmon.py
Traceback (most recent call last):
  File "./sysmon.py", line 593, in <module>
    main()
  File "./sysmon.py", line 587, in main
    main = MainWindow()
  File "./sysmon.py", line 101, in __init__
    self.s = sysinfo()
  File "/home/user/Downloads/sysmon/src/gather_data.py", line 54, in __init__
    self.check_for_nvidia_smi()
  File "/home/user/Downloads/sysmon/src/gather_data.py", line 175, in check_for_nvidia_smi
    ps = str(subprocess.Popen(
  File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'nvidia-smi'
rany2 commented 3 years ago

Could this issue be reopened? The latest commit breaks this application so it actually introduces another problem.

MatthiasSchinzel commented 3 years ago

Yes sure. Sorry, wrong indentation. Should be fixed now.

rany2 commented 3 years ago

I could confirm it's fixed. Thank you :smile:

MatthiasSchinzel commented 3 years ago

Great, thanks!