Collects Linux psutil metrics
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


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.

Snap collector plugin - psutil

This plugin collects metrics from psutil which gathers information on running processes and system utilization (CPU, memory, disks, network).

It's used in the Snap framework.

  1. Getting Started
  1. Documentation
  1. Community Support
  2. Contributing
  3. License
  4. Acknowledgements

Getting Started

System Requirements

Note: This plugin does not require Python rather it depends on the go library gopsutil.

Operating systems

All OSs currently supported by snap:

  • Linux/amd64
  • Darwin/amd64


Download psutil plugin binary:

You can get the pre-built binaries for your OS and architecture under the plugin's release page. For Snap, check here.

To build the plugin binary:


Clone repo into $GOPATH/src/

$ git clone<yourGithubID>/snap-plugin-collector-psutil.git

Build the plugin by running make within the cloned repo:

$ make

This builds the plugin in ./build/

Configuration and Usage

Some metrics are platform specific (see gopsutil's current status).

Available configuration option:

  • mount_points - configuration of mount points to monitor, multiple paths should be separated with "|", e.g. "/|/dev|/run", default is set to collect only physical devices (hard disks, cd-rom, USB). Passing * enables collect data from all mount points.


There are a number of other resources you can review to learn to use this plugin:

Collected metrics

List of metrics collected by this plugin can be found in file.


This is an example running psutil and writing data to a file. It is assumed that you are using the latest Snap binary and plugins.

The example is run from a directory which includes snaptel, snapteld, along with the plugins and task file.

In one terminal window, open the Snap daemon (in this case with logging set to 1 and trust disabled):

$ snapteld -l 1 -t 0

In another terminal window: Load psutil plugin

$ snaptel plugin load snap-plugin-collector-psutil

See available metrics for your system

$ snaptel metric list

Create a task manifest file (e.g. task-psutil.json):

    "version": 1,
    "schedule": {
        "type": "simple",
        "interval": "1s"
    "workflow": {
        "collect": {
            "metrics": {
                "/intel/psutil/load/load1": {},
                "/intel/psutil/load/load5": {},
                "/intel/psutil/load/load15": {},
                "/intel/psutil/cpu/*/user": {},
                "/intel/psutil/net/*/bytes_sent": {},
                "/intel/psutil/vm/available": {},
                "/intel/psutil/vm/free": {},
                "/intel/psutil/vm/used": {}
            "config": {
                "/intel/mock": {
                    "password": "secret",
                    "user": "root"
            "publish": [
                    "plugin_name": "file",
                    "config": {
                        "file": "/tmp/published_psutil"

Load file plugin for publishing:

$ snaptel plugin load snap-plugin-publisher-file
Plugin loaded
Name: file
Version: 3
Type: publisher
Signed: false
Loaded Time: Fri, 20 Nov 2015 11:41:39 PST

Create task:

$ snaptel task create -t task-psutil.json
Using task manifest to create task
Task created
ID: 02dd7ff4-8106-47e9-8b86-70067cd0a850
Name: Task-02dd7ff4-8106-47e9-8b86-70067cd0a850
State: Running

See file output (this is just part of the file):

2015-11-20 11:46:03.637390565 -0800 PST|[intel psutil load load1]|1.82|
2015-11-20 11:46:03.641160359 -0800 PST|[intel psutil load load15]|2.09|
2015-11-20 11:46:03.643858208 -0800 PST|[intel psutil load load5]|2.08|
2015-11-20 11:46:03.661173851 -0800 PST|[intel psutil vm available]|168882176|
2015-11-20 11:46:03.67167664 -0800 PST|[intel psutil vm free]|168943616|
2015-11-20 11:46:03.681965105 -0800 PST|[intel psutil vm used]|17010798592|
2015-11-20 11:46:04.641244629 -0800 PST|[intel psutil load load1]|1.82|
2015-11-20 11:46:04.644420189 -0800 PST|[intel psutil load load15]|2.09|
2015-11-20 11:46:04.647166418 -0800 PST|[intel psutil load load5]|2.08|
2015-11-20 11:46:04.657065347 -0800 PST|[intel psutil vm available]|168984576|
2015-11-20 11:46:04.666346721 -0800 PST|[intel psutil vm free]|169054208|
2015-11-20 11:46:04.676683476 -0800 PST|[intel psutil vm used]|17010716672|

Stop task:

$ snaptel task stop 02dd7ff4-8106-47e9-8b86-70067cd0a850
Task stopped:
ID: 02dd7ff4-8106-47e9-8b86-70067cd0a850


There isn't a current roadmap for this plugin, but it is in active development. As we launch this plugin, we do not have any outstanding requirements for the next release. If you have a feature request, please add it as an issue and/or submit a pull request.

Community Support

This repository is one of many plugins in Snap, a powerful telemetry framework. See the full project at To reach out to other users, head to the main framework


We love contributions!

There's more than one way to give back, from examples to blogs to code updates. See our recommended process in


Snap, along with this plugin, is an Open Source software released under the Apache 2.0 License.


And thank you! Your contribution, through code and participation, is incredibly important to us.