FusionInventory::Agent::Tools::Linux(3)

NAME
FusionInventory::Agent::Tools::Linux - Linux generic functions

DESCRIPTION
This module provides some generic functions for Linux.

FUNCTIONS

  getDevicesFromUdev(%params)
Returns a list of devices, by parsing /dev/.udev directory. This directory is not exported anymore with recent udev.

Availables parameters:

logger a logger object

  getDevicesFromHal(%params)
Returns a list of devices, by parsing lshal output.

Availables parameters:

logger a logger object
command the exact command to use (default: /usr/sbin/lshal)
file the file to use, as an alternative to the command

  getDevicesFromProc(%params)
Returns a list of devices, by parsing /proc filesystem.

Availables parameters:

logger a logger object

  getCPUsFromProc(%params)
Returns a list of cpus, by parsing /proc/cpuinfo file

Availables parameters:

logger a logger object
file the file to use (default: /proc/cpuinfo)

  getInfoFromSmartctl(%params)
Returns some information about a drive, using smartctl.

Availables parameters:

logger a logger object
device the device to use
file the file to use

  getInterfacesFromIfconfig(%params)
Returns the list of interfaces, by parsing ifconfig command output.

Availables parameters:

logger a logger object
command the command to use (default: /sbin/ifconfig -a)
file the file to use

  getInterfacesFromIp(%params)
Returns the list of interfaces, by parsing ip command output.

Availables parameters:

logger a logger object
command the command to use (default: /sbin/ip addr show)
file the file to use