Package up2date_client :: Module hardware
[hide private]
[frames] | no frames]

Module hardware

source code

Used to read hardware info from kudzu, /proc, etc

Classes [hide private]
  long
int(x=0) -> int or long int(x, base=10) -> int or long
Functions [hide private]
 
dmi_warnings() source code
 
_initialize_dmi_data()
Initialize _dmi_data unless it already exist and returns it
source code
 
get_dmi_data(path)
Fetch DMI data from given section using given path.
source code
 
dmi_vendor()
Return Vendor from dmidecode bios information.
source code
 
dmi_system_uuid()
Return UUID from dmidecode system information.
source code
 
read_installinfo() source code
 
cpu_count()
returns number of CPU in system
source code
 
__get_number_sockets() source code
 
read_cpuinfo() source code
 
read_memory() source code
 
read_memory_2_4() source code
 
read_memory_2_6() source code
 
findHostByRoute()
returns [hostname, intf, intf6]
source code
 
get_slave_hwaddr(master, slave) source code
 
read_network() source code
 
read_network_interfaces() source code
 
read_dmi() source code
 
get_hal_system_and_smbios() source code
 
get_smbios()
Returns dictionary with values we are interested for.
source code
 
Hardware() source code
Variables [hide private]
  ethtool_present = True
  netifaces_present = False
  t = gettext.translation('rhn-client-tools', fallback= True)
  using_gudev = 1
  subscription_manager_available = False
  _dmi_data = None
hash(x)
  _dmi_not_available = 0
  dmi_warn = None
hash(x)
  log = up2dateLog.initLog()
  __package__ = 'up2date_client'
Function Details [hide private]

get_dmi_data(path)

source code 

Fetch DMI data from given section using given path. If data could not be retrieved, returns empty string. General method and should not be used outside of this module.

dmi_vendor()

source code 

Return Vendor from dmidecode bios information. If this value could not be fetch, returns empty string.

dmi_system_uuid()

source code 

Return UUID from dmidecode system information. If this value could not be fetch, returns empty string.

cpu_count()

source code 

returns number of CPU in system

Beware that it can be different from number of active CPU (e.g. on s390x architecture

findHostByRoute()

source code 

returns [hostname, intf, intf6]

Where hostname is you FQDN of this machine. And intf is numeric IPv4 address. And intf6 is IPv6 address.

get_smbios()

source code 

Returns dictionary with values we are interested for. For historical reason it is in format, which use HAL. Currently in dictionary are keys: smbios.system.uuid, smbios.bios.vendor, smbios.system.serial, smbios.system.manufacturer.