addon: show CPU usage + Email notifications

Hi, would this be of interest? Should i provide a PR where the CPU Usage is also in diagnostic?

Had this issue where the CPU was at 3% but the project was still on working but it actually wasn’t.
Think it was because there were pictures of a different project accidentally.

I thought of extending this with a plugin for email notification:

  • on finish
  • on error
  • on low threshold CPU usage for quite some minutes.

Also, a checkmark in diagnostic to auto-refresh every X seconds.

What do you think?

5 Likes

Hi, it’s me, I’m interested! :rofl:

I would love this, especially if it could also trigger a notification in the browser with a sound effect so I know to go to my machine and check!

Would this be platform agnostic? That’s important.

2 Likes

Yea, a text message and and email would be great to receive when the task is done.

1 Like

Great idea!

I would love the email function based on:

  • CPU
  • Storage (almost full)
1 Like

Would this be best as a Plugin?
Could not find much about that. Can you please link all relevant information?

Thank you.

1 Like

I would love to know the max ram usage for a processed dataset so I can set the right split number.

2 Likes

I think it all depends on how much detail/detected features there are in the images, so there is no general rule.

1 Like

Great idea!

I would also add a swap/pagefile indicator to see how much memory is available. Physical memory is often just part of the total available memory.

Yes, that too.
At the moment I am using a small bash script that shoes me these values. If that would be in WebODM, one step less to do when setting up and using WebODM :cowboy_hat_face:

Would have loved to write a plugin for that, just don’t find the time :smirk:

3 Likes

Me to, with a full time job and a family with two kids finding time is hard.

3 Likes

Please share as attachment or at pastebin.
We will have a look at it

2 Likes

I can’t program, so please keep that in mind, but yes, I believe a plugin might be a good approach combined with maybe integrating some of the changes.

We have our developer documentation here:
https://docs.webodm.org

We have our sample plugin source here:

2 Likes

You can find the bash script here:

But it’s a dirty little bash script of a long time sys admin :sweat_smile:
Nothing of value for a WebODM plugin, I think .
And as Saijin_Naib stated before:

And the bash script would probably still work in Docker, but Windows native … don’t think so.
That brought me to looking more towards this:

3 Likes

Also, is it possible to scope the CPU, Disk, and RAM/SWAP usage to just WebODM-spawned processes?

Maybe as the only graph, or as a darker highlight in the circle graphs to show what is just our stuff?

2 Likes

We’re working on the email notification plugin right now. The dev managed to find the signal for when a task has finished processing, but there doesn’t seem to be one for when a task has failed?

Any idea if such a signal exists, if no, do you know the main points where a task may fail to process so we can send the plugin signal?

Thank you.

1 Like

Hi everyone, just submitted a PR related to this thread, for those that are intereseted you can check it out here: Kathenae add cpu usage chart #1344

5 Likes

Welcome!

Thanks so much for the great contribution!

2 Likes

And here you can find the E-Mail Notification PR:

This pull request adds a new plugin to the application that provides email notifications for task completion, failure, and removal. The plugin can be accessed from the “Task Notification” tab on the main menu and allows users to configure the SMTP server settings and enable/disable notifications for different events.

5 Likes

Amazing contribution. Thanks a lot.
Just ran an update and it’s already integrated :cowboy_hat_face:

Would be really neat if the memory usage chart would include swap.
Just tried to include swap by simply manipulating plugin.py inside the webapp docker container, but after starting with ./webodm.sh start I only get

webapp      | WARNING Forbidden: /api/plugins/diagnostic/

Since that python script uses /proc/meminfo as its source, it is easy to also fetch some info about swap. And since now psutils is loaded, it should be a piece of cake to get that info onto that diagnostic page :unamused:

I am not much of a programmer, but following some Github PRs, it’s amazing to see how @pierotofy and the ODM team embrace contributions :partying_face:

I’ll keep tinkering :hammer_and_wrench:

2 Likes

Super! Just updated my instance. CPU usage is added and I will test the mail settings tomorrow. Thanks for this plugin!

4 Likes

Idea of Kathenae:
Advanced Info chart which will include swap.

What else would be interesting for the Advanced Info chart?
Those information are possible via psutil:
https://psutil.readthedocs.io/en/latest/
and here:

3 Likes