From fcb58a709fff45c2aad72305acc84d18e1b49a3b Mon Sep 17 00:00:00 2001 From: Diavolo Date: Sun, 19 Jun 2022 17:30:08 +0200 Subject: [PATCH] Readme --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index cb926b4..9646274 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,15 @@ # MonitorRam A simple program that monitors real memory usage of processes. -For example, if you have multiple processes, like numerous game servers, that all begin with the same prefix, you can type that prefix as a command-line argument. -The program will monitor up to 30 different processes. -In my case, I have a few game servers that all share "iw5" as the name prefix. -I would type `./prog iw5` to monitor the actual memory usage of all my game servers. -In my case, each process should not exceed more than 1 GiB of real memory. +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. +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 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`. If that's the case, a memory leak has occurred, and this program will send a request to terminate that process gracefully (SIGTERM). -Max memory usage is defined in monitor.c +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. ## How to? Compile from source using the provided makefile. -Execute the program like this: `./prog ` +Execute the program like this: `./monitor `