All Projects → rs → Jplot

rs / Jplot

Licence: mit
iTerm2 expvar/JSON monitoring tool

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Jplot

Jaggr
JSON Aggregation CLI
Stars: ✭ 365 (-61.54%)
Mutual labels:  cli, json, monitoring
Ponzu
Headless CMS with automatic JSON API. Featuring auto-HTTPS from Let's Encrypt, HTTP/2 Server Push, and flexible server framework written in Go.
Stars: ✭ 5,373 (+466.17%)
Mutual labels:  cli, json
Autocomplete
Autocomplete for terminals on MacOS
Stars: ✭ 569 (-40.04%)
Mutual labels:  cli, iterm2
Icingaweb2
A lightweight and extensible web interface to keep an eye on your environment. Analyse problems and act on them.
Stars: ✭ 665 (-29.93%)
Mutual labels:  cli, monitoring
Ramda Cli
🐏 A CLI tool for processing data with functional pipelines
Stars: ✭ 515 (-45.73%)
Mutual labels:  cli, json
Imgcat
It's like cat, but for images.
Stars: ✭ 577 (-39.2%)
Mutual labels:  cli, iterm2
Nord Iterm2
An arctic, north-bluish clean and elegant iTerm2 color scheme.
Stars: ✭ 651 (-31.4%)
Mutual labels:  cli, iterm2
Node Minify
Light Node.js module that compress javascript, css and html files
Stars: ✭ 404 (-57.43%)
Mutual labels:  cli, json
Ngxtop
Real-time metrics for nginx server
Stars: ✭ 6,246 (+558.17%)
Mutual labels:  cli, monitoring
Dasel
Query, update and convert data structures from the command line. Comparable to jq/yq but supports JSON, TOML, YAML, XML and CSV with zero runtime dependencies.
Stars: ✭ 759 (-20.02%)
Mutual labels:  cli, json
Kt
Kafka command line tool that likes JSON
Stars: ✭ 799 (-15.81%)
Mutual labels:  cli, json
Dshb
macOS system monitor
Stars: ✭ 446 (-53%)
Mutual labels:  cli, monitoring
Jtc
JSON processing utility
Stars: ✭ 425 (-55.22%)
Mutual labels:  cli, json
Trdsql
CLI tool that can execute SQL queries on CSV, LTSV, JSON and TBLN. Can output to various formats.
Stars: ✭ 593 (-37.51%)
Mutual labels:  cli, json
Remarshal
Convert between CBOR, JSON, MessagePack, TOML, and YAML
Stars: ✭ 421 (-55.64%)
Mutual labels:  cli, json
Dev Setup
macOS development environment setup: Easy-to-understand instructions with automated setup scripts for developer tools like Vim, Sublime Text, Bash, iTerm, Python data analysis, Spark, Hadoop MapReduce, AWS, Heroku, JavaScript web development, Android development, common data stores, and dev-based OS X defaults.
Stars: ✭ 5,590 (+489.04%)
Mutual labels:  cli, iterm2
Devdash
🍱 Highly Configurable Terminal Dashboard for Developers and Creators
Stars: ✭ 939 (-1.05%)
Mutual labels:  cli, monitoring
Visidata
A terminal spreadsheet multitool for discovering and arranging data
Stars: ✭ 4,606 (+385.35%)
Mutual labels:  cli, json
Resume Cli
CLI tool to easily setup a new resume 📑
Stars: ✭ 3,967 (+318.02%)
Mutual labels:  cli, json
Structured Text Tools
A list of command line tools for manipulating structured text data
Stars: ✭ 6,180 (+551.21%)
Mutual labels:  cli, json

jplot

license Build Status

Jplot tracks expvar-like (JSON) metrics and plot their evolution over time right into your iTerm2 terminal.

Above capture is jplot monitoring a Go service's expvar:

jplot --url http://:8080/debug/vars \
    memstats.HeapSys+memstats.HeapAlloc+memstats.HeapIdle+marker,counter:memstats.NumGC \
    counter:memstats.TotalAlloc \
    memstats.HeapObjects \
    memstats.StackSys+memstats.StackInuse

By default, jplot uses the full size of the terminal, but it is possible to limit the render to a few rows:

Install

Using homebrew:

brew install rs/tap/jplot

From source:

go get -u github.com/rs/jplot

This tool does only work with iTerm2.

Usage

Given the following JSON output:

{
    "mem": {
        "Heap": 1234,
        "Sys": 4321,
        "Stack": 203
    },
    "cpu": {
        "STime": 123,
        "UTime":1234
    },
    "Threads": 2
}

You can graph the number of thread over time:

jplot --url http://:8080/debug/vars Threads

Or create a graph with both Utime and Stime growth rate on the same axis by using + between two field paths:

jplot --url http://:8080/debug/vars counter:cpu.STime+counter:cpu.UTime

Note: the counter: prefix instructs jplot to compute the difference between the values instead of showing their absolute value.

Or create several graphs by providing groups of fields as separate arguments; each argument creates a new graph:

jplot --url http://:8080/debug/vars mem.Heap+mem.Sys+mem.Stack counter:cpu.STime+cpu.UTime Threads

Spec Syntax

Each positional arguments given to jplot create a stacked graph with the specified values. To reference the values, use gojq JSON query syntax. Several value paths can be referenced for the same graph by using the + character to separate them.

In addition, each value path can be prefixed with options separated from the path by a column. Several options can be used for the same command by separating them with a comma like so: option1,option2:value.path.

Supported options are:

  • counter: Computes the difference with the last value. The value must increase monotonically.
  • marker: When the value is none-zero, a vertical line is drawn.

Recipes

Memstats

Here is an example command to graph a Go program memstats:

jplot --url http://:8080/debug/vars \
    memstats.HeapSys+memstats.HeapAlloc+memstats.HeapIdle+marker,counter:memstats.NumGC \
    counter:memstats.TotalAlloc \
    memstats.HeapObjects \
    memstats.StackSys+memstats.StackInuse

Vegeta

With the help of jaggr can be used to integrate vegeta with jplot as follow:

echo 'GET http://localhost:8080' | \
    vegeta attack -rate 5000 -workers 100 -duration 10m | vegeta dump | \
    jaggr @count=rps \
          hist\[100,200,300,400,500\]:code \
          p25,p50,p95:latency \
          sum:bytes_in \
          sum:bytes_out | \
    jplot rps+code.hist.100+code.hist.200+code.hist.300+code.hist.400+code.hist.500 \
          latency.p95+latency.p50+latency.p25 \
          bytes_in.sum+bytes_out.sum

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].