---
name: "Rex::Hardware"
section: "3pm"
platform: "linux"
package: "rex"
version: "1.16.0-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Rex::Hardware"
---

# Rex::Hardware(3pm)

Base Class for hardware / information gathering

## NAME

Rex::Hardware - Base Class for hardware / information gathering

## DESCRIPTION

This module is the base class for hardware/information gathering.

## SYNOPSIS

```
 use Rex::Hardware;
 my %host_info = Rex::Hardware->get(qw/ Host /);
 my %all_info  = Rex::Hardware->get(qw/ All /);
```

## CLASS METHODS

### get(@modules)

Returns a hash with the wanted information.

```
 task "get-info", "server1", sub {
   %hw_info = Rex::Hardware->get(qw/ Host Network /);
 };
```

Or if you want to get all information

```
 task "get-all-info", "server1", sub {
   %hw_info = Rex::Hardware->get(qw/ All /);
 };
```

Available modules:

- Host

  - Kernel

  - Memory

  - Network

  - Swap

  - VirtInfo
