免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4829 | 回复: 2
打印 上一主题 下一主题

top排序问题 [复制链接]

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-04-08 13:15 |只看该作者 |倒序浏览
如何将top的执行结果按CPU%、MEM%和TIME排列,找到占有率最多的,然后输出到 一个文件中;\r\n\r\n另外,TOP默认启动显示只有一屏,如何翻页?

论坛徽章:
0
2 [报告]
发表于 2005-04-08 14:05 |只看该作者

top排序问题

排序可以加 -o的参数\r\n\r\n默认 top是定时地更新显示15条进程消息 没必要翻页吧?\r\n\r\n好象top有个交互式的运行状态 可以使用的命令:\r\n^L   Redraw the screen.\r\n\r\n     h or ?\r\n          Display a summary of the commands (help screen).   Ver-\r\n          sion information is included in this display.\r\n\r\n     q    Quit top.\r\n\r\n     d    Change the number of displays to show (prompt  for  new\r\n          number).  Remember that the next display counts as one,\r\n          so typing d1 will make top show one final  display  and\r\n          then immediately exit.\r\n\r\n     n or #\r\n          Change the number of processes to display  (prompt  for\r\n          new number).\r\n\r\n     s    Change the number of seconds to delay between  displays\r\n          (prompt for new number).\r\n\r\n     k    Send  a  signal  (\"kill\"  by  default)  to  a  list  of\r\n          processes.    This   acts   similarly  to  the  command\r\n          kill(1)).\r\n\r\n     r    Change  the  priority  (the  \"nice\"  of  a   list   of\r\n          processes.   This  acts  similarly  to the command ren-\r\n          ice().\r\n\r\n     u    Display only processes owned  by  a  specific  username\r\n          (prompt  for  username).   If the username specified is\r\n          simply \"+\", then processes belonging to all users  will\r\n          be displayed.\r\n\r\n     o    Change the order in which the display is sorted.   This\r\n          command  is not available on all systems.  The sort key\r\n          names vary fron system to system but  usually  include:\r\n          \"cpu\", \"res\", \"size\", \"time\".  The default is cpu.\r\n\r\n     e    Display a list of system errors (if any)  generated  by\r\n          the last kill or renice command.\r\n\r\n     i    (or I) Toggle the display of idle processes.

论坛徽章:
0
3 [报告]
发表于 2005-04-10 18:00 |只看该作者

top排序问题

maybe you can use\r\n/usr/ucb/ps -aux
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP