Transférer les fichiers vers 'mate'

This commit is contained in:
wilou 2023-02-25 17:46:01 +00:00
parent 18d5b7eac3
commit 7e14c92901
3 changed files with 25 additions and 0 deletions

8
mate/cpu.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
# This script monitors CPU usage
# Get the current usage of CPU
cpuUsage=$(top -bn1 | awk '/Cpu/ { print $2}')
# Print the usage
echo "CPU: $cpuUsage%"

9
mate/monitor.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
# This script monitors CPU and memory usage
# Get the current usage of CPU and memory
cpuUsage=$(top -bn1 | awk '/Cpu/ { print $2}')
memUsage=$(free -m | awk '/Mem/{print $3}')
# Print the usage
echo "CPU : $cpuUsage% - RAM : $memUsage MB"

8
mate/ram.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
# This script monitors memory usage
# Get the current usage of memory
memUsage=$(free -m | awk '/Mem/{print $3}')
# Print the usage
echo "RAM: $memUsage MB"