I would appreciate it if you could take a look at the details here.
Read all the contents of proc / [pid] Read all the contents of proc / [pid] ~ from attr to cpuset ~ Read all the contents of proc / [pid] ~ from cwd to loginuid ~ Read all the contents of proc / [pid] ~ from oom_adj to sessionid ~ Wrong, you can find more information here, that directory is no longer in use, I would appreciate it if you could comment if you have any information.
# sleep 365d > /dev/null &  3792 # ls /proc/3792 attr cwd map_files oom_adj schedstat task autogroup environ maps oom_score sessionid timers auxv exe mem oom_score_adj setgroups uid_map cgroup fd mountinfo pagemap smaps wchan clear_refs fdinfo mounts patch_state stack cmdline gid_map mountstats personality stat comm io net projid_map statm coredump_filter limits ns root status cpuset loginuid numa_maps sched syscall # cd /proc/3792
# cat setgroups allow
It seems that the setgroups system call can be used when it is set to allow. setgroups will return a list of auxiliary groups. What is that? Believe it will be useful someday and remember.
cat smaps 00400000-00406000 r-xp 00000000 08:01 16801948 /usr/bin/sleep Size: 24 kB Rss: 0 kB Pss: 0 kB Shared_Clean: 0 kB Shared_Dirty: 0 kB Private_Clean: 0 kB Private_Dirty: 0 kB Referenced: 0 kB Anonymous: 0 kB AnonHugePages: 0 kB Swap: 0 kB KernelPageSize: 4 kB MMUPageSize: 4 kB Locked: 0 kB VmFlags: rd ex mr mp me dw sd 00606000-00607000 r--p 00006000 08:01 16801948 /usr/bin/sleep Size: 4 kB ...
This also seems to be the information of the memory used. Memory management seems to be difficult. Which one should I look at?
# cat stack [<ffffffffaa2cb09b>] hrtimer_nanosleep+0xbb/0x180 [<ffffffffaa2cb1f6>] SyS_nanosleep+0x96/0xb0 [<ffffffffaa98dede>] system_call_fastpath+0x25/0x2a [<ffffffffffffffff>] 0xffffffffffffffff
It looks like the information on the stack in memory.
# cat stat 3792 (sleep) S 1 3792 2132 0 -1 1077944320 284 0 0 0 0 0 0 0 20 0 1 0 31848330 110546944 65 18446744073709551615 4194304 4218500 140735872847584 140735872847112 140243604047856 0 0 0 0 18446744072269639835 0 0 17 0 0 0 0 0 0 6319400 6320704 8036352 140735872850184 140735872850195 140735872850195 140735872851949 0
# cat statm 26989 65 47 6 0 78 0
It seems to be information about memory usage measured on a page-by-page basis.
# cat status Name: sleep Umask: 0022 State: S (sleeping) Tgid: 3792 Ngid: 0 Pid: 3792 PPid: 1 TracerPid: 0 Uid: 0 0 0 0 Gid: 0 0 0 0 FDSize: 256 Groups: 0 VmPeak: 107956 kB VmSize: 107956 kB ...
It seems that you can see the basic information and operating status of the process. Perhaps if you look at this much, you can get a general idea of the situation.
# cat syscall 35 0x7fff9fb54d10 0x0 0x0 0x7fff9fb54760 0x0 0x0 0x7fff9fb54d08 0x7f8d023387f0
It seems that the addresses of the system call, stack pointer, program counter, etc. that are being executed are listed.
# ll task/ total 0 dr-xr-xr-x. 7 root root 0 Jan 12 04:48 3792 # ls task/3792/ attr cpuset io net patch_state setgroups uid_map auxv cwd limits ns personality smaps wchan cgroup environ loginuid numa_maps projid_map stack children exe maps oom_adj root stat clear_refs fd mem oom_score sched statm cmdline fdinfo mountinfo oom_score_adj schedstat status comm gid_map mounts pagemap sessionid syscall
There was a similar file in the
3792 process. It seems to be the relationship between processes and threads.
It seems that you will see a list of timers that this process has.
In this environment,
cat timers didn't show anything.
This was introduced in
gid_map before, so I will omit it.
# cat wchan hrtimer_nanosleep
It's an abbreviation for wait channel. I didn't know any more information
It was hell because I had to write only if I didn't understand from the middle. My goal was to write it down for the time being, so I wrote it down in two days. When I turned it on at a later date, I was confident that I would never touch it again, so I patiently survived. I hope to add more information as soon as I can understand more information.
https://linuxjm.osdn.jp/html/LDP_man-pages/man5/proc.5.html http://man7.org/linux/man-pages/man7/user_namespaces.7.html http://man7.org/linux/man-pages/man2/setgroups.2.html