Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
forked fromaantn/smag

Show Me A Graph - Command Line Graphing

License

NotificationsYou must be signed in to change notification settings

joesuf4/smag

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easily create graphs from cli commands and view them in the terminal. Like thewatch command but with a graph of the output.

Other tools

I also work onRobusta - a Kubernetes monitoring and automation platform. It makes your Prometheus alerts better.

Joe Schaefer (joesuf4) forked this repo to make it zsh -ic friendly, so hishttps://github.com/joesuf4/home/tree/wsl rcfiles work cleanly as command-line args toswag.

Demo

Table of Contents

Install 💿

Install from source

git clone https://github.com/aantn/smag.gitcargo install --path.

Install from binaries

Binaries for Mac, Windows, and Linux are available under Releases.

Usage

Just runsmag [shell_cmd] orsmag [cmd1] [cmd2] if you want to graph multiple commands at once.You can control how often the graph updates with the-n flag. You can also graph a derivative of the command's output using-d.

smag can graph any command which outputs an integer or float. Any whitespace before/after the number is trimmed automatically.

Pull requests for more features or fixes are welcome.

Examples

  • Graph number of processes:smag "ps aux | wc -l"
  • Graph number of bash processes and ssh processes as two separate lines:smag "ps aux | grep ssh | wc -l" "ps aux | grep bash | wc -l"
  • Graph number of running Kubernetes pods:smag "kubectl get pods -A | grep Running | wc -l"

Full Usage

$ smag --help                                                                                                           ✔  2355  17:59:43smag 0.5.0Show Me A Graph - Like the`watch`command but with a graph of previous values.USAGE:    smag [FLAGS] [OPTIONS]<cmds>...FLAGS:    -d, --diff       Graph the diff of subsequentcommand outputs        --help       Printshelp information    -V, --version    Prints version informationOPTIONS:    -h, --history<buffer-size>          Specify number of points to'remember' and graph at oncefor each commands                                         [default: 100]    -n, --interval<polling-interval>    Specify update intervalin seconds. [default: 1.0]ARGS:<cmds>...    Command(s) to run

Inspiration

smag was inspired and based on code from the wonderfulgping tool by Tom Forbes

About

Show Me A Graph - Command Line Graphing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust100.0%

[8]ページ先頭

©2009-2025 Movatter.jp