Code Monkey home page Code Monkey logo

cpu-memory-recorder's Introduction

Linux CPU-Memory Recorder

This is for recording CPU and memory usage in linux server. This program records CPU and memory usage at interval of some second(default 3s). And output file will be generated in current folder, the file name is 'cpu-mem.csv'. If you want to change output file name or path, you can change by option(-o).

The Output shcema is csv, Please refer to below

date(MM-DD-hh-mm-ss),cpu-usage,memory-usage
  • example
11:03:14:59:10,1.07,38.91

Above real data is align with below schema

Data CPU Usage Memory Usage
11:03:14:59:10 1.07% 38.91%

How to use

Start

default output file path is ./cpu-mem.csv, and default interval of recording is 3s

./cpu_memory_recorder.sh

Option

There are two options. The One is output file path, the other is interval of recording.

./cpu_memory_recorder.sh -o {file-path} -i {interval}
option describe example
-o change output file path ./cpu_memory_recorder.sh -o /tmp/resource-record.csv
-i change interval of recording ./cpu_memory_recorder.sh -i 10 (10s record)

You can use help option(-h). It provide how to use this program

./cpu_memory_recorder.sh -h

Usage: ./cpu_memory_recorder.sh -o ./cpu-mem.csv | -i 10
        -o Output file path.                   ex) -o ./cpu-mem.csv
        -i Recording interval time(second).    ex) -i 10
Output Data format is csv please check below
------------------------------------------------
DATE           | CPU USAGE     | MEMORY USAGE  |
11:03:14:59:10 , 1.07          , 38.91         |
------------------------------------------------

Note!

When the program starts, program Automatically try to remove output-file.

cpu-memory-recorder's People

Contributors

gyu-young-park avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.