I'd like to read the process metadata for a process that has already exited.
Say I ran a command some-bash-command and it exited. A few hours later, in another shell, I'd like to get the metadata for this process, given I have its PID.
I'd like to be able to inspect:
- The start time
- The user who started it
- When it exited, and thereby the total runtime
- The folder it was executed in? (This isn't fully necessary).
If possible, could someone point me to resources where I can learn more about this? I'd like to solve this by using built-in commands, or by reading directly from "somewhere" (I'm not sure where? /proc?)
I see that an exited process isn't listed in /proc/$PID, so is there no possibility of getting that processes metadata?