Processing Power In Python -


this question has answer here:

is there way monitor amount of processing power used in program in python? goal kill program if using power while connecting server in case of malicious intent.

even if psutil provides os-level information in relatively os-independent way, better indicated interact directly local os. doing @ api level can seen complex , difficult debug. if case, useful alternatives in case of windows are:

wmic process list full 

and

wmic path win32_perfformatteddata_perfproc_process name,percentprocessortime  

that's closest windows equivalent *nix's better known ps.

the suggestion is, then, "popen" them, , pipe output analysis. understanding @ least first (wmic process) supports continuous mode.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -