0

Is there a way to get a list of all running processes that will auto update when new processes start running or remove themselves if they have stopped running?

Example:

ps gives me a list of processes running right now, but I want it to auto update, without me having to type anything else, if a new process starts running.

2
  • You do realize that on a lightly-loaded VM I'm seeing anywhere from 15 to 25 new processes created every minute. Real-time notification of process creations and deletions will flood your application.
    – doneal24
    Commented Apr 3, 2023 at 17:59
  • This was just a 1 time thing that I needed to look for. Commented Apr 3, 2023 at 18:23

2 Answers 2

3

Yes, tools such as top or htop show a continuously-updating list of processes (and other system information, such as overall load, available memory…).

If you only want to see your own processes, you can filter by user:

top -u "$(whoami)"

More filters are available once the commands are running; for example, to only see processes named “process a” in top, press o, then enter

COMMAND=process a
5
2

Simply try watch:

watch -n1 'ps auxw'

There's more sophisticated tools like

  • htop
  • top
  • glances
2
  • "TTY could not be found" when I use "ps top", can you give an example please? Commented Apr 3, 2023 at 16:33
  • 2
    @ChickenSandwichNoPickles top is a utility, just type top and press Enter.
    – Kusalananda
    Commented Apr 3, 2023 at 16:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .