linux 查看进程绝对路径的几种方式

葫芦的运维日志

下一篇 搜索 上一篇

浏览量 4378

2016/11/11 15:33


查看进程绝对路径的几种方式:

pwdx pid

ls -lhrnt /proc/pid

ps -ef | grep tagent

 

[user00@host ~]$ ps -ef|grep tagent
user00    6801  5473  0 15:32 pts/0    00:00:00 grep --color=auto tagent
user00   44512     1  0 11月10 ?      00:17:04 ./tagent --tlogconf=../cfg/tagent_log.xml --conf-file=../cfg/tagent.xml --log-file=../log/tagent start -D
[user00@host ~]$ ps -ef|grep tagent|grep -v grep
user00   44512     1  0 11月10 ?      00:17:04 ./tagent --tlogconf=../cfg/tagent_log.xml --conf-file=../cfg/tagent.xml --log-file=../log/tagent start -D
[user00@host ~]$ pwdx 44512
44512: /data/home/user00/apps/tagent/bin
[user00@host ~]$ ls -lhrnt /proc/44512
总用量 0
-r--r--r-- 1 30000 100 0 11月 10 21:36 status
-r--r--r-- 1 30000 100 0 11月 10 21:36 stat
-r--r--r-- 1 30000 100 0 11月 10 21:36 cmdline
dr-x------ 2 30000 100 0 11月 10 21:37 fd
-r--r--r-- 1 30000 100 0 11月 10 21:39 smaps
lrwxrwxrwx 1 30000 100 0 11月 10 21:40 exe -> /data/home/user00/apps/tagent/bin/tagent
lrwxrwxrwx 1 30000 100 0 11月 11 05:00 cwd -> /data/home/user00/apps/tagent/bin
-r--r--r-- 1 30000 100 0 11月 11 15:32 wchan
dr-xr-xr-x 7 30000 100 0 11月 11 15:32 task
-r--r--r-- 1 30000 100 0 11月 11 15:32 syscall
-r--r--r-- 1 30000 100 0 11月 11 15:32 statm
-r--r--r-- 1 30000 100 0 11月 11 15:32 stack
-r--r--r-- 1 30000 100 0 11月 11 15:32 sessionid
-rw-r--r-- 1 30000 100 0 11月 11 15:32 sched
lrwxrwxrwx 1 30000 100 0 11月 11 15:32 root -> /
-r--r--r-- 1 30000 100 0 11月 11 15:32 personality
-r--r--r-- 1 30000 100 0 11月 11 15:32 pagemap
-rw-r--r-- 1 30000 100 0 11月 11 15:32 oom_score_adj
-r--r--r-- 1 30000 100 0 11月 11 15:32 oom_score
-rw-r--r-- 1 30000 100 0 11月 11 15:32 oom_adj
-r--r--r-- 1 30000 100 0 11月 11 15:32 numa_maps
dr-x--x--x 2 30000 100 0 11月 11 15:32 ns
dr-xr-xr-x 7 30000 100 0 11月 11 15:32 net
-r-------- 1 30000 100 0 11月 11 15:32 mountstats
-r--r--r-- 1 30000 100 0 11月 11 15:32 mounts
-r--r--r-- 1 30000 100 0 11月 11 15:32 mountinfo
-rw------- 1 30000 100 0 11月 11 15:32 mem
-r--r--r-- 1 30000 100 0 11月 11 15:32 maps
-rw-r--r-- 1 30000 100 0 11月 11 15:32 loginuid
-r--r--r-- 1 30000 100 0 11月 11 15:32 limits
-r--r--r-- 1 30000 100 0 11月 11 15:32 latency
-r-------- 1 30000 100 0 11月 11 15:32 io
dr-x------ 2 30000 100 0 11月 11 15:32 fdinfo
-r-------- 1 30000 100 0 11月 11 15:32 environ
-r--r--r-- 1 30000 100 0 11月 11 15:32 cpuset
-rw-r--r-- 1 30000 100 0 11月 11 15:32 coredump_filter
-rw-r--r-- 1 30000 100 0 11月 11 15:32 comm
--w------- 1 30000 100 0 11月 11 15:32 clear_refs
-r--r--r-- 1 30000 100 0 11月 11 15:32 cgroup
-r-------- 1 30000 100 0 11月 11 15:32 auxv
-rw-r--r-- 1 30000 100 0 11月 11 15:32 autogroup

 

葫芦的运维日志

打赏

上一篇 搜索 下一篇
© 冰糖葫芦甜(bthlt.com) 2021 王梓打赏联系方式 陕ICP备17005322号-1