Git Product home page Git Product logo

process-agent's Introduction

Process Agent

An agent that can be used to list running processes on remote machines.

Installation

Install the sys-proctable RubyGem on all your agent nodes, this Gem uses native extensions and so will need compilers:

NOTE: To install this gem you need to have a c++ compiler on your system

mcollective_agent_process::gem_dependencies:
  "sys-proctable": "1.2.0"

Add the agent and client:

mcollective::plugin_classes:
  - mcollective_agent_process

Archlinux

On Archlinux machines the following Hiera data will install the dependencies using native packages and you do not need compilers:

mcollective_agent_process::manage_gem_dependencies: false
mcollective_agent_process::package_dependencies:
  ruby-sys-proctable: present
  ruby-ffi: present

Configuration

The Process client application can be configured to list only a subset of possible process field values. This can be configured in your client configuration file. Available fields are PID, USER, VSZ, COMMAND, TTY, RSS and STATE. Unconfigured the output will default to PID, USER, VSZ and COMMAND.

mcollective_agent_process::config:
  fields: PID, COMMAND, TTY, STATE

Usage

% mco process list ruby

 * [ ============================================================> ] 2 / 2

   node1.your.com

     PID       USER     VSZ            COMMAND
     31187     root     137.465 MB     ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid

   node2.your.com

     PID       USER     VSZ            COMMAND
     5202      root     120.793 MB     /usr/bin/ruby /usr/bin/puppet agent
     17348     root     112.105 MB     ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid


Summary of The Process List:

           Matched hosts: 2
       Matched Processes: 3
           Resident Size: 28.921 MB
            Virtual Size: 370.363 MB


Finished processing 2 / 2 hosts in 134.67 ms
mco process list ruby --fields=pid,command,state

 * [ ============================================================> ] 2 / 2

   node1.your.com

     PID       COMMAND                                                          STATE
     5202      /usr/bin/ruby /usr/bin/puppet agent                              S
     17348     ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid      R

   node2.your.com

     PID       COMMAND                                                          STATE
     31187     ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid      R


Summary of The Process List:

           Matched hosts: 2
       Matched Processes: 3
           Resident Size: 28.805 MB
            Virtual Size: 369.863 MB


Finished processing 2 / 2 hosts in 96.65 ms

Data Plugin

The Process agent also supplies a data plugin which uses the sys-proctable Gem to check if there exists a process that matches a given pattern and can be used during discovery or any other place where the MCollective discovery language is used.

mco rpc rpcutil ping -S "process('ruby').exists=true"

process-agent's People

Contributors

er0ck avatar faja avatar mikaelsmith avatar ripienaar avatar teancom avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.