From e1de66edefdf03ec3d94c73340e371ea18d76273 Mon Sep 17 00:00:00 2001 From: gbaconni Date: Thu, 4 Nov 2021 16:32:27 +0100 Subject: [PATCH] 2021-11-04 16:32:27 --- .monitoring.sh.swp | Bin 12288 -> 12288 bytes monitoring.sh | 10 ++++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.monitoring.sh.swp b/.monitoring.sh.swp index 4ecc7c57291c7a1e31c0258f605e9fa6f1c8c7a4..911ddef412e6b35345a35a5a77d2a919b95efe9e 100644 GIT binary patch delta 394 zcmXZXJxfAi6bJBgeYw3rs4WEzK3t`nfn_(L)V09~hX!3T^6gP?m|E8)DM;uO$d$H= zriL1d>(EdL(Gs*2et?>snu3;~`iCC)ah`KHaL!Xt)DtY_i!Ddk;*3HFJJII%QPLRG z%;BOysbsp;Xt-~do^3+ZaM(X>BMVld3$ZsE)g7#TI6Fk-h0Y++E4;uXJU|oDV1n)d z(L1!@8qVPiPT?4uunIny1}99wC=A0dwtm3}yg>(^L~>Fak9)X-7F@w4{GWLu8iJ*3 z(W8^WaaTY5_$uFX^^#g)x>Huf>ejBtGscSiBgA77h9bx$_mrAt)m%o^%7tW&9kARE zFEj5plh@|Ffps~=DtTUHJe@Bwsm3)a#CSpD{YJ5bI;(nUpR$#WLT`f}@JK?+h%00b*r#26nJ> zB-uAJvixV69I9qD`Inm6GTZE-yMqY;5705Y diff --git a/monitoring.sh b/monitoring.sh index 1b9fae5..169bdf0 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:24:26 by gbaconni ### lausanne.ch # +# Updated: 2021/11/04 16:32:24 by gbaconni ### lausanne.ch # # # # **************************************************************************** # @@ -41,7 +41,12 @@ ft_load () ft_lastboot () { - echo "#Last boot: "$(who -a | grep -o '....-..-.. ..:..') + echo "#Last boot: "$(who -b | grep -o '....-..-.. ..:..') +} + +ft_lvmused () +{ + echo "#LVM use: "$(if vgdisplay | grep -q '[1-9]'; then echo "yes"; else echo "no"; fi) } ft_update () @@ -69,6 +74,7 @@ main () ft_disk ft_load ft_lastboot + ft_lvmused ft_update return 0 }