前提(直接看👇超简单的用法)

以hikflow_demo为例(在命令行下而非在海康容器里),我们查看它启动后的进程信息包含哪些
信息位置在/proc/[pid]/

实操(直接看👇超简单的用法)

ps查看进程号为6231
在这里插入图片描述
cd /proc/6231/
ls -lah

在这里插入图片描述

# ls -lah
dr-xr-xr-x    8 admin    root           0 May 18 00:33 .
dr-xr-xr-x  137 admin    root           0 Jan  1  1970 ..
-r--------    1 admin    root           0 May 18 00:38 auxv
-r--r--r--    1 admin    root           0 May 18 00:38 cgroup
--w-------    1 admin    root           0 May 18 00:38 clear_refs
-r--r--r--    1 admin    root           0 May 18 00:33 cmdline
-rw-r--r--    1 admin    root           0 May 18 00:38 comm
-rw-r--r--    1 admin    root           0 May 18 00:38 coredump_filter
-r--r--r--    1 admin    root           0 May 18 00:38 cpuset
lrwxrwxrwx    1 admin    root           0 May 18 00:38 cwd -> /heop/package/ky_ai/opdevsdkDemo (deleted)
-r--------    1 admin    root           0 May 18 00:38 environ
lrwxrwxrwx    1 admin    root           0 May 18 00:38 exe -> /heop/package/ky_ai/opdevsdkDemo/hikflow_demo_h7
dr-x------    2 admin    root           0 May 18 00:33 fd
dr-x------    2 admin    root           0 May 18 00:38 fdinfo
-rw-r--r--    1 admin    root           0 May 18 00:38 gid_map
-r--r--r--    1 admin    root           0 May 18 00:38 limits
dr-x------    2 admin    root           0 May 18 00:38 map_files
-r--r--r--    1 admin    root           0 May 18 00:38 maps
-rw-------    1 admin    root           0 May 18 00:38 mem
-r--r--r--    1 admin    root           0 May 18 00:38 mountinfo
-r--r--r--    1 admin    root           0 May 18 00:38 mounts
-r--------    1 admin    root           0 May 18 00:38 mountstats
dr-xr-xr-x    8 admin    root           0 May 18 00:38 net
dr-x--x--x    2 admin    root           0 May 18 00:38 ns
-rw-r--r--    1 admin    root           0 May 18 00:38 oom_adj
-r--r--r--    1 admin    root           0 May 18 00:38 oom_score
-rw-r--r--    1 admin    root           0 May 18 00:38 oom_score_adj
-r--------    1 admin    root           0 May 18 00:38 pagemap
-r--------    1 admin    root           0 May 18 00:38 personality
-rw-r--r--    1 admin    root           0 May 18 00:38 projid_map
lrwxrwxrwx    1 admin    root           0 May 18 00:38 root -> /
-rw-r--r--    1 admin    root           0 May 18 00:38 sched
-rw-r--r--    1 admin    root           0 May 18 00:38 setgroups
-r--r--r--    1 admin    root           0 May 18 00:38 smaps
-r--------    1 admin    root           0 May 18 00:38 stack
-r--r--r--    1 admin    root           0 May 18 00:33 stat
-r--r--r--    1 admin    root           0 May 18 00:38 statm
-r--r--r--    1 admin    root           0 May 18 00:38 status
-r--------    1 admin    root           0 May 18 00:38 syscall
dr-xr-xr-x   11 admin    root           0 May 18 00:38 task
-rw-rw-rw-    1 admin    root           0 May 18 00:38 timerslack_ns
-rw-r--r--    1 admin    root           0 May 18 00:38 uid_map
-r--r--r--    1 admin    root           0 May 18 00:38 wchan
# 

我们一个个来看

# cat auxv 
!殿d4 	r 

э옟ʏ졠Xshell
-sh: Xshell: not found
# 
# cat cgroup 
1:cpuset,cpu,memory,devices:/
# 
# cat cmdline 
/heop/package/ky_ai/opdevsdkDemo/hikflow_demo_h7/heop/package/ky_ai/opdevsdkDemo/model/config_yolov3_tiny_pytorch_facedetection2.txtYUV# 
# 
# cat comm 
hikflow_demo_h7
# 
# cat coredump_filter 
00000033
# 
# cat cpuset 
/
# 
# cat environ 
SSH_CLIENT=192.168.1.178 50682 22USER=adminLD_LIBRARY_PATH=/lib:/usr/libSHLVL=1OLDPWD=/procHOME=/SSH_TTY=/dev/pts/3DBUS_SESSION_BUS_ADDRESS=unix:path=/lib/heop_bus_socketLOGNAME=adminTERM=xtermPATH=.:/bin:/usr/bin:/dav:/sbin:/usr/sbinSHELL=/bin/shPWD=/heop/package/ky_ai/opdevsdkDemoSSH_CONNECTION=192.168.1.178 50682 192.168.1.69 22# 
# 
# cd fd
# ls -lah
dr-x------    2 admin    root           0 May 18 00:33 .
dr-xr-xr-x    8 admin    root           0 May 18 00:33 ..
lrwx------    1 admin    root          64 May 18 00:33 0 -> /dev/pts/3
lrwx------    1 admin    root          64 May 18 00:33 1 -> /dev/pts/3
lrwx------    1 admin    root          64 May 18 00:33 10 -> /dev/vgs
lrwx------    1 admin    root          64 May 18 00:47 11 -> socket:[133472]
lrwx------    1 admin    root          64 May 18 00:33 2 -> /dev/pts/3
lrwx------    1 admin    root          64 May 18 00:33 3 -> /dev/sys
lrwx------    1 admin    root          64 May 18 00:33 4 -> /dev/mmz_userdev
lrwx------    1 admin    root          64 May 18 00:33 5 -> /dev/hi_tde
lrwx------    1 admin    root          64 May 18 00:33 6 -> socket:[133243]
lr-x------    1 admin    root          64 May 18 00:33 7 -> /dev/dsp
lrwx------    1 admin    root          64 May 18 00:33 8 -> socket:[133246]
lr-x------    1 admin    root          64 May 18 00:33 9 -> /dev/nnie
#
# cd ../fdinfo/
# ls -lh
-r--------    1 admin    root           0 May 18 00:49 0
-r--------    1 admin    root           0 May 18 00:49 1
-r--------    1 admin    root           0 May 18 00:49 10
-r--------    1 admin    root           0 May 18 00:49 11
-r--------    1 admin    root           0 May 18 00:49 2
-r--------    1 admin    root           0 May 18 00:49 3
-r--------    1 admin    root           0 May 18 00:49 4
-r--------    1 admin    root           0 May 18 00:49 5
-r--------    1 admin    root           0 May 18 00:49 6
-r--------    1 admin    root           0 May 18 00:49 7
-r--------    1 admin    root           0 May 18 00:49 8
-r--------    1 admin    root           0 May 18 00:49 9
# 
# 
# cd ..
# 
# cat gid_map 
         0          0 4294967295
# 
# cat limits 
Limit                     Soft Limit           Hard Limit           Units     
Max cpu time              unlimited            unlimited            seconds   
Max file size             unlimited            unlimited            bytes     
Max data size             unlimited            unlimited            bytes     
Max stack size            8388608              unlimited            bytes     
Max core file size        0                    0                    bytes     
Max resident set          unlimited            unlimited            bytes     
Max processes             3406                 3406                 processes 
Max open files            1024                 4096                 files     
Max locked memory         65536                65536                bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       3406                 3406                 signals   
Max msgqueue size         819200               819200               bytes     
Max nice priority         0                    0                    
Max realtime priority     0                    0                    
Max realtime timeout      unlimited            unlimited            us        
# 
# 
# 
# cd map_files/
# ls -lh
lr--------    1 admin    root          64 May 18 00:55 10000-1fc000 -> /heop/package/ky_ai/opdevsdkDemo/hikflow_demo_h7
lr--------    1 admin    root          64 May 18 00:55 20b000-20c000 -> /heop/package/ky_ai/opdevsdkDemo/hikflow_demo_h7
lr--------    1 admin    root          64 May 18 00:55 20c000-212000 -> /heop/package/ky_ai/opdevsdkDemo/hikflow_demo_h7
lrw-------    1 admin    root          64 May 18 00:55 aff58000-affee000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 affee000-b0084000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b0084000-b011a000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b011a000-b01b0000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b01b0000-b04a8000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b04a8000-b0d06000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b0d06000-b219c000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b219c000-b29ce000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b2a4e000-b2ae4000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b2ae4000-b2b7a000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b2b7a000-b2c10000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b2c10000-b2f08000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b2f08000-b3200000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b356a000-b3600000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b4161000-b41c0000 -> /dev/mmz_userdev
lr--------    1 admin    root          64 May 18 00:55 b4a40000-b4a41000 -> /lib/libbproxy.so
lr--------    1 admin    root          64 May 18 00:55 b4a41000-b4a51000 -> /lib/libbproxy.so
lr--------    1 admin    root          64 May 18 00:55 b4a51000-b4a52000 -> /lib/libbproxy.so
lr--------    1 admin    root          64 May 18 00:55 b4a52000-b4a53000 -> /lib/libbproxy.so
lrw-------    1 admin    root          64 May 18 00:55 b4c53000-b5048000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b5048000-b5831000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b5831000-b6804000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b6804000-b6a04000 -> /SYSV6a020e6c (deleted)
lrw-------    1 admin    root          64 May 18 00:55 b6a04000-b6c04000 -> /SYSV6a020e6c (deleted)
lr--------    1 admin    root          64 May 18 00:55 b6c04000-b6c20000 -> /lib/libgcc_s.so.1
lr--------    1 admin    root          64 May 18 00:55 b6c20000-b6c2f000 -> /lib/libgcc_s.so.1
lr--------    1 admin    root          64 May 18 00:55 b6c2f000-b6c30000 -> /lib/libgcc_s.so.1
lr--------    1 admin    root          64 May 18 00:55 b6c30000-b6c31000 -> /lib/libgcc_s.so.1
lr--------    1 admin    root          64 May 18 00:55 b6c31000-b6d5e000 -> /lib/libc-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6d5e000-b6d6e000 -> /lib/libc-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6d6e000-b6d70000 -> /lib/libc-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6d70000-b6d71000 -> /lib/libc-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6d74000-b6ea1000 -> /lib/libstdc++.so.6.0.23
lr--------    1 admin    root          64 May 18 00:55 b6ea1000-b6eb0000 -> /lib/libstdc++.so.6.0.23
lr--------    1 admin    root          64 May 18 00:55 b6eb0000-b6eb5000 -> /lib/libstdc++.so.6.0.23
lr--------    1 admin    root          64 May 18 00:55 b6eb5000-b6eb7000 -> /lib/libstdc++.so.6.0.23
lr--------    1 admin    root          64 May 18 00:55 b6eb9000-b6ebb000 -> /lib/libdl-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6ebb000-b6eca000 -> /lib/libdl-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6eca000-b6ecb000 -> /lib/libdl-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6ecb000-b6ecc000 -> /lib/libdl-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6ecc000-b6ed2000 -> /lib/librt-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6ed2000-b6ee1000 -> /lib/librt-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6ee1000-b6ee2000 -> /lib/librt-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6ee2000-b6ee3000 -> /lib/librt-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6ee3000-b6f55000 -> /lib/libm-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6f55000-b6f64000 -> /lib/libm-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6f64000-b6f65000 -> /lib/libm-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6f65000-b6f66000 -> /lib/libm-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6f66000-b6f7d000 -> /lib/libpthread-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6f7d000-b6f8c000 -> /lib/libpthread-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6f8c000-b6f8d000 -> /lib/libpthread-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6f8d000-b6f8e000 -> /lib/libpthread-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6f90000-b6fb0000 -> /lib/ld-2.24.so
lrw-------    1 admin    root          64 May 18 00:55 b6fb3000-b6fb4000 -> /dev/sys
lrw-------    1 admin    root          64 May 18 00:55 b6fb4000-b6fb5000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b6fb5000-b6fb6000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b6fb6000-b6fb7000 -> /dev/mmz_userdev
lrw-------    1 admin    root          64 May 18 00:55 b6fb7000-b6fb8000 -> /dev/mmz_userdev
lr--------    1 admin    root          64 May 18 00:55 b6fbf000-b6fc0000 -> /lib/ld-2.24.so
lr--------    1 admin    root          64 May 18 00:55 b6fc0000-b6fc1000 -> /lib/ld-2.24.so
# 
# 
# cd ..
# 
# cat maps 
00010000-001fc000 r-xp 00000000 103:0d 37        /heop/package/ky_ai/opdevsdkDemo/hikflow_demo_h7
0020b000-0020c000 r--p 001eb000 103:0d 37        /heop/package/ky_ai/opdevsdkDemo/hikflow_demo_h7
0020c000-00212000 rw-p 001ec000 103:0d 37        /heop/package/ky_ai/opdevsdkDemo/hikflow_demo_h7
00212000-002b5000 rw-p 00000000 00:00 0          [heap]
ae600000-ae621000 rw-p 00000000 00:00 0 
ae621000-ae700000 ---p 00000000 00:00 0 
ae758000-ae759000 ---p 00000000 00:00 0 
ae759000-aef58000 rw-p 00000000 00:00 0 
aef58000-aef59000 ---p 00000000 00:00 0 
aef59000-af758000 rw-p 00000000 00:00 0 
af758000-af759000 ---p 00000000 00:00 0 
af759000-aff58000 rw-p 00000000 00:00 0 
aff58000-affee000 rw-s 51185000 00:0f 4011       /dev/mmz_userdev
affee000-b0084000 rw-s 510ef000 00:0f 4011       /dev/mmz_userdev
b0084000-b011a000 rw-s 51059000 00:0f 4011       /dev/mmz_userdev
b011a000-b01b0000 rw-s 50fc3000 00:0f 4011       /dev/mmz_userdev
b01b0000-b04a8000 rw-s 50a73000 00:0f 4011       /dev/mmz_userdev
b04a8000-b0d06000 rw-s 4fc25000 00:0f 4011       /dev/mmz_userdev
b0d06000-b219c000 rw-s 4e78e000 00:0f 4011       /dev/mmz_userdev
b219c000-b29ce000 rw-s 4df5c000 00:0f 4011       /dev/mmz_userdev
b2a4e000-b2ae4000 rw-s 50f2d000 00:0f 4011       /dev/mmz_userdev
b2ae4000-b2b7a000 rw-s 50e97000 00:0f 4011       /dev/mmz_userdev
b2b7a000-b2c10000 rw-s 50e01000 00:0f 4011       /dev/mmz_userdev
b2c10000-b2f08000 rw-s 5077b000 00:0f 4011       /dev/mmz_userdev
b2f08000-b3200000 rw-s 50483000 00:0f 4011       /dev/mmz_userdev
b3200000-b3201000 ---p 00000000 00:00 0 
b3201000-b3400000 rw-p 00000000 00:00 0 
b3400000-b3421000 rw-p 00000000 00:00 0 
b3421000-b3500000 ---p 00000000 00:00 0 
b356a000-b3600000 rw-s 50d6b000 00:0f 4011       /dev/mmz_userdev
b3600000-b3601000 ---p 00000000 00:00 0 
b3601000-b3e00000 rw-p 00000000 00:00 0 
b3e00000-b3e01000 ---p 00000000 00:00 0 
b3e01000-b4000000 rw-p 00000000 00:00 0 
b4000000-b4021000 rw-p 00000000 00:00 0 
b4021000-b4100000 ---p 00000000 00:00 0 
b4161000-b41c0000 rw-s 4defd000 00:0f 4011       /dev/mmz_userdev
b41c0000-b41f0000 rw-p 00000000 00:00 0 
b41f0000-b41f1000 ---p 00000000 00:00 0 
b41f1000-b4a20000 rw-p 00000000 00:00 0 
b4a20000-b4a21000 ---p 00000000 00:00 0 
b4a21000-b4a40000 rw-p 00000000 00:00 0 
b4a40000-b4a41000 r-xp 00000000 00:02 4236       /lib/libbproxy.so
b4a41000-b4a51000 ---p 00001000 00:02 4236       /lib/libbproxy.so
b4a51000-b4a52000 r--p 00001000 00:02 4236       /lib/libbproxy.so
b4a52000-b4a53000 rw-p 00002000 00:02 4236       /lib/libbproxy.so
b4a53000-b4a54000 ---p 00000000 00:00 0 
b4a54000-b4c53000 rw-p 00000000 00:00 0 
b4c53000-b5048000 rw-s 4db05000 00:0f 4011       /dev/mmz_userdev
b5048000-b5831000 rw-s 4d31c000 00:0f 4011       /dev/mmz_userdev
b5831000-b6804000 rw-s 3ea04000 00:0f 4011       /dev/mmz_userdev
b6804000-b6a04000 rw-s 00000000 00:01 98307      /SYSV6a020e6c (deleted)
b6a04000-b6c04000 rw-s 00000000 00:01 98307      /SYSV6a020e6c (deleted)
b6c04000-b6c20000 r-xp 00000000 00:02 55         /lib/libgcc_s.so.1
b6c20000-b6c2f000 ---p 0001c000 00:02 55         /lib/libgcc_s.so.1
b6c2f000-b6c30000 r--p 0001b000 00:02 55         /lib/libgcc_s.so.1
b6c30000-b6c31000 rw-p 0001c000 00:02 55         /lib/libgcc_s.so.1
b6c31000-b6d5e000 r-xp 00000000 00:02 27         /lib/libc-2.24.so
b6d5e000-b6d6e000 ---p 0012d000 00:02 27         /lib/libc-2.24.so
b6d6e000-b6d70000 r--p 0012d000 00:02 27         /lib/libc-2.24.so
b6d70000-b6d71000 rw-p 0012f000 00:02 27         /lib/libc-2.24.so
b6d71000-b6d74000 rw-p 00000000 00:00 0 
b6d74000-b6ea1000 r-xp 00000000 00:02 40         /lib/libstdc++.so.6.0.23
b6ea1000-b6eb0000 ---p 0012d000 00:02 40         /lib/libstdc++.so.6.0.23
b6eb0000-b6eb5000 r--p 0012c000 00:02 40         /lib/libstdc++.so.6.0.23
b6eb5000-b6eb7000 rw-p 00131000 00:02 40         /lib/libstdc++.so.6.0.23
b6eb7000-b6eb9000 rw-p 00000000 00:00 0 
b6eb9000-b6ebb000 r-xp 00000000 00:02 35         /lib/libdl-2.24.so
b6ebb000-b6eca000 ---p 00002000 00:02 35         /lib/libdl-2.24.so
b6eca000-b6ecb000 r--p 00001000 00:02 35         /lib/libdl-2.24.so
b6ecb000-b6ecc000 rw-p 00002000 00:02 35         /lib/libdl-2.24.so
b6ecc000-b6ed2000 r-xp 00000000 00:02 46         /lib/librt-2.24.so
b6ed2000-b6ee1000 ---p 00006000 00:02 46         /lib/librt-2.24.so
b6ee1000-b6ee2000 r--p 00005000 00:02 46         /lib/librt-2.24.so
b6ee2000-b6ee3000 rw-p 00006000 00:02 46         /lib/librt-2.24.so
b6ee3000-b6f55000 r-xp 00000000 00:02 36         /lib/libm-2.24.so
b6f55000-b6f64000 ---p 00072000 00:02 36         /lib/libm-2.24.so
b6f64000-b6f65000 r--p 00071000 00:02 36         /lib/libm-2.24.so
b6f65000-b6f66000 rw-p 00072000 00:02 36         /lib/libm-2.24.so
b6f66000-b6f7d000 r-xp 00000000 00:02 41         /lib/libpthread-2.24.so
b6f7d000-b6f8c000 ---p 00017000 00:02 41         /lib/libpthread-2.24.so
b6f8c000-b6f8d000 r--p 00016000 00:02 41         /lib/libpthread-2.24.so
b6f8d000-b6f8e000 rw-p 00017000 00:02 41         /lib/libpthread-2.24.so
b6f8e000-b6f90000 rw-p 00000000 00:00 0 
b6f90000-b6fb0000 r-xp 00000000 00:02 25         /lib/ld-2.24.so
b6fb3000-b6fb4000 rw-s 0423c000 00:0f 4026       /dev/sys
b6fb4000-b6fb5000 rw-s 4fc24000 00:0f 4011       /dev/mmz_userdev
b6fb5000-b6fb6000 rw-s 4defc000 00:0f 4011       /dev/mmz_userdev
b6fb6000-b6fb7000 rw-s 4defb000 00:0f 4011       /dev/mmz_userdev
b6fb7000-b6fb8000 rw-s 4defa000 00:0f 4011       /dev/mmz_userdev
b6fb8000-b6fbf000 rw-p 00000000 00:00 0 
b6fbf000-b6fc0000 r--p 0001f000 00:02 25         /lib/ld-2.24.so
b6fc0000-b6fc1000 rw-p 00020000 00:02 25         /lib/ld-2.24.so
beef0000-bef55000 rw-p 00000000 00:00 0          [stack]
befd6000-befd7000 r-xp 00000000 00:00 0          [sigpage]
befd7000-befd8000 r--p 00000000 00:00 0          [vvar]
befd8000-befd9000 r-xp 00000000 00:00 0          [vdso]
ffff0000-ffff1000 r-xp 00000000 00:00 0          [vectors]
# 
# cat mem 
cat: read error: Input/output error
# 
# cat mountinfo 
1 1 0:2 / / rw - rootfs rootfs rw,size=218032k,nr_inodes=54508
12 1 0:5 / /proc rw,relatime - proc proc rw
13 1 0:13 / /sys rw,relatime - sysfs sysfs rw
14 1 0:14 / /home rw,relatime - ramfs ramfs rw
15 1 0:15 / /dev rw,relatime - tmpfs udev rw
16 15 0:16 / /dev/pts rw,relatime - devpts devpts rw,mode=600,ptmxmode=000
17 1 259:1 / /dav rw,relatime - ext4 /dev/part/app0blk rw,data=ordered
18 1 259:3 / /davinci rw,relatime - ext4 /dev/part/cfg0blk rw,data=ordered
19 1 259:4 / /config rw,relatime - ext4 /dev/part/cfg1blk rw,data=ordered
20 1 259:13 / /model rw,relatime - ext4 /dev/part/model rw,data=ordered
21 1 259:5 / /syslog rw,relatime - ext4 /dev/part/syslog rw,data=ordered
22 12 0:12 / /proc/bus/usb rw,relatime - usbfs none rw
23 13 0:17 / /sys/fs/cgroup rw,relatime - cgroup cgroup rw,cpuset,cpu,memory,devices,clone_children
24 1 0:18 / /run/lxcfs/controllers rw,relatime - tmpfs tmpfs rw,size=100k,mode=700
25 24 0:17 / /run/lxcfs/controllers/cpuset,cpu,memory,devices rw,relatime - cgroup cpuset,cpu,memory,devices rw,cpuset,cpu,memory,devices,clone_children
26 1 0:19 / /var/lib/lxcfs rw,nosuid,nodev,relatime - fuse.lxcfs lxcfs rw,user_id=0,group_id=0,allow_other
27 1 259:13 / /heop rw,relatime - ext4 /dev/part/model rw,data=ordered
28 1 259:5 / /mnt/emmc_syslog rw,relatime - ext4 /dev/part/syslog rw,data=ordered
29 1 259:16 / /mnt/nfs0 rw,relatime - ext4 /dev/part/store rw,data=ordered
30 15 0:11 / /dev/mqueue rw,relatime - mqueue none rw
# 
# cat mountstats 
device rootfs mounted on / with fstype rootfs
device proc mounted on /proc with fstype proc
device sysfs mounted on /sys with fstype sysfs
device ramfs mounted on /home with fstype ramfs
device udev mounted on /dev with fstype tmpfs
device devpts mounted on /dev/pts with fstype devpts
device /dev/part/app0blk mounted on /dav with fstype ext4
device /dev/part/cfg0blk mounted on /davinci with fstype ext4
device /dev/part/cfg1blk mounted on /config with fstype ext4
device /dev/part/model mounted on /model with fstype ext4
device /dev/part/syslog mounted on /syslog with fstype ext4
device none mounted on /proc/bus/usb with fstype usbfs
device cgroup mounted on /sys/fs/cgroup with fstype cgroup
device tmpfs mounted on /run/lxcfs/controllers with fstype tmpfs
device cpuset,cpu,memory,devices mounted on /run/lxcfs/controllers/cpuset,cpu,memory,devices with fstype cgroup
device lxcfs mounted on /var/lib/lxcfs with fstype fuse.lxcfs
device /dev/part/model mounted on /heop with fstype ext4
device /dev/part/syslog mounted on /mnt/emmc_syslog with fstype ext4
device /dev/part/store mounted on /mnt/nfs0 with fstype ext4
device none mounted on /dev/mqueue with fstype mqueue
# 
# cd net/
# ls -lh
-r--r--r--    1 admin    root           0 May 18 00:58 anycast6
-r--r--r--    1 admin    root           0 May 18 00:58 arp
-r--r-----    1 admin    root           0 May 18 00:58 arp_tables_matches
-r--r-----    1 admin    root           0 May 18 00:58 arp_tables_names
-r--r-----    1 admin    root           0 May 18 00:58 arp_tables_targets
-r--r--r--    1 admin    root           0 May 18 00:58 dev
-r--r--r--    1 admin    root           0 May 18 00:58 dev_mcast
dr-xr-xr-x    2 admin    root           0 May 18 00:58 dev_snmp6
-r--r--r--    1 admin    root           0 May 18 00:58 fib_trie
-r--r--r--    1 admin    root           0 May 18 00:58 fib_triestat
-r--r--r--    1 admin    root           0 May 18 00:58 icmp
-r--r--r--    1 admin    root           0 May 18 00:58 icmp6
-r--r--r--    1 admin    root           0 May 18 00:58 if_inet6
-r--r--r--    1 admin    root           0 May 18 00:58 igmp
-r--r--r--    1 admin    root           0 May 18 00:58 igmp6
-r--r--r--    1 admin    root           0 May 18 00:58 ip6_flowlabel
-r--r-----    1 admin    root           0 May 18 00:58 ip6_tables_matches
-r--r-----    1 admin    root           0 May 18 00:58 ip6_tables_names
-r--r-----    1 admin    root           0 May 18 00:58 ip6_tables_targets
-r--r--r--    1 admin    root           0 May 18 00:58 ip_mr_cache
-r--r--r--    1 admin    root           0 May 18 00:58 ip_mr_vif
-r--r-----    1 admin    root           0 May 18 00:58 ip_tables_matches
-r--r-----    1 admin    root           0 May 18 00:58 ip_tables_names
-r--r-----    1 admin    root           0 May 18 00:58 ip_tables_targets
-r--r--r--    1 admin    root           0 May 18 00:58 ipv6_route
-r--r--r--    1 admin    root           0 May 18 00:58 mcfilter
-r--r--r--    1 admin    root           0 May 18 00:58 mcfilter6
dr-xr-xr-x    2 admin    root           0 May 18 00:58 netfilter
-r--r--r--    1 admin    root           0 May 18 00:58 netlink
-r--r--r--    1 admin    root           0 May 18 00:58 netstat
-r--r-----    1 admin    root           0 May 18 00:58 nf_conntrack
-r--r-----    1 admin    root           0 May 18 00:58 nf_conntrack_expect
dr-xr-xr-x    2 admin    root           0 May 18 00:58 nfsfs
-r--r--r--    1 admin    root           0 May 18 00:58 packet
-r--r--r--    1 admin    root           0 May 18 00:58 pppoe
-r--r--r--    1 admin    root           0 May 18 00:58 protocols
-r--r--r--    1 admin    root           0 May 18 00:58 psched
-r--r--r--    1 admin    root           0 May 18 00:58 ptype
-r--r--r--    1 admin    root           0 May 18 00:58 raw
-r--r--r--    1 admin    root           0 May 18 00:58 raw6
-r--r--r--    1 admin    root           0 May 18 00:58 route
dr-xr-xr-x    6 admin    root           0 May 18 00:58 rpc
-r--r--r--    1 admin    root           0 May 18 00:58 rt6_stats
-r--r--r--    1 admin    root           0 May 18 00:58 rt_acct
-r--r--r--    1 admin    root           0 May 18 00:58 rt_cache
-r--r--r--    1 admin    root           0 May 18 00:58 snmp
-r--r--r--    1 admin    root           0 May 18 00:58 snmp6
-r--r--r--    1 admin    root           0 May 18 00:58 sockstat
-r--r--r--    1 admin    root           0 May 18 00:58 sockstat6
-r--r--r--    1 admin    root           0 May 18 00:58 softnet_stat
dr-xr-xr-x    2 admin    root           0 May 18 00:58 stat
-r--r--r--    1 admin    root           0 May 18 00:58 tcp
-r--r--r--    1 admin    root           0 May 18 00:58 tcp6
-r--r--r--    1 admin    root           0 May 18 00:58 udp
-r--r--r--    1 admin    root           0 May 18 00:58 udp6
-r--r--r--    1 admin    root           0 May 18 00:58 udplite
-r--r--r--    1 admin    root           0 May 18 00:58 udplite6
-r--r--r--    1 admin    root           0 May 18 00:58 unix
dr-xr-xr-x    2 admin    root           0 May 18 00:58 vlan
-r--r--r--    1 admin    root           0 May 18 00:58 wireless
# 
# 中间省略一些,注意那个smaps慎查,太多了......
# 
# cat status 
Name:	hikflow_demo_h7
Umask:	0022
State:	S (sleeping)
Tgid:	6231
Ngid:	0
Pid:	6231
PPid:	5734
TracerPid:	0
Uid:	0	0	0	0
Gid:	0	0	0	0
FDSize:	32
Groups:	0 
NStgid:	6231
NSpid:	6231
NSpgid:	6231
NSsid:	5734
VmPeak:	  143460 kB
VmSize:	  142436 kB
VmLck:	       0 kB
VmPin:	       0 kB
VmHWM:	   12396 kB
VmRSS:	    4224 kB
RssAnon:	    1164 kB
RssFile:	     960 kB
RssShmem:	    2100 kB
VmData:	   48748 kB
VmStk:	     404 kB
VmExe:	    1968 kB
VmLib:	    3240 kB
VmPTE:	     114 kB
VmPMD:	       0 kB
VmSwap:	       0 kB
Threads:	9
SigQ:	0/3406
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	0000000000001000
SigCgt:	0000000180004482
CapInh:	0000000000000000
CapPrm:	0000003fffffffff
CapEff:	0000003fffffffff
CapBnd:	0000003fffffffff
CapAmb:	0000000000000000
Cpus_allowed:	3
Cpus_allowed_list:	0-1
Mems_allowed:	1
Mems_allowed_list:	0
voluntary_ctxt_switches:	11
nonvoluntary_ctxt_switches:	585
# 
# 省略一些
#
# cd task/
# ls -lh
dr-xr-xr-x    6 admin    root           0 May 18 01:06 6231
dr-xr-xr-x    6 admin    root           0 May 18 01:06 6233
dr-xr-xr-x    6 admin    root           0 May 18 01:06 6236
dr-xr-xr-x    6 admin    root           0 May 18 01:06 6238
dr-xr-xr-x    6 admin    root           0 May 18 01:06 6240
dr-xr-xr-x    6 admin    root           0 May 18 01:06 6242
dr-xr-xr-x    6 admin    root           0 May 18 01:06 6243
dr-xr-xr-x    6 admin    root           0 May 18 01:06 6244
dr-xr-xr-x    6 admin    root           0 May 18 01:06 6245
# 

xshell半路把我hikflow进程给关了,害我又得重新弄一道,不过后面貌似也没啥了,,,

注意上面那个task里面,又有很多子任务,每个点进去,都有各自的信息。。。

20230222 超简单的用法

这个用法其实很简单,就是先看看进程的pid,然后执行ll /proc/pid,就能看到进程的信息了

在这里插入图片描述
在这里插入图片描述

20230222 ll /proc/pid各行信息简单解释

dr-x------ 2 user user 0 Jan 1 00:00 cwd -> /path/to/current/working/directory

这一行显示了当前进程的当前工作目录(cwd),它是进程正在执行时的默认工作目录。"dr-x------"表示该目录的权限,"user user"表示该目录的所有者和组,"Jan 1 00:00"表示最后修改时间,"/path/to/current/working/directory"表示当前工作目录的路径。

lrwxrwxrwx 1 user user 0 Jan 1 00:00 root -> /

这一行显示了当前进程的根目录(root),它是所有其他目录的基础目录。"lrwxrwxrwx"表示该目录是一个符号链接,"user user"表示该目录的所有者和组,"Jan 1 00:00"表示最后修改时间,"/"表示根目录的路径。

-r-------- 1 user user 0 Jan 1 00:00 exe -> /path/to/executable/file

这一行显示了当前进程正在执行的可执行文件(exe)的路径。"r--------"表示该文件的权限,"user user"表示该文件的所有者和组,"Jan 1 00:00"表示最后修改时间,"/path/to/executable/file"表示可执行文件的路径。

-r-------- 1 user user 0 Jan 1 00:00 maps

这一行显示了当前进程的内存映射(maps)。该文件包含了进程虚拟内存空间中的所有映射。"r--------"表示该文件的权限,"user user"表示该文件的所有者和组,"Jan 1 00:00"表示最后修改时间。

-r-------- 1 user user 0 Jan 1 00:00 mem

这一行显示了当前进程的内存(mem)信息。该文件包含了进程的物理内存内容。"r--------"表示该文件的权限,"user user"表示该文件的所有者和组,"Jan 1 00:00"表示最后修改时间。

-r-------- 1 user user 0 Jan 1 00:00 status

这一行显示了当前进程的状态(status)。该文件包含了一些关于进程的信息,如进程ID、父进程ID、CPU使用情况等。"r--------"表示该文件的权限,"user user"表示该文件的所有者和组,"Jan 1 00:00"表示最后修改时间。

其他不懂的请单独查询

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