Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Disable GPU-specific components in the OCS agent? [closed]

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

closed with the note: Solved through another method
in OCS Inventory NG agent for Unix by (200 points)
closed by

3 Answers

0 votes

Hello Lloyd, same problem here!

To solve I have exported the display var.

export DISPLAY=:0

Also in case of GPU error the record must be saved in the inventory server.

Kind regards
G.

by (140 points)
0 votes

,

Does that work when there is no Xorg server running?  Obviously it would help if the server is running, but the DISPLAY variable is incorrect or not set when the OCS agent is run.  But my situation is one where the Xorg is not running at all.

Lloyd

by (200 points)
0 votes
I've determined that these errors are not fatal to the collection/upload process.  There was an unrelated reason why my test wasn't uploading to the server.

The reports still include the info about the GPUs themselves (eg. the contents of `nvidia-smi -q`).  They don't include the info from `nvidia-settings` at all, but I think that's okay for now.
by (200 points)
 
Powered by Question2Answer
...