Skip to content

Monitoring Application for progress of multiple processes using dbus.

License

Notifications You must be signed in to change notification settings

Atreyagaurav/dmon

Repository files navigation

UNDER DEVELOPMENT

This program is still in its early phases. Help if appreciated if you somehow landed here and can help.

Introduction

Dmon (made to sound like daemon/demon) is a monitoring application. It’s supposed to monitor the progress of work across various different processes, independent of whether they are running through a same program or not.

Each process can register they are working, and notify of their progresses through a unique group-id (string). When they register with a group id they are part of, they get a numerical process id, which they’ll use along with the group id to report their process. And at the end of their process, they can report they are done. Or in case of failure they can report their failure.

A daemon will keep receiving those reports and save their states.

Other tools could be made which can monitor which groups have active processes and show their progress, TUI or GUI. They can ask the information from the daemon and visualize it.

Some research into it made me think going through dbus is the best choice, I’ve considered unix sockets, pipes or a internal port for communication. The prototype was made by just writing to files in a common location where the monitoring app would only read and individual processes would only write.

Hopefully I’ll learn enough to complete this.

Individual programs

Main Daemon

It’ll run in the background and collect all the reports from dbus, it needs to be able to provide the collected information through dbus as well.

For processes that are interrupted or failed without sending failure report. I might have to setup a maximum time to wait, or a command to terminate monitoring certain group/process. Might be better to get process PID as well and check if it’s no longer running.

Reporter

This should be able to add new processes in group, as well as report their progress and their success failures. And probably as a python library as well as C library.

Visualizer

This one will ask the daemon for which groups are active, or visualize just one group. It might be a good idea to make python library for this one too.

Or maybe it all can be made in a single library/executable. Including the daemon.

It uses a program I made (c_progress) for printing the multiple bars to the terminal.

Milestones

Version 0.1

First version should be able to do the followings:

  • [X] Get progress from other processes,
  • [X] Visualize progress with multiple bars,
  • [ ] some way for the visualizer to know the processes are done. (low priority)

    Here is a demo for version 0.1, it’s glitchy but the communication from dbus was successful.

    ./examples/dmon-demo.gif

Version 0.2

  • Removal of completed process bars
  • Communication of process completion
  • Dynamically add new processes from dbus
  • Register processes with group & label to get their id (low priority)

About

Monitoring Application for progress of multiple processes using dbus.

Resources

License

Stars

Watchers

Forks

Packages

No packages published