lnxlink: Can't load addon: disk_usage
What type of installation are you running?
Desktop
Which Linux OS are you using?
Ubuntu 22.04
Which version of LNXLink has the issue?
2023.6.1
Describe the problem
I run the program(lnxlink -c ~/.lnxlinkrc
) and then the error below shows up every refresh.
I think the problem is that it’s trying to access some docker resource which it doesn’t have permission to, but I don’t think it makes sense to try to use this as a disk. I saw this with another Linux companion app I tried. I might be a good idea just to filter out docker disks completely.
Additional context
I also get this error, but it makes sense since I don’t have an amd_gpu. However, it might be a good idea to detect this and just disable the module:
Can't load addon: amd_gpu
Traceback (most recent call last):
File "/home/scott/.local/lib/python3.10/site-packages/lnxlink/__main__.py", line 77, in monitor_run
pub_data = addon.getInfo()
File "/home/scott/.local/lib/python3.10/site-packages/lnxlink/modules/amd_gpu.py", line 12, in getInfo
first_gpu = pyamdgpuinfo.get_gpu(0) # we'll ignore extra GPUs
File "pyamdgpuinfo/_pyamdgpuinfo.pyx", line 173, in pyamdgpuinfo._pyamdgpuinfo.get_gpu
File "pyamdgpuinfo/_pyamdgpuinfo.pyx", line 228, in pyamdgpuinfo._pyamdgpuinfo.get_gpu
RuntimeError: GPU id 0 not found
Happy to file this as a separate issue if you’d like.
Configuration
mqtt:
prefix: lnxlink
clientId: DESKTOP-Linux
statsPrefix: monitor/stats
server: 10.0.0.223
port: 1883
auth:
user: mosquitto_broker_user
pass: wasd159731
discovery:
enabled: true
lwt:
enabled: true
qos: 1
retain: true
connectMsg: 'ON'
disconnectMsg: 'OFF'
update_interval: 5
modules: null
Logs
FYI journalctl --user -u lnxlink -n 300 --no-pager
gives no output, but here are just the logs from the terminal after running the application:
Can't load addon: disk_usage
Traceback (most recent call last):
File "/home/scott/.local/lib/python3.10/site-packages/lnxlink/__main__.py", line 77, in monitor_run
pub_data = addon.getInfo()
File "/home/scott/.local/lib/python3.10/site-packages/lnxlink/modules/disk_usage.py", line 17, in getInfo
disk_stats = psutil.disk_usage(disk.mountpoint)
File "/home/scott/.local/lib/python3.10/site-packages/psutil/__init__.py", line 2000, in disk_usage
return _psplatform.disk_usage(path)
File "/home/scott/.local/lib/python3.10/site-packages/psutil/_psposix.py", line 175, in disk_usage
st = os.statvfs(path)
PermissionError: [Errno 13] Permission denied: '/var/lib/docker/overlay2/14c88c96744bdbce6237ffb04b1cbf60b881de57a87f35734df543f110100c22/diff'
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (9 by maintainers)
Commits related to this issue
- Create separate sensors for each disk Also fixes issue #60 — committed to bkbilly/lnxlink by bkbilly a year ago
The issue was fixed on the newest version of LNXlink
2023.7.1
Thanks for this. I never tried installing it on a virtual environment to test it out. I’ll update it on the next release.
I didn’t have a discord server, but I’ve created. It seems very useful to have for this project. https://discord.gg/hkWXPx4v
You can put it anywhere in your system, but it needs to have a specific format as explained on the docs. You can see a simple example with the cpu found here: https://github.com/bkbilly/lnxlink/blob/master/lnxlink/modules/cpu.py
EDIT: You might want to change the name from test.py because it seems that this library exists on python libraries, so there might be a conflict. Try finding a unique name for it.
To exclude modules from the default configuration should be easy to implement, but I’ll have to look into it. To add options to each module it will take some work, so no promises yet. For now I have updated with the filter I mentioned earlier. You can only test it if you use the developer installation that I mention on the updated documentation.
For the AMD GPU addon, I am planning on combining it with the NVIDIA GPU addon, but I didn’t get the chance to do it yet. Most likely on the next release I will fix this.
As for your disk problem, could you run this python script and send me the result?
Keep in mind that you have the option to ignore the disk_usage module as described here: https://github.com/bkbilly/lnxlink/tree/master#one-of-my-integration-is-not-working