标题: 请问有没有什么比较好的方法查看aix系统里面进程对cpu,内存的使用情况和优先级?
terry100000
LU新生
Rank: 1


UID 108324
精华 0
积分 9
帖子 16
活跃指数 2
LU金币 18 个
LU金条 0 个
阅读权限 10
注册 2008-6-22
 
发表于 2008-6-22 20:07  资料  个人空间  短消息  加为好友 
请问有没有什么比较好的方法查看aix系统里面进程对cpu,内存的使用情况和优先级?

请问有没有什么比较好的方法查看aix系统里面进程对cpu,内存的使用情况和优先级?
ps aux和ps -ef 都不合适, svmon -P 10 也只能查看占用内存比较多的前10个进程的情况, 进程或者命令的优先级更是不知道如何查看? 希望高手指点





走向成功~
顶部
orian (x40)
版主
Rank: 15Rank: 15Rank: 15Rank: 15Rank: 15



UID 18050
精华 27
积分 2531
帖子 4478
活跃指数 352
LU金币 5757 个
LU金条 251 个
阅读权限 210
注册 2004-4-14
来自 海上
 
发表于 2008-6-22 20:38  资料  个人空间  短消息  加为好友  添加 orian 为MSN好友 通过MSN和 orian 交谈
ps出来pid, svmon对每个pid查看
svmon -P就是所有的啊?你加个10,当然只看pid 为10的进程了

命令优先级?ps -efl   看pri一项





垃圾猪 Orian

mail&msn://ensighine(at)yahoo.com
请访问垃圾猪的垃圾堆:
http://ensighine.spaces.live.com/

文明的曙光
顶部
terry100000
LU新生
Rank: 1


UID 108324
精华 0
积分 9
帖子 16
活跃指数 2
LU金币 18 个
LU金条 0 个
阅读权限 10
注册 2008-6-22
 
发表于 2008-6-22 20:47  资料  个人空间  短消息  加为好友 
你说的我知道,刚刚发现topas这个命令很好用哦topas -P is ok,  楼上的你说ps -efl   看pri一项就是优先级别? 优先级别不是从(-20 到19)么怎么我看到类60的?

[ 本帖最后由 terry100000 于 2008-6-22 21:01 编辑 ]





走向成功~
顶部
orian (x40)
版主
Rank: 15Rank: 15Rank: 15Rank: 15Rank: 15



UID 18050
精华 27
积分 2531
帖子 4478
活跃指数 352
LU金币 5757 个
LU金条 251 个
阅读权限 210
注册 2004-4-14
来自 海上
 
发表于 2008-6-22 20:48  资料  个人空间  短消息  加为好友  添加 orian 为MSN好友 通过MSN和 orian 交谈
你从哪看的从-20到19,不是你看走眼了(没看上下文),就是骗稿费的那个太不敬业





垃圾猪 Orian

mail&msn://ensighine(at)yahoo.com
请访问垃圾猪的垃圾堆:
http://ensighine.spaces.live.com/

文明的曙光
顶部
terry100000
LU新生
Rank: 1


UID 108324
精华 0
积分 9
帖子 16
活跃指数 2
LU金币 18 个
LU金条 0 个
阅读权限 10
注册 2008-6-22
 
发表于 2008-6-22 21:19  资料  个人空间  短消息  加为好友 
http://man.ddvip.com/linux/Mandrakelinuxref/process-priority.html 我从这里看到nice 和renice的介绍,里面说系统中运行的每个进程都有一个优先级(亦称“nice 值”),其范围从 -20 (最高优先级)到 19 (最低优先级)。默认情况下,进程的优先级是 0 (“基本”调度优先级)。优先级比较大的进程(nice 值比较小,最低到 -20)相对优先级比较小的进程(直到 19)将比较频繁地被调度运行,因此就拥有更多的进程周期。一般用户只能降低它们自己进程的优先级别,并限于 0 到 19 之间。超级用户(root)可以将任何进程的优先级设定为任何值。

但是我看到自己实验机上的都是60啊,什么100多的都有





走向成功~
顶部
yddll
技术专家
Rank: 14Rank: 14Rank: 14Rank: 14
Leave blank


UID 212
精华 4
积分 1528
帖子 2403
活跃指数 61
LU金币 2421 个
LU金条 5500 个
阅读权限 200
注册 2003-9-29
 
发表于 2008-6-22 21:48  资料  个人空间  短消息  加为好友 
LS的,你这篇文章明显是for Linux的

为啥不能man一下自己的nice呢?


AIX5.3上的nice

The nice value can range from 0 to 39, with 39 being the lowest priority. For example, if a command normally runs at a priority of 20, specifying an increment of 5 runs the command at a lower priority, 25, and the command runs slower. The nice command does not return an error message if you attempt to increase a command's priority without the appropriate authority. Instead, the command's priority is not changed, and the system starts the command as it normally would.

renice
The renice command alters the nice value of one or more running processes. The nice value is the decimal value of the system scheduling priority of a process. By default, the processes affected are specified by their process IDs. When you specify a process group, the request applies to all processes in the process group.

The nice value is determined in an implementation-dependent manner. If the requested increment raises or lowers the nice value of the executed utility beyond implementation-dependent limits, the limit whose value was exceed is used.

