Daemon strategy

paul.hermeneutic at gmail.com paul.hermeneutic at gmail.com
Fri Feb 5 14:36:14 EST 2016


On Fri, Feb 5, 2016 at 11:52 AM, Ben Finney <ben+python at benfinney.id.au> wrote:
> paul.hermeneutic at gmail.com writes:
>
>> It appears that python-deamon would be exactly what I need. Alas,
>> appears not to run on Windows. If I am wrong about that, please tell
>> me.
>
> You're correct that ‘python-daemon’ uses Unix facilities to create a
> well-behaved Unix daemon process.
>
> Since MS Windows lacks those facilities, ‘python-daemon’ can't use them.

As you might imagine, I am not always able to specify which OS is
deployed. That does not mean that I am not responsible for getting the
work done. Perhaps you will tell me that what I want is not a daemon.

BTW, I thought that pip would know that python-daemon would not run on
my machine, but it had no complaints installing it. That gave me
unmerited hope.

I want to create a program that will run a list of command lines. Some
of the tasks might take 42 milliseconds, but others might take 4.2
hours. I need to be able to:

- list the tasks currently being run
- kill a task that is currently being run
- list the tasks that are not yet run
- delete a task not yet run from the list
- add tasks to the list

The goal is to load the machine up to a specified percentage of
CPU/memory/io bandwidth. I want to keep the machine loaded up to 90%
of capacity. It is important to monitor more than just CPU utilization
because the machine may already be over-committed on memory while CPU
utilization is low. Adding more processes in such an environment just
makes the system go slower.

I realize that high-end schedulers like IBM/Tivoli, CA7, and BMC might
do things like that. Those are not usually within budget.

Is a daemon what I need? Any other suggestions?


More information about the Python-list mailing list