分享
 
 
 

Solaris常用的几个命令

王朝other·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

ps

查看进程,常用的用法有

ps -ef | grep xxxx 查看含xxxx字符串的进程 (如果xxxx是命令中的一段,而这个命令很长,xxxx位于最后面,这个程序就找不到了,看下面的ucb ps)

例子:

zhanju:/home/zhanju $ps -ef | grep was

oracle 18112 1 0 Sep 23 ? 0:00 ora_s000_was

oracle 18114 1 0 Sep 23 ? 0:00 ora_d000_was

oracle 15886 1 0 Oct 25 ? 0:05 oraclewas (DESCRIPTION=(LOCAL=no)(ADDRESS=(PROTOCOL=BEQ)))

oracle 18098 1 0 Sep 23 ? 0:13 ora_dbw0_was

was 1509 10844 0 Oct 22 ? 7:26 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -server

was 17147 10844 0 Oct 25 ? 4:42 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -server

oracle 29411 1 0 18:21:09 ? 0:00 oraclewas (DESCRIPTION=(LOCAL=no)(ADDRESS=(PROTOCOL=BEQ)))

oracle 5510 1 0 14:43:10 ? 1:25 oraclewas (DESCRIPTION=(LOCAL=no)(ADDRESS=(PROTOCOL=BEQ)))

oracle 18104 1 0 Sep 23 ? 0:19 ora_smon_was

oracle 18096 1 0 Sep 23 ? 0:00 ora_pmon_was

zhanju 20586 19391 0 02:28:52 pts/16 0:00 grep was

was 10844 29400 0 Oct 22 ? 172:28 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -Xmx128

was 10990 10844 0 Oct 27 ? 2:34 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -server

was 9507 1 0 Oct 22 ? 56:07 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -server

oracle 18110 1 0 Sep 23 ? 0:01 ora_snp1_was

was 8809 10844 0 15:10:51 ? 2:55 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -server

was 10987 10844 0 Oct 22 ? 1:04 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -server

oracle 18100 1 0 Sep 23 ? 2:33 ora_lgwr_was

oracle 18102 1 0 Sep 23 ? 9:41 ora_ckpt_was

was 19692 10844 0 16:48:54 ? 1:44 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -server

was 6123 10844 0 14:48:44 ? 1:53 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -server

oracle 18108 1 0 Sep 23 ? 0:01 ora_snp0_was

was 29395 1 0 Oct 15 ? 0:00 /bin/ksh /opt/WebSphere4/AppServer/bin/startupServer.sh 4001

oracle 18106 1 0 Sep 23 ? 0:00 ora_reco_was

was 9079 10844 0 Oct 27 ? 19:08 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -server

was 28957 10844 0 18:17:04 ? 1:49 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -server

was 20841 10844 0 Oct 25 ? 2:50 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -server

was 29400 29395 0 Oct 15 ? 0:07 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -classp

was 503 10844 0 13:58:37 ? 0:31 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -server

was 8631 10844 0 15:09:46 ? 1:57 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -server

oracle 14079 1 0 15:58:19 ? 0:01 oraclewas (DESCRIPTION=(LOCAL=no)(ADDRESS=(PROTOCOL=BEQ)))

was 17080 10844 0 Oct 25 ? 22:12 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -server

was 2211 10844 0 Oct 27 ? 71:45 /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java -server

zhanju:/home/zhanju $

ps -eo pid,user,comm,pcpu,pmem 查看指定的一些进程属性,o后面的就是属性,具体请看manual page

例子:

zhanju:/home/zhanju $ps -eo pid,user,comm,pcpu,pmem | grep was

18112 oracle ora_s000_was 0.0 1.6

18114 oracle ora_d000_was 0.0 1.6

15886 oracle oraclewas 0.0 1.6

18098 oracle ora_dbw0_was 0.0 1.6

1509 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.0 3.1

17147 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.0 2.2

29411 oracle oraclewas 0.0 1.6

5510 oracle oraclewas 0.0 1.6

18104 oracle ora_smon_was 0.0 1.6

18096 oracle ora_pmon_was 0.0 1.6

10844 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.0 3.5

10990 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.0 1.6

9507 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.0 23.3

18110 oracle ora_snp1_was 0.0 1.6

8809 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.0 4.9

10987 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.0 1.3

18100 oracle ora_lgwr_was 0.0 1.6

18102 oracle ora_ckpt_was 0.0 1.6

19692 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.0 2.8

6123 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.0 2.3

18108 oracle ora_snp0_was 0.0 1.7

29395 was /bin/ksh 0.0 0.1

18106 oracle ora_reco_was 0.0 1.6

9079 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.1 4.4

28957 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.0 2.4

20841 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.0 2.4

29400 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.0 0.6

503 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.0 1.5

8631 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.0 1.8

14079 oracle oraclewas 0.0 1.6

17080 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.1 3.8

2211 was /opt/WebSphere4/AppServer/java/jre/bin/../bin/sparc/native_threads/java 0.5 3.4

zhanju:/home/zhanju $

ucb ps

这个命令和/bin/ps是有区别的,用它能看到完整的进程命令行,用法是

/usr/ucb/ps -alxww

例子:

zhanju:/home/zhanju $/usr/ucb/ps -alxww | grep httpd

8 0 997 1 0 59 2011528 8712 mutex_ex S ? 0:03 /opt/IBMHTTPD/bin/httpd

8 60001 1147 997 0 59 2012120 7016 mutex_ex S ? 0:33 /opt/IBMHTTPD/bin/httpd

8 60001 1148 997 0 59 2012128 6992 mutex_ex S ? 0:32 /opt/IBMHTTPD/bin/httpd

8 60001 1149 997 0 59 2012128 7224 mutex_ex S ? 0:32 /opt/IBMHTTPD/bin/httpd

8 60001 1150 997 0 59 2012128 6944 mutex_ex S ? 0:32 /opt/IBMHTTPD/bin/httpd

8 60001 1151 997 0 59 2012120 6232 mutex_ex S ? 0:32 /opt/IBMHTTPD/bin/httpd

8 60001 3130 997 0 59 2012120 6280 mutex_ex S ? 0:33 /opt/IBMHTTPD/bin/httpd

8 60001 3656 997 0 60 2012096 6968 mutex_ex S ? 0:32 /opt/IBMHTTPD/bin/httpd

8 60001 7240 997 0 59 2012128 6256 udp_g_lo S ? 0:32 /opt/IBMHTTPD/bin/httpd

8 60001 7241 997 0 59 2012144 6440 mutex_ex S ? 0:31 /opt/IBMHTTPD/bin/httpd

8 60001 20113 997 0 59 2012176 7264 mutex_ex S ? 0:32 /opt/IBMHTTPD/bin/httpd

8 39650 20935 19391 0 59 20 1032 784 mutex_ex S pts/16 0:00 grep httpd

zhanju:/home/zhanju $

prstat

查看当前系统进程

常用的是 prstat -u username

例子:

PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP

2211 was 277M 196M sleep 59 0 1:11.50 0.2% java/27

9079 was 406M 257M sleep 59 0 0:19.09 0.1% java/25

17080 was 292M 220M sleep 59 0 0:22.12 0.0% java/27

10844 was 279M 206M sleep 59 0 2:52.27 0.0% java/115

20841 was 160M 137M sleep 59 0 0:02.50 0.0% java/23

6123 was 280M 132M sleep 59 0 0:01.53 0.0% java/21

17147 was 265M 129M sleep 59 0 0:04.41 0.0% java/39

8631 was 255M 106M sleep 59 0 0:01.57 0.0% java/27

503 was 244M 86M sleep 59 0 0:00.31 0.0% java/14

29400 was 95M 34M sleep 59 0 0:00.06 0.0% java/8

28957 was 162M 142M sleep 59 0 0:01.49 0.0% java/26

29395 was 1912K 1400K sleep 59 0 0:00.00 0.0% startupServer.s/1

19692 was 264M 165M sleep 59 0 0:01.44 0.0% java/24

10987 was 148M 77M sleep 59 0 0:01.04 0.0% java/20

8809 was 656M 287M sleep 59 0 0:02.55 0.0% java/26

9507 was 1473M 1368M sleep 59 0 0:56.07 0.0% java/29

10990 was 165M 89M sleep 59 0 0:02.34 0.0% java/20

1509 was 212M 183M sleep 59 0 0:07.26 0.0% java/24

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有