diff --git a/.monitoring.sh.swp b/.monitoring.sh.swp index ed7588f..8b0b727 100644 Binary files a/.monitoring.sh.swp and b/.monitoring.sh.swp differ diff --git a/monitoring.sh b/monitoring.sh index d2a5963..618a9f3 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 16:49:37 by gbaconni ### lausanne.ch # +# Updated: 2021/11/04 16:52:32 by gbaconni ### lausanne.ch # # # # **************************************************************************** # @@ -51,7 +51,7 @@ ft_lvmused () ft_tcpcon () { - echo "#Connexions TCP : "$(netstat -an | grep '^tcp' | grep -o ESTABLISHED | uniq -c | awk '{ print $1, $2 }') + netstat -an | awk '/^tcp/ { if(/ESTABLISHED/) count++; } END { printf "#Connexions TCP : %d ESTABLISHED\n", count; }' } ft_update ()