Skip to content

phyjswang/CpuMemMonitor.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CpuMemMonitor.jl

A simple package to monitor cpu and memory usage of a job with a given PID. Currently it only supports linux system.

Installation

] add CpuMemMonitor

Usage

Using the following function, two files, named $fn.cpu and $fn.mem will be used to save cpu and mem info, respectively.

The info will be recorded every interval seconds for iterations times, and wait for another outer_interval seconds to repeat.

This process will end if the corresponding pid does not exist.

function start_monitor(
    pid::Int64,
    fn::String; # file name for saving info
    iterations::Int64 = 8,
    interval::Int64 = 1,
    outer_interval::Int64 = 3600
)

Note the pid for the current job can be obtained using getpid() in julia.

About

Monitoring CPU and MEMORY usage made easy.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages