I'm currently testing the OCS agent (v2.10.0, from OCS's YUM repo [1]) on RHEL 7.9. This host does have an NVIDIA GPU for running CUDA and the like, but since it doesn't actually need the display, we don't normally run X11/Xorg servers on it.
When I run the agent as shown below, it appears to see that "nvidia-settings" is available, tries to run "nvidia-settings -q all" to gather some info, fails, and then exits with an error. It never submits anything from the host to the configured server.
Example:
[root@m8g-1-1 ~]# ocsinventory-agent --debug --info
ERROR: The control display is undefined; please run `nvidia-settings --help` for usage information.
ERROR: The control display is undefined; please run `nvidia-settings --help` for usage information.
[root@m8g-1-1 ~]#
I can recreate the symptom simply by running "nvidia-settings -q all". I can also run an Xorg instance for diagnostic purposes, and point to it, and see some reasonable output from the same command, as shown below. But I don't normally have Xorg running, so this is a problem.
[root@m8g-1-1 ~]# echo $DISPLAY
[root@m8g-1-1 ~]#
[root@m8g-1-1 ~]# nvidia-settings -q all
ERROR: The control display is undefined; please run `nvidia-settings --help` for usage information.
[root@m8g-1-1 ~]#
[root@m8g-1-1 ~]# #Attempting the same thing while manually setting the DISPLAY var
[root@m8g-1-1 ~]# DISPLAY=:0 nvidia-settings -q all | head
Attributes queryable via m8g-1-1.rc.byu.edu:0.0:
Attribute 'OperatingSystem' (m8g-1-1.rc.byu.edu:0.0): 0.
The valid values for 'OperatingSystem' are in the range 0 - 2 (inclusive).
'OperatingSystem' is a read-only attribute.
'OperatingSystem' can use the following target types: X Screen, GPU.
Attribute 'NvidiaDriverVersion' (m8g-1-1.rc.byu.edu:0.0): 470.141.03
'NvidiaDriverVersion' is a string attribute.
[root@m8g-1-1 ~]#
Given that, I would still love to be able to gather the info from the GPU some other way via the agent. If that's not possible, it would still work if it could either handle the error, or if I could disable these specific components, so I could still get the other (non-GPU) info into the OCS server.
Is any of this possible?
Thanks,
Lloyd
[1] see https://wiki.ocsinventory-ng.org/03.Basic-documentation/Setting-up-the-UNIX-agent-using-repository-on-client-computers/#installing-unix-agent-with-rpm