2 Commits
Author SHA1 Message Date
Alexandre Guegan 38139b1497 Ajout du script monitor.sh de guegan-a 2026-04-03 13:06:36 +02:00
guillaume.astier 116678b2d5 [README] update git 2026-04-03 10:51:51 +02:00
3 changed files with 86 additions and 683 deletions
+7
View File
@@ -56,3 +56,10 @@ Le script se rafraîchit toutes les `X` secondes.
---
# GIT
Etape 1 : modification du code source (vim)
Etape 2 : Ajout du fichier pour "versionning" (git add -A)
Etape 3 : Versionner le fichier : (git commit -m "UPDATE ..."
Etape 4 : Pousser la version sur le server : git push
-580
View File
@@ -1,580 +0,0 @@
2026-04-03 09:10:30 - OK: CPU usage 12% within threshold (80%)
2026-04-03 09:28:05 - OK: CPU usage 19% within threshold (80%)
2026-04-03 09:31:08 - OK: CPU usage 24% within threshold (80%)
2026-04-03 09:32:03 - OK: CPU usage 21% within threshold (80%)
2026-04-03 09:34:19 - OK: CPU usage 12% within threshold (80%)
2026-04-03 09:39:21 - OK: CPU usage 29% within threshold (80%)
2026-04-03 09:39:48 - OK: CPU usage 12% within threshold (80%)
2026-04-03 09:43:29 - OK: CPU usage 21% within threshold (80%)
2026-04-03 09:44:03 - OK: CPU usage 13% within threshold (80%)
2026-04-03 09:52:13 - OK: CPU usage 12% within threshold (80%)
2026-04-03 10:59:14 - OK: CPU usage 22% within threshold (50%)
2026-04-03 11:01:10 - OK: CPU usage 28% within threshold (50%)
2026-04-03 11:02:03 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 14% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 21% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 12% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 10% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 14% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 11% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 13% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 25% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 10% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 12% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 10% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 9% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 11% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 12% within threshold (50%)
2026-04-03 11:55:45 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 13% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 13% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 14% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 12% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 10% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 9% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 12% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 13% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 22% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 23% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 26% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 23% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 23% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 22% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 24% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 22% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 22% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 21% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 22% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 24% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 21% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 14% within threshold (50%)
2026-04-03 11:56:21 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 25% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 12% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 11% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 13% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 11% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 9% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 11% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 10% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 11% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 21% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 12% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 34% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 13% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 12% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 23% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 25% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 24% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 24% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 25% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 24% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 21% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 22% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 21% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 24% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 24% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 22% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 22% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 14% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 21% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 23% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 19% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 20% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 15% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 14% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 16% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 17% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 18% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 21% within threshold (50%)
2026-04-03 11:57:22 - OK: CPU usage 22% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 9% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 26% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 22% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 22% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 23% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 9% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:01:11 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 21% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 25% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 21% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 25% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 25% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 23% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 23% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:01:42 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 23% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:01:48 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 24% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 23% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 21% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 22% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:03:38 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 22% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 24% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:04:50 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:05:35 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:05:35 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:05:35 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:05:35 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:05:35 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:05:35 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:05:35 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:05:57 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:05:57 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:05:57 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:05:57 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:09:20 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:09:20 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:09:20 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:09:20 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:09:20 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:09:20 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:09:20 - OK: CPU usage 22% within threshold (50%)
2026-04-03 12:09:20 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:09:20 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:09:20 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:09:20 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:09:20 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:09:20 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:09:20 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:09:20 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 23% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 22% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:10:55 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 21% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 22% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:12:04 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:13:16 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:13:16 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:13:16 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:13:16 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:13:16 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:13:16 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:13:16 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:13:16 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:13:16 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:13:16 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:14:00 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:14:00 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:14:00 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:14:00 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:14:00 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:14:00 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:14:00 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:14:00 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:14:00 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:14:00 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:14:00 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:14:35 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:14:35 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:14:35 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:14:35 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:14:42 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:14:42 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:14:42 - OK: CPU usage 22% within threshold (50%)
2026-04-03 12:14:42 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:14:42 - OK: CPU usage 23% within threshold (50%)
2026-04-03 12:14:42 - OK: CPU usage 21% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:16:13 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:16:29 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:16:29 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:16:29 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:16:29 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:16:29 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:16:29 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:16:29 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:16:29 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:16:29 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:16:29 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:16:29 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:16:29 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:16:29 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 9% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 21% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:19:05 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:19:52 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:19:52 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:19:52 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:19:52 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:19:52 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:20:14 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:20:14 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 22% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 22% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 22% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:23:14 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:25:31 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:25:44 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:25:49 - OK: CPU usage 22% within threshold (50%)
2026-04-03 12:27:46 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:28:07 - OK: CPU usage 10% within threshold (50%)
2026-04-03 12:28:14 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:28:19 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 21% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:29:58 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:30:08 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:30:08 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:30:08 - OK: CPU usage 24% within threshold (50%)
2026-04-03 12:30:08 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:30:08 - OK: CPU usage 20% within threshold (50%)
2026-04-03 12:30:08 - OK: CPU usage 23% within threshold (50%)
2026-04-03 12:30:08 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:30:08 - OK: CPU usage 21% within threshold (50%)
2026-04-03 12:30:08 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:30:08 - OK: CPU usage 11% within threshold (50%)
2026-04-03 12:30:08 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:30:08 - OK: CPU usage 13% within threshold (50%)
2026-04-03 12:30:08 - OK: CPU usage 14% within threshold (50%)
2026-04-03 12:30:08 - OK: CPU usage 12% within threshold (50%)
2026-04-03 12:30:58 - OK: CPU usage 18% within threshold (50%)
2026-04-03 12:30:58 - OK: CPU usage 15% within threshold (50%)
2026-04-03 12:30:58 - OK: CPU usage 19% within threshold (50%)
2026-04-03 12:30:58 - OK: CPU usage 16% within threshold (50%)
2026-04-03 12:30:58 - OK: CPU usage 17% within threshold (50%)
2026-04-03 12:30:58 - OK: CPU usage 15% within threshold (50%)
Executable → Regular
+79 -103
View File
@@ -1,108 +1,84 @@
#!/bin/bash
# === Configuration ===
THRESHOLD=50 # CPU usage threshold (%)
LOG_FILE="/home/isen/isen2024/cpualert.log"
STATE_FILE="/home/isen/isen2024/cpualertstate" # Tracks alert state
HOSTNAME=$(hostname)
DATE=$(date '+%Y-%m-%d %H:%M:%S')
# === Functions ===
# Function to check required commands
check_dependencies() {
for cmd in top df ; do
if ! command -v "$cmd" &>/dev/null; then
echo "$DATE - ERROR: Required command '$cmd' not found." | tee -a "$LOG_FILE"
exit 1
arg1=$1
arg2=$2
# Script renvoyant les informations système demandees pour ce TP
script_demande() {
echo "Utilisation du CPU (en %) :"
echo "$(top -b -n 1 | grep '%Cpu')"
# -n 1 : pour envoyer 1 seule fois l'état (pas en continu)
echo "----------"
echo "Espace disque (partition /home) :"
echo "$(df -h | grep 'Filesystem')"
echo "$(df -h | grep '/home')"
echo "----------"
echo "Nombre de processus actifs (pour tout le system) :"
echo "$(($(ps -axf | wc -l) - 3))"
# il faut retrancher 3 pour avoir le nombre de processus reel
}
# Script perso renvoyant des informations système plus detaillees
renvoi_complet() {
echo "Nom de la machine : $(hostname)"
echo "----------"
echo "Systeme exploitation : $(uname -o)"
echo "----------"
echo "Nom du noyau : $(uname -s)"
echo "Version du noyau : $(uname -r)"
echo "Type architecture : $(uname -m)"
echo "Type CPU : $(uname -p)"
echo "Type plateforme materielle : $(uname -i)"
echo "----------"
echo "Temps ecoule depuis dernier demarrage du systeme : $(uptime -p)"
echo "----------"
echo "Reseau :"
echo "$(ifconfig)"
echo "----------"
echo "Espace disque total :"
echo "$(df -h --total | grep Filesystem)"
echo "$(df -h --total | grep total)"
echo "----------"
echo "Espace disque detaille :"
echo "$(df -h)"
echo "----------"
echo "Utilisation memoire RAM :"
echo "$(free -h)"
echo "----------"
echo "Processus actifs :"
echo "$(ps -axf)"
}
# Execution du bash
if [[ ${arg1} == "-w" ]]
then
if [[ ${arg2} =~ ^[0-9]+$ ]]
then
while [ true ]
do
script_demande
sleep ${arg2}
clear
done
else
echo "Le second argument doit etre un nombre"
fi
done
}
# Function to get average CPU usage across all cores
get_cpu_usage() {
# Extract CPU usage using top command
local usage
usage=$(top -bn1 | grep "Cpu(s)" | awk '{print 100 - $8}')
#Extrait la 8ème colonne ($8), qui correspond au pourcentage de temps CPU inactif (%id).
#Calcule l utilisation CPU en soustrayant ce pourcentage d'inactivité de 100 (exemple : si $8 vaut 85.3, alors 100 - 85.3 = 14.7).
#Le resultat est stocké dans la variable usage.
# Handle empty or invalid values
if [[ -z "$usage" || "$usage" == *"e+"* ]]; then
echo "0"
else
echo "${usage%.*}" # strip decimals
fi
}
#Fonction pour afficher l'espace disque de /home
espace_disque() {
pourcentage_disque=$( df -h /home | grep overlay | awk '{print $5}')
echo "Pourcentge de memoire utilise: ${pourcentage_disque}"
}
#Fonction pour afficher le nombre de processus:
nb_proc() {
nb_proc=$(ps aux --no-header | wc -l)
echo "Nombres de precessus en cours sur la machine: ${nb_proc}"
}
# function to log messages in logfile
log_message() {
echo "$DATE - $1" | tee -a "$LOG_FILE"
}
#fonction pour afficher le résultat dans le terminal
prompt_message() {
echo "$1"
}
# === Main Function ===
monitoring() {
clear
check_dependencies
CPU_USAGE=$(get_cpu_usage)
CPU_INT=${CPU_USAGE%.*}
if [[ ! "$CPU_INT" =~ ^[0-9]+$ ]]; then
log_message "ERROR: Invalid CPU usage value '$CPU_INT'"
prompt_message "ERROR: Invalid CPU usage value '$CPU_INT'"
exit 1
fi
if (( CPU_INT > THRESHOLD )); then
# CPU high
if [[ ! -f "$STATE_FILE" ]]; then
log_message "ALERT: CPU usage ${CPU_INT}% > ${THRESHOLD}%. "
prompt_message "ALERTE: CPU usage ${CPU_INT}% > ${THRESHOLD}"
else
log_message "ALERT: CPU usage ${CPU_INT}% > ${THRESHOLD}%."
prompt_message "ALERT: CPU usage ${CPU_INT}% > ${THRESHOLD}%."
fi
else
# CPU normal
if [[ -f "$STATE_FILE" ]]; then
log_message "RECOVERY: CPU usage ${CPU_INT}% < ${THRESHOLD}%."
prompt_message "RECOVERY: CPU usage ${CPU_INT}% < ${THRESHOLD}%."
rm -f "$STATE_FILE"
else
log_message "OK: CPU usage ${CPU_INT}% within threshold (${THRESHOLD}%)"
prompt_message " OK: CPU usage ${CPU_INT}% within threshold (${THRESHOLD}%)"
fi
echo "Souhaitez-vous le script simple (1) ou complet (2) ?"
read reponse
if [[ $reponse == "1" ]]
then
echo "---------------------------------------------------------------------------------"
echo "Informations systeme demandees pour le TP"
echo "----------"
script_demande
elif [[ $reponse == "2" ]]
then
echo "---------------------------------------------------------------------------------"
echo "Informations systemes detaillees"
echo "----------"
renvoi_complet
else
echo "Reponse non conforme"
fi
fi
espace_disque
nb_proc
}
main() {
if [ "$#" -ne 2 ] || [ "$1" != "-w" ]; then
echo "Erreur : Utilisation incorrecte."
echo "Usage: $0 -w X (X = intervalle en secondes)"
sleep 2
monitoring
exit 1
fi
# Récupération de l'intervalle
local sleeptime=$2
echo "lancement du monito avec un rafraichissement de $sleeptime secondes"
while true; do
monitoring
sleep "$sleeptime"
done
}
main "$1" "$2"