免费注册 查看新帖 |

Chinaunix

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

[SCO UNIX] 请教一个关于memory leak的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-11-09 15:41 |只看该作者 |倒序浏览
20可用积分
SCO上用那个命令可以看到进程内存是否增长,类似AIX上用ps gl命令可以观察SZ、RSS两列的数据。

论坛徽章:
0
2 [报告]
发表于 2007-11-09 16:46 |只看该作者
不知道sar是否可以

论坛徽章:
0
3 [报告]
发表于 2007-11-14 13:58 |只看该作者
原帖由 saintdragon 于 2007-11-9 16:46 发表
不知道sar是否可以

用sar不行。sco下的ps -o也能显示进程的内存使用情况。具体的用法man ps。

-o format
List process data in the specified format. Multiple -o options can be specified on the command line.
format is a comma or whitespace separated list of field names; the list must be placed in quotation marks if whitespace separation is used. ps displays the fields in the order specified on the command line.

You can override the default header for a field by appending a ``='' and the new header text to the field name:

-o field=header

If the header text contains whitespace, enclose the entire field=header string in quotation marks and specify it using a separate -o option:

-o "field=header"

You can prevent a header from being displayed for an individual field by not specifying it after the ``=''. If all field names have a single ``='' appended but no header text, no header line is displayed at all.

ps changes the field width from its default value to match the width of the specified header text.

Allowed field names follow (default headers are shown in parentheses):


pid
Process ID as a decimal value. (PID)

ppid
Parent process ID as a decimal value. (PPID)

pgid
Process group ID as a decimal value. (PGID)

uid
Real user ID of the process as a decimal value. (UID)

user
The effective user ID of the process. (USER)

ruser
Real user ID of the process. (RUSER)

comm
Command name; may contain spaces. (COMMAND)

args
Command name with its arguments; may contain spaces and may be truncated to fit the width of the field. (COMMAND)

group
Effective group ID of the process. (GROUP)

rgroup
Real group ID of the process. (RGROUP)

nice
nice value of the process; see nice(C) and renice(C). (NI)

pri
Priority value of the process. (PRI)

pcpu
Percentage of CPU time recently used by the process. (%CPU)

sess
Process session leader ID as a decimal value. (SESSION)

size
Size of the swappable image of the process (data and stack) in kilobytes. (SZ)

vsz
Virtual memory size of the process in kilobytes. (VSZ)

addr
Virtual address of the process' entry in the process table. (ADDR)

class
Scheduler class of the process. (CLASS)

time
Cumulative CPU time used by the process. (TIME)

stime
Time when the process started. (STIME)

etime
Time elapsed since the process started. (ELAPSED)

tty
Name of the controlling terminal for the process. (TTY)

wchan
Address of an event for which a process is sleeping. (WCHAN)
For fields user, ruser, group, and rgroup, ps displays the user or group name if it can be obtained and it will fit in the field. Otherwise it displays the decimal value of the ID.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP