mirror of
https://github.com/diamante0018/MonitorRam.git
synced 2025-05-09 22:14:54 +00:00
maint: update README
This commit is contained in:
parent
2521e83c98
commit
8eae5f1360
16
README.md
16
README.md
@ -1,15 +1,17 @@
|
|||||||
# MonitorRam
|
# MonitorRam
|
||||||
A simple program that monitors real memory usage of processes.
|
A simple program that monitors real memory usage of processes.
|
||||||
For example, I have multiple processes, all of them are named similarly. In my case, I use a common prefix as a command-line argument.
|
|
||||||
|
# Example
|
||||||
|
I have multiple processes, and all of them are named similarly. In my case, all the processes I need to monitor begin with the same string.
|
||||||
The program will monitor up to 30 different processes; the max value is defined in `monitor.c`.
|
The program will monitor up to 30 different processes; the max value is defined in `monitor.c`.
|
||||||
I have a few game servers that all share "iw5" as the name prefix.
|
I would start this program using the following command: `./monitor iw5`. It will monitor all my game servers as they all share a common name on the process list.
|
||||||
I would start this program with `./monitor iw5` to monitor the memory usage of all my game servers.
|
|
||||||
In my case, each process should not exceed more than 1 GiB of real memory, again, the max value is defined in `monitor.c`.
|
In my case, each process should not exceed more than 1 GiB of real memory, again, the max value is defined in `monitor.c`.
|
||||||
If that's the case, a memory leak has occurred, and this program will send a request to terminate that process gracefully (SIGTERM).
|
If that's the case, a memory leak has occurred, and this program will send a request to terminate that process gracefully (SIGTERM).
|
||||||
SIGTERM usually works for me. I have in place a separate system to automatically restart my game servers.
|
SIGTERM usually works for me. I have in place a separate system to automatically restart my game servers.
|
||||||
I hope this program can be useful to others.
|
I hope this program can be useful to others. I wrote this alongside another script that automatically restarts my game servers.
|
||||||
|
|
||||||
## How to?
|
## How to build from source?
|
||||||
|
|
||||||
Compile from source using the provided makefile.
|
Generate the make file using the provided premake5 lua script
|
||||||
Execute the program like this: `./monitor <NAME OF PROGRAM>`
|
Usage: `./monitor <NAME OF PROGRAM>`
|
||||||
|
This program is written in C89 using some GNU extensions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user