& Nbsp; If a process is viewed in Linux, it is suspected that it has a problem, just like checking information about the process, such as the owner of the process, the files being executed, and the current directory, how can this problem be found? 1. view the started command line catenviron in the/proc/pid directory according to the process number to view the current
In Linux, if you see a process and suspect it has a problem, it is like checking information about the process, such as the owner of the process, the files being executed, and the current directory. how can you check it?
1. check the directory/proc/pid according to the process number.
Cat cmdline
Cat environ: view the current environment, including pwd loginname and other information.
2. if you run commands from a common user su to the root user, you can view the parent process id of the corresponding process in ps-p pid-o pid, ppid, and comm, find the pid of the process corresponding to the su command. when you view the environment information of the command, you will know from which common user su to root.