搜索
首页 电脑/网络 操作系统/系统故障

linux如何查看程序状?

linux如何查看程序状态

全部回答

2014-03-19

60 0

    我们知道所有的进程信息基本都可以在/proc下面找到,但有的时候查看有点麻烦。
     如果想看进程的基本信息,ps就可以了,但ps查看的时间其实是真正cpu运行的时间,而不是程序启动的时间,如下 [root@e conf]# ps -e|grep ps 383 ? 00:00:00 kpsmoused 17287 pts/1 00:00:00 ps 如果想看更详细的信息,可以用-o选项,选择要查看的项目 [root@e conf]# ps -eo pid,lstart,cmd|grep sshd 2153 Fri Dec 21 17:21:10 2012 sshd: root@pts/2 16902 Thu Dec 27 09:08:50 2012 sshd: root@notty 17309 Thu Dec 27 11:28:43 2012 grep sshd 18397 Tue Dec 25 14:00:38 2012 /usr/sbin/sshd 18399 Tue Dec 25 14:00:41 2012 sshd: root@notty 23272 Wed Dec 26 15:40:58 2012 sshd: root@pts/1 其中pid表示进程号,lstart是启动时间 另外还有etime 表示运行的时间, nlwp表示线程数,详细的可以看help 帮到你就给个好评吧。

类似问题换一批

热点推荐

热度TOP

相关推荐
加载中...

热点搜索 换一换

电脑/网络
操作系统/系统故障
程序设计
电脑装机
硬件
笔记本电脑
百度
互联网
反病毒
软件
操作系统/系统故障
操作系统/系统故障
举报
举报原因(必选):
取消确定举报