DISCONTINUATION OF PROJECT.
This project will no longer be maintained by Intel.
This project has been identified as having known security escapes.
Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.
Intel no longer accepts patches to this project.
This project will no longer be maintained by Intel. Intel will not provide or guarantee development of or support for this project, including but not limited to, maintenance, bug fixes, new releases or updates. Patches to this project are no longer accepted by Intel. If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the community, please create your own fork of the project.
This plugin for Snap Telemetry Framework collects information about process states grouped by name. Additionally it provides metrics for each running process, also grouped by name.
- Linux (with proc filesystem)
You can get the pre-built binaries for your OS and architecture from the plugin's GitHub Releases page. Download the plugin from the latest release and load it into snapteld
(/opt/snap/plugins
is the default location for Snap packages).
Use https://github.com/intelsdi-x/snap-plugin-collector-processes or your fork as repo.
Clone repo into $GOPATH/src/github/intelsdi-x/
:
$ git clone https://github.com/<yourGithubID>/snap-plugin-collector-processes
Build the plugin by running make in repo:
$ make
This builds the plugin in ./build/
- Set up the Snap framework.
- Load the plugin and create a task, see example in Examples.
Configuration parameters:
proc_path
: path to procfs (default:/proc
)
This collector gathers metrics from proc file system. The configuration proc_path
determines where the plugin obtains these metrics, with a default setting of /proc
. This setting is only required to obtain data from a docker container that mounts the host /proc
in an alternative path.
List of collected metrics is described in METRICS.md.
Example of running Snap processes collector and writing data to file.
Ensure Snap daemon is running:
- initd:
service snap-telemetry start
- systemd:
systemctl start snap-telemetry
- command line:
snapteld -l 1 -t 0 &
Download and load snap plugins:
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-collector-processes/latest/linux/x86_64/snap-plugin-collector-processes
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-publisher-file/latest/linux/x86_64/snap-plugin-publisher-file
$ snaptel plugin load snap-plugin-collector-processes
$ snaptel plugin load snap-plugin-publisher-file
See available metrics for your system:
$ snaptel metric list --verbose
NAMESPACE VERSION UNIT DESCRIPTION
/intel/procfs/processes/process/[process_name]/[process_pid]/ps_cmdline 8 Process command line with arguments
/intel/procfs/processes/process/[process_name]/[process_pid]/ps_code 8 B Size of text segment
/intel/procfs/processes/process/[process_name]/[process_pid]/ps_cputime_system 8 Jiff Amount of time that this process has been scheduled in kernel mode
/intel/procfs/processes/process/[process_name]/[process_pid]/ps_cputime_user 8 Jiff Amount of time that this process has been scheduled in user mode
/intel/procfs/processes/process/[process_name]/[process_pid]/ps_data 8 B Size of data segments
/intel/procfs/processes/process/[process_name]/[process_pid]/ps_disk_octets_rchar 8 B The number of bytes which this task has caused to be read from storage
/intel/procfs/processes/process/[process_name]/[process_pid]/ps_disk_octets_wchar 8 B The number of bytes which this task has caused, or shall cause to be written to disk
/intel/procfs/processes/process/[process_name]/[process_pid]/ps_disk_ops_syscr 8 Attempt to count the number of read I/O operations
/intel/procfs/processes/process/[process_name]/[process_pid]/ps_disk_ops_syscw 8 Attempt to count the number of write I/O operations
/intel/procfs/processes/process/[process_name]/[process_pid]/ps_pagefaults_maj 8 The number of major faults the process has made
/intel/procfs/processes/process/[process_name]/[process_pid]/ps_pagefaults_min 8 The number of minor faults the process has made
/intel/procfs/processes/process/[process_name]/[process_pid]/ps_rss 8 Resident Set Size: number of pages the process has in real memory
/intel/procfs/processes/process/[process_name]/[process_pid]/ps_stacksize 8 B Stack size
/intel/procfs/processes/process/[process_name]/[process_pid]/ps_vm 8 B Virtual memory size in bytes
/intel/procfs/processes/process/[process_name]/all/ps_code 8 B Size of text segment
/intel/procfs/processes/process/[process_name]/all/ps_cputime_system 8 Jiff Amount of time that this process has been scheduled in kernel mode
/intel/procfs/processes/process/[process_name]/all/ps_cputime_user 8 Jiff Amount of time that this process has been scheduled in user mode
/intel/procfs/processes/process/[process_name]/all/ps_data 8 B Size of data segments
/intel/procfs/processes/process/[process_name]/all/ps_disk_octets_rchar 8 B The number of bytes which this task has caused to be read from storage
/intel/procfs/processes/process/[process_name]/all/ps_disk_octets_wchar 8 B The number of bytes which this task has caused, or shall cause to be written to disk
/intel/procfs/processes/process/[process_name]/all/ps_disk_ops_syscr 8 Attempt to count the number of read I/O operations
/intel/procfs/processes/process/[process_name]/all/ps_disk_ops_syscw 8 Attempt to count the number of write I/O operations
/intel/procfs/processes/process/[process_name]/all/ps_pagefaults_maj 8 The number of major faults the process has made
/intel/procfs/processes/process/[process_name]/all/ps_pagefaults_min 8 The number of minor faults the process has made
/intel/procfs/processes/process/[process_name]/all/ps_rss 8 Resident Set Size: number of pages the process has in real memory
/intel/procfs/processes/process/[process_name]/all/ps_stacksize 8 B Stack size
/intel/procfs/processes/process/[process_name]/all/ps_vm 8 B Virtual memory size in bytes
/intel/procfs/processes/process/[process_name]/ps_count 8 Number of process instances
/intel/procfs/processes/state/dead 8 Number of processes with 'dead' status
/intel/procfs/processes/state/parked 8 Number of processes with 'parked' status
/intel/procfs/processes/state/running 8 Number of processes with 'running' status
/intel/procfs/processes/state/sleeping 8 Number of processes with 'sleeping' status
/intel/procfs/processes/state/stopped 8 Number of processes with 'stopped' status
/intel/procfs/processes/state/tracing 8 Number of processes with 'tracing' status
/intel/procfs/processes/state/waiting 8 Number of processes with 'waiting' status
/intel/procfs/processes/state/wakekill 8 Number of processes with 'wakekill' status
/intel/procfs/processes/state/waking 8 Number of processes with 'waking' status
/intel/procfs/processes/state/zombie 8 Number of processes with 'zombie' status
Download an example task file and load it:
$ curl -sfLO https://raw.githubusercontent.com/intelsdi-x/snap-plugin-collector-processes/master/examples/tasks/processes-file.json
$ snaptel task create -t processes-file.json
If you would like to collect all metrics exposed by this plugin, set /intel/procfs/processes/*
as a metric to collect in task manifest.
As we launch this plugin, we have a few items in mind for the next release:
- [ ] Gathering task status from
"/proc/<pid>/task"
If you have a feature request, please add it as an issue and/or submit a pull request.
This repository is one of many plugins in Snap, a powerful telemetry framework. See the full project at http://github.com/intelsdi-x/snap.
To reach out to other users, head to the main framework or visit Slack.
We love contributions!
There's more than one way to give back, from examples to blogs to code updates. See our recommended process in CONTRIBUTING.md.
Snap, along with this plugin, is an Open Source software released under the Apache 2.0 License.
- Author: Marcin Krolik
- Co-author: Izabella Raulin
Thank you! Your contribution is incredibly important to us.