If you do not have root user authority, you can only reset the priority of processes you own and can only increase their priority within the range of 0 to 20, with 20 being the lowest priority. If you have root user authority, you can alter the priority of any process and set the priority to any value in the range -20 to 20. The specified Increment changes the priority of a process in the following ways:
1 to 20         Runs the specified processes slower than the base priority.
0         Sets priority of the specified processes to the base scheduling priority.
-20 to -1         Runs the specified processes quicker than the base priority.

[ 本帖最后由 yddll 于 2008-6-22 22:30 编辑 ]





老人新手。
顶部
[广告] 记录自己的思想火花,留住每日的技术积累,尽在拥有属于自己独立域名的博客。
orian (x40)
版主
Rank: 15Rank: 15Rank: 15Rank: 15Rank: 15



UID 18050
精华 27
积分 2531
帖子 4478
活跃指数 352
LU金币 5757 个
LU金条 251 个
阅读权限 210
注册 2004-4-14
来自 海上
 
发表于 2008-6-22 22:06  资料  个人空间  短消息  加为好友  添加 orian 为MSN好友 通过MSN和 orian 交谈
您那叫”相对“优先级,基础就是60





垃圾猪 Orian

mail&msn://ensighine(at)yahoo.com
请访问垃圾猪的垃圾堆:
http://ensighine.spaces.live.com/

文明的曙光
顶部
[广告] 记录自己的思想火花,留住每日的技术积累,尽在拥有属于自己独立域名的博客。
yddll
技术专家
Rank: 14Rank: 14Rank: 14Rank: 14
Leave blank


UID 212
精华 4
积分 1528
帖子 2403
活跃指数 61
LU金币 2421 个
LU金条 5500 个
阅读权限 200
注册 2003-9-29
 
发表于 2008-6-22 22:46  资料  个人空间  短消息  加为好友 
发给LZ一个链接,俺们共同学习一下

http://www.west263.com/info/html ... 20080410/58906.html





老人新手。
顶部
[广告] 记录自己的思想火花,留住每日的技术积累,尽在拥有属于自己独立域名的博客。
yddll
技术专家
Rank: 14Rank: 14Rank: 14Rank: 14
Leave blank


UID 212
精华 4
积分 1528
帖子 2403
活跃指数 61
LU金币 2421 个
LU金条 5500 个
阅读权限 200
注册 2003-9-29
 
发表于 2008-6-22 23:31  资料  个人空间  短消息  加为好友 
转贴:
根据AIX进程运行管理机制,对于任何长期大量耗费CPU资源的进程将进行降低运行优先级的“惩罚”,随着应用优先级的降低,应用进程申请不到足够的CPU资源,CPU利用率逐渐失衡,表现为系统处理能力下降.解决办法有三种:
应用程序中使用setpriority()函数设置其优先级别,使应用进程运行在某一固定运行优先级下运行而不受惩罚机制的约束;
修改/usr/samples/kernel/schedtune的参数 –d 和-r,降低CPU资源使用过程中对进程优先级的惩罚权重;
使用nice 和renice 命令修改进程的基准运行优先级和运行优先级浮动范围。





老人新手。
顶部
[广告] 记录自己的思想火花,留住每日的技术积累,尽在拥有属于自己独立域名的博客。
terry100000
LU新生
Rank: 1


UID 108324
精华 0
积分 9
帖子 16
活跃指数 2
LU金币 18 个
LU金条 0 个
阅读权限 10
注册 2008-6-22
 
发表于 2008-6-22 23:39  资料  个人空间  短消息  加为好友 
谢谢,大家的讨论,我得仔细看看man里面的内容了,那个肯定准确,谢谢





走向成功~
顶部
yddll
技术专家
Rank: 14Rank: 14Rank: 14Rank: 14
Leave blank


UID 212
精华 4
积分 1528
帖子 2403
活跃指数 61
LU金币 2421 个
LU金条 5500 个
阅读权限 200
注册 2003-9-29
 
发表于 2008-6-23 00:09  资料  个人空间  短消息  加为好友 
AIX 5.3
man schedo

sched_D        
Purpose:
        Sets the short term CPU usage delay rate.
Values:
        * Default: 16
        * Range: 0 to 32
        * Type: Dynamic
Diagnosis:
        N/A
Tuning:
        The default is to decay short-term CPU usage by 1/2 (16/32) every second. Decreasing this value enables foreground processes to avoid competition with background processes for a longer time.
Refer To:
        Thread-Priority-Value calculation

sched_R        

Purpose:
    Sets the weighting factor for short-term CPU usage in priority calculations.
Values:
        * Default: 16
        * Range: 0 to 32
        * Type: Dynamic
Diagnosis:
        Run: ps al. If you find that the PRI column has priority values for foreground processes (those with NI values of 20) that are higher than the PRI values of some background processes (NI values > 20), you can reduce the r value.
Tuning:
        The default is to include 1/2 (16/32) of the short term CPU usage in the priority calculation. Decreasing this value makes it easier for foreground processes to compete.
Refer To:
        Thread-Priority-Value calculation

[ 本帖最后由 yddll 于 2008-6-23 00:10 编辑 ]





老人新手。
顶部
 



当前时区 GMT+8, 现在时间是 2008-11-24 00:28
乐悠LoveUnix论坛-京ICP备05005823号

Thanks to Discuz!  © 2001-2007    Power by LoveUnix.net
Processed in 0.070540 second(s), 6 queries , Gzip enabled

清除 Cookies - 联系我们 - 乐悠LoveUnix - Archiver