How to retrieve Process status (on a Linux vm), having the program name
and some parameter. I saw that you should be able to do that when you know the PID, but I need
to do it from a name and parameter.
On Unix, the PID is what’s used as the unique identifier for each process. Starting from that, you can get information about the process.
Linux systems have a /proc filesystem that contains information about processes. A directory listing for /proc will show many directories named by numbers, and each is a PID. Within those directories there are files with various information available, including
/proc/<PID>/comm – the name of the command
and /proc/<PID>/cmdline – the command line, including arguments
You can search through those to find which PID has the command name/arguments you are interested in.