Rex::Hardware(3)

πŸ“¦ version 1.14.3, in nixos 26.05, nixpkgs unstable

NAME πŸ’–

Rex::Hardware(3) is the base class for hardware / information gathering, straight outta the User Contributed Perl Documentation corner of the universe. It's giving foundation energy, bestie. 🫢

DESCRIPTION ✨

okay so this module is literally the base class for hardware/information gathering. That's the whole vibe. No cap. πŸŽ€

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. Slay. ✨

Like, if you want specific info from a server, you do this:

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

Or if you want to get all information, no crumbs left:

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

Available modules:

  • Host
  • Kernel
  • Memory
  • Network
  • Swap
  • VirtInfo

πŸ’– that's the whole page! shoutout to perl v5.42.3, dated 2023-08-05. periodt. πŸŽ€

πŸ“¦ where this page comes from