No video card reported from cronjob

Bug #1704383 reported by Matt Burt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OCS Inventory: Unified Unix Agent
Fix Released
Low
Frank

Bug Description

Running ocsinventory-agent 2.3.0-1 on CentOS 7.

When running ocsinventory-agent from cron, the video card is not reported.

Relevant info from lspci:-

0f:00.0 VGA compatible controller: NVIDIA Corporation GF100 [GeForce GTX 470] (rev a3)

The nouveau driver is being used.

Eventually three problems were found with the code in Ocsinventory::Agent::Backend::OS::Generic::Lspci::Videos:-

1) The regular expression at line 80 does not allow for hex characters in the PCI slot number

2) If the PCI card reports more than one memory area, these are not summed - just the last is taken

3) if xrandr generates no output (which it won't on a cronjob), $common->addVideo() is never called.

I've attached a patch to address all three of these.

On a further note, I don't think the xrandr code to determine the resolution is really a good idea. While I was testing this, I was ssh'd in with a tunnelled X display. The Perl code picked up the resolution of my remote display and reported it against the video card!

Revision history for this message
Matt Burt (matt.burt) wrote :
Frank (frank-bourdeau)
Changed in ocsinventory-unix-agent:
importance: Undecided → Low
assignee: nobody → Frank (frank-bourdeau)
status: New → Fix Committed
Frank (frank-bourdeau)
Changed in ocsinventory-unix-agent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.