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.
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
require 'sys/proc'
Sys::Proc.progname = :awesome
Some inspiration taken from: