---
name: "FusionInventory::Agent::Tools::Unix"
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::Unix"
---

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

Unix-specific generic functions

## NAME

FusionInventory::Agent::Tools::Unix - Unix-specific generic functions

## DESCRIPTION

This module provides some Unix-specific generic functions.

## FUNCTIONS

### getDeviceCapacity(%params)

Returns storage capacity of given device, using fdisk.

Availables parameters:

- logger a logger object

  - device the device to use

  ### getIpDhcp

Returns an hashref of information for current DHCP lease.

### getFilesystemsFromDf(%params)

Returns a list of filesystems as a list of hashref, by parsing given df command output.

- logger a logger object

  - command the exact command to use

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

  ### getFilesystemsTypesFromMount(%params)

Returns a list of used filesystems types, by parsing given mount command output.

- logger a logger object

  - command the exact command to use

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

  ### getProcessesFromPs(%params)

Returns a list of processes as a list of hashref, by parsing given ps command output.

- logger a logger object

  - command the exact command to use

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

  ### getRoutingTable

Returns the routing table as an hashref, by parsing netstat command output.

- logger a logger object

  - command the exact command to use (default: netstat -nr -f inet)

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