termeter

Visualize data in the terminal

  • 所有者: atsaki/termeter
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

termeter

Visualize data in the terminal

Description

termeter can visualize data in the terminal. Data can be passed by pipe or file.

$  seq 100, awk 'BEGIN{OFS="\t"; print "x","sin(x)","cos(x)"}{x=$1/10; print x,sin(x),cos(x)}', termeter

screenshot01

You can even draw charts from streaming data.

$ seq 300, awk 'BEGIN{OFS="\t"; print "x","sin(x)","cos(x)"}{x=$1/10; print x,sin(x),cos(x); system("sleep 0.1")}', termeter

Installation

$ go get github.com/atsaki/termeter/cmd/termeter

Input Data

You can input data with stdin or file.

$ cat data.txt, termeter
$ termeter data.txt

termeter can accept tabular data like CSV.
Delimiter character can be specified with option '-d DELIMITER'. Default is tab.

Chart types

termeter supports following chart types.

  • LINE
    • Plot values as line plot
  • COUNTER
    • Bar chart of frequencies
  • CDF
    • Cumulative distribution function

By default, termeter choose chart type automatically from second line of data.
If value is numeric LINE is choosed. Otherwise, COUNTER is choosed.

You can specify chart type with option -t TYPESTRING.
nth character of TYPESTRING corresponds to nth chart type.
Following charcters can be used.

  • l: LINE
  • c: COUNTER
  • d: CDF
  • other: auto

Example of chart types

$ (echo "line counter cdf"; seq 1 1000, awk '{x=int(6*rand())+1; print x,x,x}'), termeter -d " " -t lcd -S numerical

charttype

Use case

It is useful to draw chart of resouce in the terminal.
You can use tools like dstat.

$ dstat --cpu --output dstat.log > /dev/null &
$ tail -f -n +7 dstat.log, termeter -d ,

License

MIT

主要指標

概覽
名稱與所有者atsaki/termeter
主編程語言Go
編程語言Go (語言數: 1)
平台
許可證MIT License
所有者活动
創建於2015-03-20 01:39:21
推送於2021-09-10 06:51:43
最后一次提交2015-11-13 00:33:52
發布數0
用户参与
星數456
關注者數11
派生數31
提交數7
已啟用問題?
問題數9
打開的問題數8
拉請求數1
打開的拉請求數3
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?