Search code examples
cunixqnx

How to check if a process is running by name on Unix when there is no cmdline file inside the proc directory?


So I am running on QNX and I want to check if a process is up and running.
I saw many examples on how to do this - basically iterate over the proc directory, and over and processes inside (which are some numbers - pid) and inside this there should be a cmdfile file.

But on my controller if I list the processes using pidin and get the pid for it and search it on FTP inside the proc folder, it doesn't contain anything, its empty.

What does this mean ? How should I check if the process is running by name ?

Here is a screenshot - 15179 is the process.

enter image description here


Solution

  • Since you are using FileZilla as I can see from the screenshot. You need to login as root user to access /proc location.

    I'd recommend to SSH to the server and check the processes which are running using the ps, top or pgrep command. Using the command line provides much more options.