Search code examples
linuxredhatps

Any Linux command similar to PS but instead logs process activity?


I'm having a hard time trying to word this correctly (partially why I can't get proper Google results) so I'll explain what I'm looking for.

A while back we stumbled across an issue at work where mount.cifs would freeze. When this happened, if we used ps -ef it would list the frozen process and we discovered that user+pass was being passed as plain text. The freezing issue has since been fixed so I can't replicate this particular behaviour.

I believe I have made it so that a password won't show up as plain text anymore but I can't freeze the process to view the the ps output and confirm. Is there a command/feature in Linux (we use Redhat) that would allow me to log ps -ef output for x amount of time so that I can go back and view the log to make sure that the password isn't being shown as plain text? I do have root access if absolutely necessary.

If answering, please keep in mind I'm fairly noobish to the world of Linux.


Solution

  • Will executing ps -ef in a loop help you?

    You can do watch -n 2 ps -ef . this will run ps -ef every 2 seconds and keep showing the output on your screen which should serve the purpose you are asking for in your question.

    All the best!!