Please or Zarejestruj się to create posts and topics.

check_nvme_smart - monitoring kondycji dysku twardego

Moduł kontroluje tzw. "zużycie dysku twardego", co jest szczególnie ważne w przypadku dysków NVMe. Dyski NVMe oparte są na pamięciach typu NAND flash. Pamięci NAND flash mają ograniczoną liczbę cykli zapisu/odczytu dla każdej komórki, co oznacza, że każda komórka pamięci może być zapisana i wymazana określoną liczbę razy, zanim stanie się zawodna. Proces zapisu i wymazywania powoduje stopniowe pogarszanie się jakości komórek pamięci, co jest główną przyczyną zużywania się dysków NVMe.

Paczka do pobrania check_nvme_smart_v1.3

Suma kontrolna MD5

Module Setup

1. Extract the package to `/etc/monit/custommodules/`. If the `custommodules` directory does not exist, create it.

2. Adjust settings in the `config.cpp` file if needed.

3. Run the `autogen.sh` script. This will create the module's executable file.

4. Add the following entry to the `/etc/monit/monitrc` file:

# check_nvme_smart
check program nvme_smart with path "/etc/monit/custommodules/check_nvme_smart/check_nvme_smart"
every 720 cycles
if status != 0 then alert

5. Reload Monit with the command:

$ systemctl reload monit

Module Update

1. Replace the module files with the new version.

2. Run the `autogen.sh` script.

3. Reload Monit with the command:

$ systemctl reload monit

Uruchomienie modułu

1. Rozpakuj paczkę do /etc/monit/custrommodules/ Jeśli nie masz katalogu custommodules, utwórz go

2. Zmień ustawienia w pliku config.cpp jeśli masz taką potrzebę

3. Uruchom plik autogen.sh. Spowoduje to utworzenie pliku wykonywalnego modułu

4. Dodaj do pliku /etc/monit/monitrc poniższy wpis:

# check_nvme_smart
check program nvme_smart with path "/etc/monit/custommodules/check_nvme_smart/check_nvme_smart"
every 720 cycles
if status != 0 then alert

5. przeładuj monit poleceniem:

$ systemctl reload monit

Aktualizacja modułu

1. Zastąp pliki modułu, jego nowszą wersją

2. Uruchom plik autogen.sh

3. przeładuj monit poleceniem:

$ systemctl reload monit

chanelog

v1.3

- I have added `autogen.sh`, responsible for automatically generating the module's executable file (its automatic compilation)
- I have added the option to display messages in English.

- Dodałem autogen.sh, odpowiedzialny za automatyczne generowanie plku wykonywalnego modułu (automatyczną jego kompilację)
- Dodałem możliwość wyświetlania komunikatów w języku angielskim

v1.2

- I have improved the readability of the code and the display of disk status information

- poprawiłem czytelność kodu oraz wyświetlanie informacji o stanie dysku

Test obciążeniowy

% time seconds usecs/call calls errors syscall

26.46 0.000204 204 1 execve
16.47 0.000127 7 17 mmap
11.93 0.000092 4 19 read
10.77 0.000083 8 10 mprotect
6.49 0.000050 5 9 munmap
4.67 0.000036 36 1 clone
4.54 0.000035 7 5 openat
3.50 0.000027 3 7 close
3.24 0.000025 3 7 newfstatat
2.08 0.000016 16 1 write
1.43 0.000011 11 1 pipe2
1.43 0.000011 3 3 brk
1.17 0.000009 3 3 prlimit64
1.04 0.000008 8 1 1 faccessat
1.04 0.000008 4 2 rt_sigprocmask
0.91 0.000007 7 1 wait4
0.78 0.000006 6 1 fcntl
0.52 0.000004 4 1 futex
0.52 0.000004 4 1 getrandom
0.39 0.000003 3 1 set_robust_list
0.39 0.000003 3 1 rseq
0.26 0.000002 2 1 set_tid_address

100.00 0.000771 8 94 1 total