Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On some systems daemons wont look at '/usr/sbin/smartctl' #90

Open
dann1kid opened this issue Nov 5, 2024 · 1 comment
Open

On some systems daemons wont look at '/usr/sbin/smartctl' #90

dann1kid opened this issue Nov 5, 2024 · 1 comment
Assignees

Comments

@dann1kid
Copy link

dann1kid commented Nov 5, 2024

Describe the bug
Using systemd daemon from root does not see the location of smartctl.
If you specify SMARTCTL_PATH manually, it works

Raw outputs

ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/.venv/lib/python3.8/site-packages/apscheduler/executors/base.py", line 125, in run_job
ноя 05 14:13:50 localhost.localdomain python[970628]:     retval = job.func(*job.args, **job.kwargs)
ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/redadm_client/adapters/inventorisation/inventrorisation.py", line 144, in push_report_broker
ноя 05 14:13:50 localhost.localdomain python[970628]:     data = R8DataCollector().collect_data()
ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/redadm_client/adapters/inventorisation/inventrorisation.py", line 129, in collect_data
ноя 05 14:13:50 localhost.localdomain python[970628]:     hdd_data = self.hdd_data_index()
ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/redadm_client/adapters/inventorisation/inventrorisation.py", line 52, in hdd_data_index
ноя 05 14:13:50 localhost.localdomain python[970628]:     data = DeviceList()
ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/.venv/lib/python3.8/site-packages/pySMART/device_list.py", line 64, in __init__
ноя 05 14:13:50 localhost.localdomain python[970628]:     self.initialize(catch_errors)
ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/.venv/lib/python3.8/site-packages/pySMART/device_list.py", line 113, in initialize
ноя 05 14:13:50 localhost.localdomain python[970628]:     for line in self.smartctl.scan():
ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/.venv/lib/python3.8/site-packages/pySMART/smartctl.py", line 191, in scan
ноя 05 14:13:50 localhost.localdomain python[970628]:     return self.generic_call(['--scan-open'])[0]
ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/.venv/lib/python3.8/site-packages/pySMART/smartctl.py", line 102, in generic_call
ноя 05 14:13:50 localhost.localdomain python[970628]:     raise FileNotFoundError("Command smartctl doesn't exist!")
ноя 05 14:13:50 localhost.localdomain python[970628]: FileNotFoundError: Command smartctl doesn't exist!
ноя 05 14:13:52 localhost.localdomain python[970628]: time     : [2024-11-05 14:13:52]

on call DeviceList()

Environmental setup:

  • smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.34-1.red80.x86_64] (local build)
  • pySMART-1.3.0
@ralequi
Copy link
Collaborator

ralequi commented Nov 5, 2024

Don't catch the point, I have running pysmart under systemd for years without any special issue.

Could you explain more your issue?
Does your program work standalone (without being executed under systemd)?
which OS/distribution are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants