More specifically,
How can I discover what process had ran under a PID, if the process ran under a graphical session which restarted because of a crash, and then I killed it (the session)? It’s not in the session’s logs (it was COSMIC, so I ran it with RUST_BACKTRACE=1 and redirected the output to a file; nothing, other than a PID for a process that’s no longer there).
The error in the COSMIC logs was “PID 22842 does not belong to any known session”. I have reason to believe the process is a foot terminal launched by a systemd user service, which ran a script that launched the terminal(s). But I need to be sure, so I know what I’m dealing with, and I can approach it the right way.
Any help, info, or pointers would be greatly appreciated. Thank you.
There are some monitoring tools which take a snapshot of the process table every few minutes. If you happen to run one of those, and your process happens to be running when the snapshots is taken you can catch it.
If this is a postgresql server and you have logging turned up with pids being logged, and the pin in question was a database process, you can probably find it in the database logs.
journalctl lists PIDs, so it might have a corresponding executable name with it.