Skip to content

A Ruby module to customize the process name

License

Notifications You must be signed in to change notification settings

SwagDevOps/sys-proc

Repository files navigation

A Ruby module to customize the process name

The sys-proc module allows a process to change its name, as displayed by system tools such as ps and top. It SHOULD allow (too), depending on system support, to kill the renamed process by name, using killall. The procedure is hardly portable across different systems. At the moment, this module is fully compatible with GNU/Linux (using prctl). Freebsd is partially supported, using setprogname and getprogname (provided by the BSD libc).

This module provides the necessary architecture to, potentially, support even more systems.

Installation

sudo gem install sys-proc

alternatively, install a development version (from github):

git clone https://github.com/SwagDevOps/sys-proc sys-proc
cd !$
bundle install --path vendor/bundle
rake gem:install

Sample of use

require 'sys/proc'

Sys::Proc.progname = :awesome

Inspirations

Some inspiration taken from: