Module process

Various process helpers on Linux compatible systems.

Info:

Functions

signal(signal, exe, cmdline, name)
Send a signal to a specified process. Note: Can only be used as a handler.

Promiser:

    Handler name (string)

Parameters:

  • signal signal to send eg. "SIGHUP"
  • exe the /proc/$pid/exe symlink
  • cmdline the string in /proc/$pid/cmdline
  • name the Name field in /proc/$pid/status

Usage:

    process.signal"nginx-sighup"{
        signal = "SIGHUP",
           exe = "/usr/sbin/nginx"
    }
running(cmdline, name)
Check if a specified process is running. You can pinpoint a process by also specifying the cmdline and name parameters.

Promiser:

    executable where /proc/$pid/exe points to

Parameters:

  • cmdline string from /proc/$pid/cmdline
  • name Name field in /proc/$pid/status

Usage:

    process.running("/usr/bin/rsyncd"){
             requires = "start-rsyncd",
        notify_failed = "start-rsyncd"
    }
generated by LDoc 1.4.6 Last updated 2017-05-09 15:50:38