[已解决]top在非交互模式下如何改变内存输出单位?

其它类软件,非上述版软件
回复
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

[已解决]top在非交互模式下如何改变内存输出单位?

#1

帖子 科学之子 » 2016-07-03 3:16

top在非交互模式下如何改变内存输出单位?
例如如何改变下列命令的内存输出单位:

代码: 全选

top -b -n 1 -o SHR
在交换模式下调整到希望显示的状态然后按"W"(大写)
就可以保存当前的状态,下次启动时即使是非交互模式也会按照保存的状态来显示
上次由 科学之子 在 2016-07-03 7:09,总共编辑 1 次。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: top在非交互模式下如何改变内存输出单位?

#2

帖子 poloshiao » 2016-07-03 6:51

http://manpages.ubuntu.com/manpages/pre ... top.1.html
top - display Linux tasks
使用 size 關鍵字 搜尋
例如
1. The types of system summary information shown and the types, order and size of information displayed for tasks are all user configurable and that configuration can be made persistent across restarts.
2. p: SWAP -- Swapped size (kb)
3. t: SHR -- Shared Mem size (kb)
The amount of shared memory used by a task. It simply reflects memory that could be potentially shared with other processes.
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

Re: top在非交互模式下如何改变内存输出单位?

#3

帖子 科学之子 » 2016-07-03 7:08

poloshiao 写了:http://manpages.ubuntu.com/manpages/pre ... top.1.html
top - display Linux tasks
使用 size 關鍵字 搜尋
例如
1. The types of system summary information shown and the types, order and size of information displayed for tasks are all user configurable and that configuration can be made persistent across restarts.
2. p: SWAP -- Swapped size (kb)
3. t: SHR -- Shared Mem size (kb)
The amount of shared memory used by a task. It simply reflects memory that could be potentially shared with other processes.
感谢提醒
在您的提醒下我仔细看了man文档
使用关键字"save"搜寻,找到了"W"(大写)这个交互命令
可以保存当前的状态,这样top再次启动时就会按照保存的状态显示,而非默认状态
回复