logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).

#1 25-09-2021 17:23:06

otyugh
CA Debian-Facile
Lieu : Quimperlé/Arzano
Distrib. : Debian Stable
Inscription : 20-09-2016
Site Web

Retour d'expérience avec smart-notifier

Yop,
j'ai trouvé un paquet qu'est sensé t'alerter quand la SMART du disque foire, nommément "smart-notifier" qu'est sensé envoyer une notification graphique (par le système de notif du bureau standard)

sudo apt install smart-notifier



Quelqu'un l'a testé ? Est-ce que ça a été utile ? Je l'ai installé, mais bon, vu que je suis sur un SSD je pense que j'ai encore quelques bonnes années devant moi >_<

Dernière modification par otyugh (25-09-2021 17:23:55)


virtue_signaling.pngpalestine.png

Hors ligne

#2 25-09-2021 17:33:01

arpinux
CA Debian-Facile
Lieu : Montréal d'aude
Distrib. : nakeDeb
Noyau : Linux 6.1 amd64
(G)UI : sway - i3wm - fluxbox
Inscription : 30-06-2016
Site Web

Re : Retour d'expérience avec smart-notifier

^^
installé pour tests par ici
belle trouvaille si ça fonctionne comme attendu smile

bon ... au lancement, j'ai un warning direct ... date de quand ce truc ? tongue

 $ smart-notifier
/usr/share/smart-notifier/smart_notifier/gui.py:23: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
 



fonctionne mieux avec un

smart-notifier --notify


lais pas de retour pour l'instant... je vais tester sur mes vieux trucs old_geek.gif

Dernière modification par arpinux (25-09-2021 17:36:22)


nous sommes tous différents ... c'est notre point commun ...
Association Debian-Facile - Les cahiers du débutant - ISO Debian-Facile - 3hg - nakeDeb
GNU/Linux©2006-2024

Hors ligne

#3 25-09-2021 17:38:53

otyugh
CA Debian-Facile
Lieu : Quimperlé/Arzano
Distrib. : Debian Stable
Inscription : 20-09-2016
Site Web

Re : Retour d'expérience avec smart-notifier

Si tu fais un

ps aux | grep smart-notifier

tu verra qu'il est déjà lancé en fond de base, non ?

Me semble pas qu'il y ait besoin de le lancer manuellement.

Dernière modification par otyugh (25-09-2021 17:40:16)


virtue_signaling.pngpalestine.png

Hors ligne

#4 25-09-2021 17:59:09

arpinux
CA Debian-Facile
Lieu : Montréal d'aude
Distrib. : nakeDeb
Noyau : Linux 6.1 amd64
(G)UI : sway - i3wm - fluxbox
Inscription : 30-06-2016
Site Web

Re : Retour d'expérience avec smart-notifier

 arp@nak3dmac ~
 $ ps aux | grep smart-notifier
arp       300685  0.0  0.1  23504 12652 pts/0    T    18:32   0:00 /usr/bin/python3 /bin/smart-notifier --notify
 



donc le 'smart-notifier' simple ne s'est pas lancé mais le 'smart-notifier --notify' est actif


nous sommes tous différents ... c'est notre point commun ...
Association Debian-Facile - Les cahiers du débutant - ISO Debian-Facile - 3hg - nakeDeb
GNU/Linux©2006-2024

Hors ligne

#5 25-09-2021 19:15:51

David5647
Membre
Distrib. : Debian Sid
Noyau : 5.15.0-2-amd64
(G)UI : i3wm + des bouts de kde
Inscription : 27-08-2017

Re : Retour d'expérience avec smart-notifier

@arpinux, le warning, c'est juste qu'il manque la ligne

gi.require_version('Gtk', '3.0')


qui permet de s'assurer de la bonne version de gtk avant de lancer le programme.
C'est une "convention forte".

Je sais pas pourquoi c'est pas fait?! Les sources sont sur salsa (git debian), pt'être que comme la version gtk est connue et fixée dans debian, ils ne se soucient pas de la vérifier????
Bref, c'est un warning, on s'en fout, comme tout les warning non? ^^

Hors ligne

#6 25-09-2021 19:50:11

otyugh
CA Debian-Facile
Lieu : Quimperlé/Arzano
Distrib. : Debian Stable
Inscription : 20-09-2016
Site Web

Re : Retour d'expérience avec smart-notifier

Je sais pas pourquoi c'est pas fait?!


Parce que t'as pas proposé un commit sur leur git ! lol (...Si tu le fais t'as mes encouragements !)

Dernière modification par otyugh (25-09-2021 19:52:35)


virtue_signaling.pngpalestine.png

Hors ligne

#7 08-10-2021 19:58:38

anonyme
Invité

Re : Retour d'expérience avec smart-notifier

Bonjour
en user chez moi


ps aux | grep smart-notifier
robert       854  0.0  0.2  59152 32996 ?        S    17:49   0:00 /usr/bin/python3 /usr/bin/smart-notifier
robert      6408  0.0  0.0   6332  2332 pts/1    S+   20:47   0:00 grep smart-notifier
 



sur sid il a deux bugs  =>  https://tracker.debian.org/pkg/smart-notifier
même version sur bullseye , bookworm et sid
ps: je l'ai sur mate/sid

ps:  c'est "gtk"uniquement pour l'installer et fonctionner , a mon avis le 3 est optionnel  smile


Un avertisseur graphique pour smartmontools qui tente de montrer à
l'utilisateur les messages issus du démon de surveillance de disque
smartd. Actuellement uniquement pour GTK.
 



je me demande si il a fonctionner un jour , a l'époque j'avais les mails système , mais sur le bureau me souvient plus (installer)
et quand au warning même chose "PyGIWarning: Gtk"

il faudrait que je trouve un disque malade pour bien tester  roll

Dernière modification par anonyme (08-10-2021 21:44:38)

#8 09-10-2021 01:10:49

Tawal
Membre
Distrib. : Debian Stable à jour
Noyau : amd64
(G)UI : Xfce
Inscription : 25-02-2021

Re : Retour d'expérience avec smart-notifier

Hello,

Je l'ai installé.
Mes HDD sont assez vieux.

J'ai lu le fichier /usr/share/doc/smart-notifier/README.Debian dans le quel on trouve :

5. Optionally test if it is working, this can be done by adding a '-M test'
   option to the smartd config. This causes smartd to send a warning every
   time it is restarted. Finally, re-starting should cause the warning message
   to be displayed on the screen.


J'ai donc essayé de rajouter une ligne à /etc/smartd.conf :

DEVICESCAN -M test


Et ai tenté de redémarrer le service smartd.service sans succès : pas de notification.

De plus j'ai pas bien compris où il fallait rajouter la ligne

gi.require_version('Gtk', '3.0')

.

Bref, j'ai des doutes sur son bon fonctionnement.


Comme la science n'est pas infuse, elle se diffuse.
Useless Use of Cat Award
Filenames and Pathnames in Shell: How to do it Correctly
À chaque problème sa solution, à chaque solution son moyen, si pas de moyen, toujours le problème !

Hors ligne

#9 09-10-2021 09:56:18

anonyme
Invité

Re : Retour d'expérience avec smart-notifier

Bonjour
moi aussi mon DD gratte , mais il fonctionne d'enfer cool
de 2005 environ , du sata version 1 .
j'ai recycler tous ceux qui avaient des soucis roll
peut être simuler dans smartd un problème mais je sais pas faire

#10 09-10-2021 11:19:05

Tawal
Membre
Distrib. : Debian Stable à jour
Noyau : amd64
(G)UI : Xfce
Inscription : 25-02-2021

Re : Retour d'expérience avec smart-notifier

J'ai réussi à tester smart-notifier  big_smile, de la manière suivante :

   - J'ai modifié le fichier /etc/samrtd.conf qui contenait en 1ère ligne dé-commentée :

DEVICESCAN -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner


Or on lit dans ce même fichier :

# The word DEVICESCAN will cause any remaining lines in this
# configuration file to be ignored: it tells smartd to scan for all
# ATA and SCSI devices.


J'ai donc commenté cette ligne et ai rajouté celle-là :

/dev/sda -m tawal@Deb1 -M test -M exec /usr/share/smartmontools/smartd-runner


J'ai sauvegardé les modifications.

   - Puis j'ai vérifié que smart-notifier était bien lancé :

ps aux | grep smart | grep -v grep


tawal     2139  0.1  1.4 409696 59400 pts/0    Sl   11:34   0:01 /usr/bin/python3 /usr/bin/smart-notifier



   - Ensuite, j'ai redémarré le service smartd :

