美文网首页linux Linux学习之路Linux
介绍一个使用go写的TUI性能监测工具gotop

介绍一个使用go写的TUI性能监测工具gotop

作者: bboysoul | 来源:发表于2018-04-10 10:40 被阅读25次

概述

首先介绍一下什么是TUI,大家都知道GUI把(Graphical User Interface),那么TUI就是(Text-based User Interface),好接下来介绍这个工具,其实就是一个监测电脑或者服务器运行状态的工具因为是go写的所以我们要先安装go

安装go

这个我就简单化了直接使用ubuntu的包管理器安装就好了
sudo apt-get install golang

安装gotop

首先下载gotop
sh -c“$(curl https://raw.githubusercontent.com/cjbassi/gotop/master/download.sh)”
接着移动这个二进制文件到/usr/local/bin目录
sudo cp gotop /usr/local/bin
如果是不可执行的,那么加上可执行权限就可以了

一些简单的使用

最简单就是直接在命令行中输入gotop就可以了,但是如果你只想看到cpu,内存还有就是程序占用内存情况可以输入
gotop -m
这样你就不会看到网络磁盘什么的了
在进程导航这里你可以使用上下方向键去查看进程,你也可以使用-c参数来显示颜色的类型,gotop提供了三种颜色类型,分别是solarized,monokai,default,详细的看help就好了

➜  ~ gotop --help
Usage: gotop [options]

Options:
  -c, --color=NAME      Set a colorscheme.
  -h, --help            Show this screen.
  -m, --minimal         Only show CPU, Mem and Process widgets.
  -r, --rate=RATE       Number of times per second to update CPU and Mem widgets [default: 1].
  -v, --version         Show version.

Colorschemes:
  default
  solarized
  monokai

欢迎关注Bboysoul的博客www.bboysoul.com
Have Fun

相关文章

网友评论

    本文标题:介绍一个使用go写的TUI性能监测工具gotop

    本文链接:https://www.haomeiwen.com/subject/bidghftx.html