Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alshdavid/procmon
Who's that pokemon?
https://github.com/alshdavid/procmon
Last synced: 26 days ago
JSON representation
Who's that pokemon?
- Host: GitHub
- URL: https://github.com/alshdavid/procmon
- Owner: alshdavid
- Created: 2023-11-23T05:17:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-11T05:13:41.000Z (9 months ago)
- Last Synced: 2024-11-24T19:19:13.296Z (about 1 month ago)
- Language: Rust
- Size: 81.1 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Process Monitor
A command line utility that spawns a process and produces a `csv` report on its resource usage.
```bash
procmon --help
procmon -- [COMMAND]
``````bash
procmon -- node -e "setTimeout(() => console.log('Sup'), 4000)"
```This will produce a file named something similar to `report.csv`
```bash
procmon --report something -- node -e "setTimeout(() => console.log('Sup'), 4000)"
```This will produce a folder containing the report
```
/something
report.csv
report.png
```The csv file looks like:
```
time_s,cpu,memory_mb,disk_read,disk_write
0.000,0,0,0,0
0.065,0,16,5976064,0
0.567,0,37,16556032,0
1.068,0,37,0,0
1.569,0,37,0,0
2.069,0,37,0,0
2.570,0,37,0,0
3.070,0,37,0,0
3.571,0,37,0,0
4.073,0,37,0,0
4.145,0,0,0,0
```The png looks like:
# Installation
## MacOS
```bash
mkdir -p $HOME/.local/procmon
curl -L --url https://github.com/alshdavid/procmon/releases/latest/download/macos-arm64.tar.gz | tar -xvzf - -C $HOME/.local/procmon
echo "\nexport \PATH=\$PATH:\$HOME/.local/procmon\n" >> $HOME/.zshrc
source $HOME/.zshrc
```#### Updating
```bash
rm -rf $HOME/.local/procmon
mkdir -p $HOME/.local/procmon
curl -L --url https://github.com/alshdavid/procmon/releases/latest/download/macos-arm64.tar.gz | tar -xvzf - -C $HOME/.local/procmon
```## Linux
```bash
mkdir -p $HOME/.local/procmon
curl -L --url https://github.com/alshdavid/procmon/releases/latest/download/linux-amd64.tar.gz | tar -xvzf - -C $HOME/.local/procmon
echo "\nexport \PATH=\$PATH:\$HOME/.local/procmon\n" >> $HOME/.zshrc
source $HOME/.zshrc
```#### Updating
```bash
rm -rf $HOME/.local/procmon
mkdir -p $HOME/.local/procmon
curl -L --url https://github.com/alshdavid/procmon/releases/latest/download/linux-amd64.tar.gz | tar -xvzf - -C $HOME/.local/procmon
```## Windows
I'm not good at PowerShell - follow the same steps as the Linux/MacOS scripts
## Credit
[Matt Jones](https://github.com/mattcompiles)
[David Alsh](https://github.com/alshdavid)