https://github.com/linarcx/iproc
A cross-platform utility (linux, windows for now) that help you gather information (cpu_usage, memory_usage, ...) from a particular process.
https://github.com/linarcx/iproc
c cpu-monitoring memory monitoring-tool proc process
Last synced: 4 months ago
JSON representation
A cross-platform utility (linux, windows for now) that help you gather information (cpu_usage, memory_usage, ...) from a particular process.
- Host: GitHub
- URL: https://github.com/linarcx/iproc
- Owner: LinArcX
- License: gpl-3.0
- Created: 2020-10-09T18:59:39.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-17T07:52:23.000Z (over 5 years ago)
- Last Synced: 2025-09-08T06:49:10.012Z (5 months ago)
- Topics: c, cpu-monitoring, memory, monitoring-tool, proc, process
- Language: C
- Homepage:
- Size: 25.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 `
## 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
