Puppet Class: lsys::tools::psmisc

Defined in:
manifests/tools/psmisc.pp

Summary

Utilities for managing processes on your system

Overview

The psmisc package contains utilities for managing processes on your system: pstree, killall, fuser and pslog. The pstree command displays a tree structure of all of the running processes on your system. The killall command sends a specified signal (SIGTERM if nothing is specified) to processes identified by name. The fuser command identifies the PIDs of processes that are using specified files or filesystems. The pslog command shows the path of log files owned by a given process.

Examples:

include lsys::tools::psmisc

Parameters:

  • enable_hardening (Boolean) (defaults to: false)
  • package_ensure (Bsys::PackageVersion) (defaults to: true)


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'manifests/tools/psmisc.pp', line 17

class lsys::tools::psmisc (
  Boolean $enable_hardening = false,
  Bsys::PackageVersion $package_ensure   = true,
) {
  bsys::tools::package { 'psmisc': ensure => $package_ensure }

  if $enable_hardening {
    file {
      default: mode => 'o=';
      '/usr/bin/killall': ;
      '/usr/bin/peekfd': ;
      '/usr/bin/prtstat': ;
      '/usr/bin/pstree': ;
      '/usr/bin/pstree.x11': ;
      '/usr/sbin/fuser': ;
    }
  }
}