GithubHelp home page GithubHelp logo

linarcx / iproc Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 26 KB

A cross-platform utility (linux, windows for now) that help you gather information (cpu_usage, memory_usage, ...) from a particular process.

License: GNU General Public License v3.0

Vim Script 13.46% C 82.80% Makefile 3.74%
process monitoring-tool c proc cpu-monitoring memory

iproc's Introduction

iproc

A utility that help you gather information (cpu_usage, memory_usage, ...) from a particular process.

Usage

You'll see something like this:

↳ iproc -p 25933 -r 4
[2]
        Mem: 8524 Kb
        Cpu: 0.1%
[4]
        Mem: 1524 Kb
        Cpu: 1.4%
[6]
        Mem: 4523 Kb
        Cpu: 0.0%
[8]
        Mem: 4220 Kb
        Cpu: 2.3%

To see full range of options, use -h:

Options:
        -p,--process-id     The process-id to watch
        -i,--interval       The period of time to do unlimited calculations.(default = 2)
        -o,--one-shot       Just calculate once
        -r,--repetition     The number of repetitions
        -h,--help           Show this help message

Build

Linux

First make sure you have these tools on your machine:

  • make
  • clang or gcc or any other c-compiler that you prefre.

Then: cd linux; make; ./release/iproc -p <PID>

Windows

You have three options:

  1. Open solution file that resides here: .\windows\visual_studio\iproc.sln and build the project through IDE.

  2. Build from command-line via cl.exe.

    2.1. Open visual studio command prompt.

    2.3. Change to .\iproc\windows direcotry.

    2.4. cl.exe ..\core\iproc.c .\windows.c

    Tip: If you don't have visual-studio command prompt or prefer to stay in your current pwsh, you can prepare cl.exe via this command:

    Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"

  3. Or you can use mingw(that contains gcc), or clang or any other c-compiler that you prefer.

Todo

  • Cpu usage in linux isn't correct.
  • Memory usage in windows isn't correct.

License

License

iproc's People

Contributors

linarcx avatar

Stargazers

 avatar

Watchers

 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.