Question

I was wondering if it is possible to detect if system is idle using psutil (https://code.google.com/p/psutil/). I want to be able to trigger something if there is no system wide activity for a few seconds. I have some *trouble using the ctypes/python wrapper method described is some other posts.

*trouble: My python setup is a bit tricky. psutil seem to work smoothly for other things in my application. So I would prefer it, if possible.

Thanks, M&M

Was it helpful?

Solution

I managed to get ctypes to work (well...without crashing python that is :-) ) and so now I am able to use this solution from SO

And thanks to FogleBird for the above solution

In the process of tackling this problem I learnt about psutil which I think can benefit those who are looking for system monitoring, profiling and limiting process resources and management of running processes. And it's cross platform...yay!

Cheers, M&M

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top