cerebrux / inxi

Automatically exported from code.google.com/p/inxi
0 stars 0 forks source link

patch to dmidecode in get_machine_data #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
RHEL/CentOS/OEL v5 systems (probably older versions and other distros as well) 
with kernels lacking /sys/class/dmi/id/ are unable to report machine data.

Example:
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
$ uname -a
Linux jcs-rhel5-1.managed.cln 2.6.18-274.12.1.el5 #1 SMP Tue Nov 8 21:37:35 EST 
2011 x86_64 x86_64 x86_64 GNU/Linux
$ ./inxi.orig -Mxx
Resuming in non X mode: glxinfo not found. For package install advice run: inxi 
--recommends
Machine:   No machine data found. Your kernel does not support this feature.

The data can be retried using the dmidecode command available on these 
platforms in the (dmidecode package).

Example:
$ sudo ./inxi -Mxx
Resuming in non X mode: glxinfo not found. For package install advice run: inxi 
--recommends
Machine:   System: VMware Inc. product: VMware Virtual Platform version: None 
serial: VMware-56 4d 4a ec f2 b7 71 89-c6 f9 cf ed 3a a4 43 10
           Mobo: Intel Corporation model: 440BX Desktop Reference Platform version: None serial: None
           Bios: Phoenix Technologies LTD version: 6.00 date: 12/31/2009
           Chassis: No Enclosure type: Other version: N/A serial: None

One caveat is that dmidecode reads /dev/mem so root permissions are required.  
Lacking this the data defaults to N/A.

Original issue reported on code.google.com by jarett.s...@gmail.com on 2 Feb 2012 at 6:02

Attachments:

GoogleCodeExporter commented 9 years ago
The data can be *retrieved* using the dmidecode command, not "retried".  :-)

Original comment by jarett.s...@gmail.com on 2 Feb 2012 at 6:05

GoogleCodeExporter commented 9 years ago
The patch, once modified to fully fit with inxi, has been integrated into inxi.

Thanks for finding a work-around for the issue, root user test and error 
messages also added. Help for -M updated to indicate dmidecode can be used on 
older systems.

Now in 1.7.31. Sorry for taking so long, I didn't see the issue report.

Original comment by inxi-...@techpatterns.com on 26 Mar 2012 at 9:44