-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d8e7800
commit 3dc694e
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# monitoreng | ||
The script records the CPU, RAM, and Swap usage of the device at specified intervals and stores the maximum and minimum data accessed during its runtime. Additionally, it generates logs when predetermined thresholds are exceeded. | ||
|
||
# Usage | ||
``` bash | ||
chmod +x monitoreng.sh | ||
./monitoreng.sh | ||
``` | ||
Program produces output on /opt/monitoreng | ||
|
||
``` bash | ||
ls /opt/monitoreng | ||
max-min-values.txt values.txt | ||
``` | ||
|
||
``` bash | ||
cat /opt/monitoreng/max-min-values | ||
Max-CPU-Value: 7% | ||
Min-CPU-Value: 0% | ||
Max-RAM-Value: 12% | ||
Min-RAM-Value: 10% | ||
Max-Swap-Value: 0% | ||
Min-Swap-Value: 0% | ||
``` | ||
|
||
```bash | ||
cat /opt/monitoreng/values | ||
Date: 2023-11-10_01-04-50 | ||
CPU Usage: 7% | ||
RAM Usage: 12% | ||
Swap Usage: 0% | ||
--- | ||
Date: 2023-11-10_01-04-54 | ||
CPU Usage: 3% | ||
RAM Usage: 12% | ||
Swap Usage: 0% | ||
--- | ||
Date: 2023-11-10_01-04-57 | ||
CPU Usage: 2% | ||
RAM Usage: 12% | ||
Swap Usage: 0% | ||
--- | ||
Date: 2023-11-10_01-05-00 | ||
CPU Usage: 1% | ||
RAM Usage: 12% | ||
Swap Usage: 0% | ||
--- | ||
Date: 2023-11-10_01-05-03 | ||
CPU Usage: 3% | ||
RAM Usage: 12% | ||
Swap Usage: 0% | ||
--- | ||
|
||
``` | ||
|