---
name: "FusionInventory::Agent::Tools::Generic"
section: "3pm"
platform: "linux"
package: "fusioninventory-agent"
version: "2.2.3-8"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/FusionInventory::Agent::Tools::Generic"
---

# FusionInventory::Agent::Tools::Generic(3pm)

OS-independant generic functions

## NAME

FusionInventory::Agent::Tools::Generic - OS-independant generic functions

## DESCRIPTION

This module provides some OS-independant generic functions.

## FUNCTIONS

### getDmidecodeInfos

Returns a structured view of dmidecode output. Each information block is turned into an hashref, block with same DMI type are grouped into a list, and each list is indexed by its DMI type into the resulting hashref.

`$info` = {\
     0 =\> \[\
         { block }\
     \],\
     1 =\> \[\
         { block },\
         { block },\
     \],\
     ... }

### *getCpusFromDmidecode()*

Returns a list of CPUs, from dmidecode output.

### getPCIDevices(%params)

Returns a list of PCI devices as a list of hashref, by parsing lspci command output.

- logger a logger object

  - command the exact command to use (default: lspci -vvv -nn)

  - file the file to use, as an alternative to the command
