sys-proc

A cross-platform interface to customize process name


Keywords
freebsd, libc, linux, prctl, process, ruby
License
GPL-3.0
Install
gem install sys-proc -v 1.1.2

Documentation

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: