Skip to content

Latest commit

 

History

History
121 lines (99 loc) · 4.84 KB

README.md

File metadata and controls

121 lines (99 loc) · 4.84 KB

collectd-graph-generator

License: GPL v3 Collectd Graph Generator Collectd Graph Generator Coverage Status

Table of Contents

Overview

Goal of this project is to create as simple as possible tool for viewing data generated by collectd - especially RSS memory used by multiple processes. There is a list of front ends for collectd but I was unable to find one fitting all my purposes:

  • Presenting RSS memory of multiple processes at one chart
  • Presenting data from a server via SSH
  • No knowledge of Rrdtool

It's not a very impressive list but I ended up writing long Rrdtool commands, which I don't want to do every day.

Requirements

It's written and tested only on different Linux distros (Manjaro, Ubuntu, maybe some other in the future), and it requires system commands:

  • ssh
  • scp
  • rrdtool

Remote collectd

Main motivation for creating this tool was to gather some information from my home server without constantly logging in and executing some commands. cgg is able generate all the graphs on both, local and remote, systems. To make it work you need to set up your SSH keys to enable logging without password and to have rrdtool installed on remote system. This requirement is due to different headers of rrd files for different architectures. I didn't find an easy way to utilize x86 or amd64 rrdtool for ARM data.

Supported collectd plugins

  • processes - draws graph of RSS memory usage of all, or chosen, processes supervised by collectd. It's possible to define maximum number of processes presented on one graph and if number of processes to draw is greater, multiple files are created.
  • memory - draws graph of system wide memory usage. By default it draws free memory, but other types of memory can be specified in --memory arg:
    • buffered
    • cached
    • free
    • slab_recl
    • slab_unrecl
    • used

Examples

All supervised processes from local system

./cgg -i /var/lib/collectd/marcin-manjaro/ -t "last 30 minutes" -o "30_minutes_all_processes.png"

4 specific processes from remote system on 2 separate graphs

./cgg -i marcin@localhost:/var/lib/collectd/marcin-manjaro/ -t "last 1 hour" -o "1_hour.png" -w 400 -h 200 --processes "rust language server,visual studio code,dolphin,plasmashell" -m 2
Rust language server and Visual studio code Dolphin and Plasmashell
Rust language server and Visual studio code Dolphin and Plasmashell

4 specific processes from remote system on 1 graph

./cgg -i marcin@localhost:/var/lib/collectd/marcin-manjaro/ -t "last 1 hour" -o "1_hour.png" -w 400 -h 200 --processes "rust language server,visual studio code,dolphin,plasmashell"

System wide memory

All memory types Default settings (free)
./cgg \
-i marcin@localhost:/var/lib/collectd/marcin-manjaro/ \
-p memory \
-t "last 15 minutes" \
-o "system wide memory.png" \
--memory buffered,cached,free,slab_recl,slab_unrecl,used
./cgg \
-i /var/lib/collectd/marcin-manjaro/ \
-p memory \
-t "last 15 minutes" \
-o "free memory.png"