systemctl restart smartd.service


Et voilà le résulat :
eGYxJICl.png
zhDMy2Xl.png

Bon, on a une fenêtre et pas une notification, je pense que pour avoir une notification, il faut utiliser l'option --notify de smart-notifier.
Perso, je préfère la fenêtre (obligation de la gérer, n'est-il pas ?)

Pour être sûr que cette fenêtre venait bien de smart-notifier, j'ai arrêté smart-notifier.
Et j'ai redémarré le service smartd : pas de fenêtre smile

Plus aucuns doutes sur le bon fonctionnement de ce petit logiciel, bien pratique au final il me semble tongue

PS:
J'en ai profité pour modifier mon smartd.conf :
Commenté la ligne

DEVICESCAN -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner


Ajout de ces lignes :

/dev/sda -H -l error -m tawal@Deb1 -M exec /usr/share/smartmontools/smartd-runner
/dev/sdb -H -l error -m tawal@Deb1 -M exec /usr/share/smartmontools/smartd-runner


En suivant les explications données en fin de fichier /etc/smartd.conf wink


Comme la science n'est pas infuse, elle se diffuse.
Useless Use of Cat Award
Filenames and Pathnames in Shell: How to do it Correctly
À chaque problème sa solution, à chaque solution son moyen, si pas de moyen, toujours le problème !

Hors ligne

#11 09-10-2021 15:15:05

anonyme
Invité

Re : Retour d'expérience avec smart-notifier

Bonjour
idem (sauf sous gnome pas réussi)
sous mate le log (syslog)


Oct  9 15:52:49 debian2 smartd[11296]: smartd 7.2 2020-12-30 r5155 [x86_64-linux-5.15.0-rc4-amd64] (local build)
Oct  9 15:52:49 debian2 smartd[11296]: Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
Oct  9 15:52:49 debian2 smartd[11296]: Opened configuration file /etc/smartd.conf
Oct  9 15:52:49 debian2 smartd[11296]: Drive: /dev/sda, implied '-a' Directive on line 22 of file /etc/smartd.conf
Oct  9 15:52:49 debian2 smartd[11296]: Configuration file /etc/smartd.conf parsed.
Oct  9 15:52:49 debian2 smartd[11296]: Device: /dev/sda, type changed from 'scsi' to 'sat'
Oct  9 15:52:49 debian2 smartd[11296]: Device: /dev/sda [SAT], opened
Oct  9 15:52:49 debian2 smartd[11296]: Device: /dev/sda [SAT], ST3200827AS, S/N:5ND4AJPE, FW:3.AAH, 200 GB
Oct  9 15:52:49 debian2 smartd[11296]: Device: /dev/sda [SAT], found in smartd database: Seagate Barracuda 7200.9
Oct  9 15:52:49 debian2 smartd[11296]: Device: /dev/sda [SAT], is SMART capable. Adding to "monitor" list.
Oct  9 15:52:49 debian2 smartd[11296]: Device: /dev/sda [SAT], state read from /var/lib/smartmontools/smartd.ST3200827AS-5ND4AJPE.ata.state
Oct  9 15:52:49 debian2 smartd[11296]: Monitoring 1 ATA/SATA, 0 SCSI/SAS and 0 NVMe devices
Oct  9 15:52:49 debian2 smartd[11296]: Executing test of /usr/share/smartmontools/smartd-runner to robert@debian2 ...
Oct  9 15:52:49 debian2 smartd[11296]: Test of /usr/share/smartmontools/smartd-runner to robert@debian2 produced unexpected output (183 bytes to STDOUT/STDERR:
Oct  9 15:52:49 debian2 smartd[11296]: /etc/smartmontools/run.d/10mail:
Oct  9 15:52:49 debian2 smartd[11296]: Your system does not have /usr/bin/mail.  Install the mailx or mailutils package
Oct  9 15:52:49 debian2 smartd[11296]: run-parts: /etc/smartmontools/run.d/10mail exited with return code 1
Oct  9 15:52:49 debian2 smartd[11296]: Test of /usr/share/smartmontools/smartd-runner to robert@debian2: failed (32-bit/8-bit exit status:  256/1)
Oct  9 15:52:49 debian2 smartd[11296]: Device: /dev/sda [SAT], SMART Usage Attribute: 190 Airflow_Temperature_Cel changed from 64 to 65
Oct  9 15:52:49 debian2 smartd[11296]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 36 to 35
Oct  9 15:52:49 debian2 smartd[11296]: Device: /dev/sda [SAT], state written to /var/lib/smartmontools/smartd.ST3200827AS-5ND4AJPE.ata.state
Oct  9 15:52:49 debian2 systemd[1]: Started Self Monitoring and Reporting Technology (SMART) Daemon.
 



et bien sur le bandeau avec l'alarme sur l'écran (idem pas de notification de mate (en haut a droite))

#12 09-10-2021 15:40:24

Tawal
Membre
Distrib. : Debian Stable à jour
Noyau : amd64
(G)UI : Xfce
Inscription : 25-02-2021

Re : Retour d'expérience avec smart-notifier

Voici mon syslog trié sur le smartd (mode fonctionnement normal sans test, après le reboot de la mise à jour du noyau) :

oct. 09 14:37:48 Deb1 smartd[1063]: smartd 7.2 2020-12-30 r5155 [x86_64-linux-5.10.0-9-amd64] (local build)
oct. 09 14:37:48 Deb1 smartd[1063]: Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
oct. 09 14:37:48 Deb1 smartd[1063]: Opened configuration file /etc/smartd.conf
oct. 09 14:37:48 Deb1 smartd[1063]: Configuration file /etc/smartd.conf parsed.
oct. 09 14:37:48 Deb1 smartd[1063]: Device: /dev/sda, type changed from 'scsi' to 'sat'
oct. 09 14:37:48 Deb1 smartd[1063]: Device: /dev/sda [SAT], opened
oct. 09 14:37:48 Deb1 smartd[1063]: Device: /dev/sda [SAT], Hitachi HTS543216L9A300, S/N:081115FB2200LCHYW35B, WWN:5-000cca-561dbac01, FW:FB2OC40C, 160 GB
oct. 09 14:37:48 Deb1 smartd[1063]: Device: /dev/sda [SAT], found in smartd database: Hitachi Travelstar 5K320
oct. 09 14:37:48 Deb1 smartd[1063]: Device: /dev/sda [SAT], is SMART capable. Adding to "monitor" list.
oct. 09 14:37:48 Deb1 smartd[1063]: Device: /dev/sda [SAT], state read from /var/lib/smartmontools/smartd.Hitachi_HTS543216L9A300-081115FB2200LCHYW35B.ata.state
oct. 09 14:37:48 Deb1 smartd[1063]: Device: /dev/sdb, type changed from 'scsi' to 'sat'
oct. 09 14:37:48 Deb1 smartd[1063]: Device: /dev/sdb [SAT], opened
oct. 09 14:37:48 Deb1 smartd[1063]: Device: /dev/sdb [SAT], ST9250311CS, S/N:6VCR5ZAX, WWN:5-000c50-036b1219c, FW:SC1A, 250 GB
oct. 09 14:37:49 Deb1 smartd[1063]: Device: /dev/sdb [SAT], not found in smartd database.
oct. 09 14:37:49 Deb1 smartd[1063]: Device: /dev/sdb [SAT], is SMART capable. Adding to "monitor" list.
oct. 09 14:37:49 Deb1 smartd[1063]: Device: /dev/sdb [SAT], state read from /var/lib/smartmontools/smartd.ST9250311CS-6VCR5ZAX.ata.state
oct. 09 14:37:49 Deb1 smartd[1063]: Monitoring 2 ATA/SATA, 0 SCSI/SAS and 0 NVMe devices
oct. 09 14:37:49 Deb1 smartd[1063]: Device: /dev/sda [SAT], state written to /var/lib/smartmontools/smartd.Hitachi_HTS543216L9A300-081115FB2200LCHYW35B.ata.state
oct. 09 14:37:49 Deb1 smartd[1063]: Device: /dev/sdb [SAT], state written to /var/lib/smartmontools/smartd.ST9250311CS-6VCR5ZAX.ata.state



Ils se ressemblent beaucoup wink


Comme la science n'est pas infuse, elle se diffuse.
Useless Use of Cat Award
Filenames and Pathnames in Shell: How to do it Correctly
À chaque problème sa solution, à chaque solution son moyen, si pas de moyen, toujours le problème !

Hors ligne

Pied de page des forums