文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>pgrep 查询进程的工具

pgrep 查询进程的工具

时间:2009-05-22  来源:yangiori007


pgrep 是通过程序的名字来查询进程的工具,一般是用来判断程序是否正在运行。在服务器的配置和管理中,这个工具常被应用,简单明了;


用法:

#ps 参数选项 程序名

常用参数

-l 列出程序名和进程ID;
-o 进程起始的ID;
-n 进程终止的ID;

举例:

[root@localhost ~]# pgrep -lo httpd
4557 httpd
[root@localhost ~]# pgrep -ln httpd
4566 httpd
[root@localhost ~]# pgrep -l httpd
4557 httpd
4560 httpd
4561 httpd
4562 httpd
4563 httpd
4564 httpd
4565 httpd
4566 httpd
[root@localhost ~]# pgrep httpd
4557
4560
4561
4562
4563
4564
4565
4566

排行榜 更多 +
保卫萝卜4内购正式版

保卫萝卜4内购正式版

休闲益智 下载
变身快快跑

变身快快跑

休闲益智 下载
丰新教育

丰新教育

学习教育 下载