diff --git a/.monitoring.sh.swp b/.monitoring.sh.swp index 25018cb..9771cc9 100644 Binary files a/.monitoring.sh.swp and b/.monitoring.sh.swp differ diff --git a/monitoring.sh b/monitoring.sh index bb3ca1d..1a43172 100755 --- a/monitoring.sh +++ b/monitoring.sh @@ -6,7 +6,7 @@ # By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2021/11/04 12:36:53 by gbaconni #+# #+# # -# Updated: 2021/11/04 18:21:35 by gbaconni ### lausanne.ch # +# Updated: 2021/11/04 18:23:28 by gbaconni ### lausanne.ch # # # # **************************************************************************** # @@ -31,12 +31,12 @@ ft_memory () ft_disk () { df --total -Bm -T -l -x tmpfs -x devtmpfs \ - | awk '/^total/ { total=int($3); used=int($4); pcent=int($6) } END { printf "#Disk Usage: %d/%dGb (%.2f%%)\n", used, total / 1000, pcent; }' + | awk '/^total/ { total=int($3); used=int($4); pcent=int($6) } END { printf "#Disk Usage: %d/%dGb (%.0f%%)\n", used, total / 1000, pcent; }' } ft_load () { - top -b -n 1 | awk '/^%Cpu/ { usage=$2+$4; } END {printf "#CPU load: %d%%\n", usage; }' + top -b -n 1 | awk '/^%Cpu/ { usage=$2+$4; } END {printf "#CPU load: %.1f%%\n", usage; }' } ft_lastboot ()