Skip to content

simple python wrapper script that monitors system resources used by a program

Notifications You must be signed in to change notification settings

mhagdorn/monapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

monapp

The monapp python module can be used to monitor memory and CPU usage of a process.

You can instantiate a monitor using

monitor = monapp.getMonitor(pid,output)

where pid is the PID of the process to be monitored and output the name of the output file. If the PID is not specified the PID of the current process is used. No data is written if the output file is not specified.

Once a monitor is instantiated you can get the current resource usage

resources = monitor.current()

or the peak usage Once a monitor is instantiated you can get the current resource usage

resources = monitor.peak()

where the dictionary resources contains the percentage CPU and memory usage.

You can specify additional output files using

resources = monitor.output(fname)

The package also includes two programs. Use

  • monapp 'some command' to monitor launch and monitor an application
  • plotMonapp to plot the output

About

simple python wrapper script that monitors system resources used by a program

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages