Display Running Processes

Hi All,

Could someone please explain how I can display running processes on the frontend? I currently have glances and mosquitto running and would like to show if they are running or stopped?

Many Thanks

Mike

How about System Monitor and process?

Cheer’s buddy. This looks like it could work but how could i show a process for a specific process like glances?? I can’t quite work it out.

Thanks

eg.

sensor:
  - platform: systemmonitor
    resources:
      - type: process
        arg: glances
1 Like

Sweet cheers mate I shall try that now. is there an obvious place I can find the names of the processes running?

Thanks

Process manager, ps, top, …

Awesome thanks mate, I am still learning :slight_smile: that’s working great.

Just another quick one on the same subject is there a way to change it from saying “on” to “running”

Thanks

Yes, use a template sensor.

Thanks mate, I have had a read and I cant work it out at all. This is going way beyond my knowledge so far.

Is there a simple example that I could see somewhere? I have searched the forum and can’t find anything
Thanks

The forum is full of samples for template sensors (eg. 1, 2, 3,…)

This thread contains the solution you were looking for. Never mind, it’s now in the template sensor docs too. You could also consider to use a Binary template sensor as the process is running or not.

That’s awesome thankd alot mate that explains it perfectly!

Hello mate,

I need to revisit this please. at the weekend I had to make a fresh install on my pi for one reason or another and I currently don’t have glances installed on it but I have notice by using the template below from the doc it is still showing it is running when it doesn’t even exist? Is there something I have done wrong or missed off? I would imagine it’s the same with Mosquitto.

Thanks

 - platform: template
   sensors:
     glances:
       value_template: '{% if is_state("sensor.process_glances", "off") %}Not Running{% else %}Running{% endif %}'
       friendly_name: 'Glances'
       
 - platform: template
   sensors:
     mosquitto:
       value_template: '{% if is_state("sensor.process_mosquitto", "off") %}Not Running{% else %}Running{% endif %}'
       friendly_name: 'Mosquitto'

You are only checking for the “off” state, else it assumes it’s running. I’d guess that the check is returning with something like “process not found” but it will show as “running” anyway because of the logic used.

Hello, I did setup the System Monitor and I can see % memory usage etc.
Is it possible to see all running addons, services and its usage of memory, cpu, … without enabling the sensor of it in every single addon, …?
Just like the task manager in windows.
Thanks

1 Like