在讲gtop之前可以先说一下htop,功能类似于top,但是画面比top更出色,更加清晰明了,但是htop已经集成在epel源里边,只需要yum安装即可
比htop更好看的是gtop,一个比htop更加漂亮美观的命令,但是并没有集成到epel源里面,需要使用npm 命令进行安装
先来一波效果的展示
Installation requires us to use the node environment, let’s first install the node environment Node.js environment to build
wget https://nodejs.org/dist/v8.9.2/node-v8.9.2-linux-x64.tar.xz
xz -d node-v8.9.2-linux-x64.tar.xz
tar xf node-v8.9.2-linux-x64.tar -C /usr/local/
ln -s /usr/local/node-v8.9.2-linux-x64 /usr/local/node
echo "export PATH=$PATH:/usr/local/node/bin" >>/etc/profile
. /etc/profile && source /etc/profile
node -v
npm install -g cnpm --registry=https://registry.npm.taobao.org
npm -v
cnpm install gtop -g
gtop
Stop using gtop q, or use ctrl+c in most shell environments.
You can sort the flow table by pressing
p: Process ID c: CPU usage m: Memory usage