TOP 使用技巧:让你的top有生有色
TOP 使用技巧:让你的top有生有色看到top输出时的黑白界面是不是感觉有点感官疲劳啊
下面就让我们预定制咱喜欢的颜色,让top容光焕发:lol
首先运行Top命令
shift + z
会看到如下界面:
Help for color mapping - procps version 3.2.6
current window: 1:Def
color - 04:25:44 up 8 days, 50 min,7 users,load average:
Tasks:64 total, 2 running,62 sleeping, 0 stopped,
Cpu(s):76.5% user,11.2% system, 0.0% nice,12.3% idle
Nasty Message! -or-Input Prompt
PID TTY PRNI %CPU TIME+ VIRT SWAP STA Command
17284 pts/2 8 00.0 0:00.751380 0 S /bin/bash
8601 pts/1 7 -100.4 0:00.03 916 0 R < color -b
11005 ? 9 00.0 0:02.502852 1008 S amor -ses
available toggles: B =disable bold globally (Off),
z =color/mono (On), b =tasks "bold"/reverse (On)
Select target as upper case letter:
S = Summary Data,M = Messages/Prompts,
H = Column Heads,T = Task Information
Select color as number:
0 = black,1 = red, 2 = green,3 = yellow,
4 = blue, 5 = magenta,6 = cyan, 7 = white
Selected: targetT ; color2
press 'q' to abort changes to window '1:Def'
press 'a' or 'w' to commit & change another, <Enter> to commit and end
这里我们就可以预定义top窗口的颜色了
各命令参数解释
Select color as number: 选择预定义的颜色
0 = black,1 = red, 2 = green,3 = yellow,
4 = blue, 5 = magenta,6 = cyan, 7 = white
S:预定义以下两栏界面颜色
Tasks:64 total, 2 running,62 sleeping, 0 stopped,
Cpu(s):76.5% user,11.2% system, 0.0% nice,12.3% idle
M:预定义以下界面颜色
Nasty Message! -or-Input Prompt
H:预定义以下界面颜色
PID TTY PRNI %CPU TIME+ VIRT SWAP STA Command
T:预定义以下界面颜色
17284 pts/2 8 00.0 0:00.751380 0 S /bin/bash
8601 pts/1 7 -100.4 0:00.03 916 0 R < color -b
11005 ? 9 00.0 0:02.502852 1008 S amor -ses
Enter回到top界面 我们会发现颜色变成彩色了 :$
如果让设置下次运行top继续生效 W 保存
退出再Top一下 看看 :funk:
嘿嘿 今天你TOP了吗(⊙_⊙)?
当然TOP还有N多好玩的东东 有兴趣的慢慢体会:sleepy: No colors to map!
页:
[1]