Currently, I am working on a small project and I would much appreciate it if someone could tell me how can I get the process's info before it dies? Assuming I have its PID. At the end of the day, I want to know it's estimated time... Also is there any possible way to get Google Chrome Tabs precise PIDS? (I mean, getting all of it isn't hard but which one is which?) Side note: I used psutil in python for getting (user's all processes)... I have not much experience in Linux
how can I get the process's info before it dies?
'ps' is the tool for a "snapshot".
top for a live table. Both have complex man pages. I like
ps axf which gives a tree structure.
get Google Chrome Tabs precise PIDS?
The other way round like this you mean? (part (branch) of
ps axf output)
\_ /usr/lib/firefox/firefox -contentproc -childID 2 ...
\_ /usr/lib/firefox/firefox -contentproc -childID 3 ...
\_ /usr/lib/firefox/firefox -contentproc -childID 10 ...
\_ /usr/lib/firefox/firefox -contentproc -childID 16 ...
\_ /usr/lib/firefox/firefox -contentproc -childID 17 ...
We only see these
childID. There is no easy way of telling which tab content belongs to which -- unless you keep track yourself by comparing
ps output before and after opening a browser tab.
These are just technical data. Sometimes very useful. But not meant for user interaction.
If you have a system for experiments in your project, go ahead and send some signals to the pids (not shown) from the command line. But be prepared for the worst - beginning with loosing your bookmarks etc.