#1 Le 14/10/2007, à 11:55
- yurek
[resolu]comment récupéré la variable count de fsck
comment faire pour enregistrer cette variable? celle qui dit que l'analyse du disque de déclenchera après 27 boot et tt...
FSCK_MAX_INST
This environment variable will limit the maximum number of file
system checkers that can be running at one time. This allows
configurations which have a large number of disks to avoid fsck
starting too many file system checkers at once, which might
overload CPU and memory resources available on the system. If
this value is zero, then an unlimited number of processes can be
spawned. This is currently the default, but future versions of
fsck may attempt to automatically determine how many file system
checks can be run based on gathering accounting data from the
operating system.
Dernière modification par yurek (Le 14/10/2007, à 17:48)
http://doc.ubuntu-fr.org/installation/debutants
http://doc.ubuntu-fr.org/diagnostic
http://doc.ubuntu-fr.org/diagnostic_outils
http://doc.ubuntu-fr.org/reflexe_ubunteros
Hors ligne
#2 Le 14/10/2007, à 12:00
- manatlan
Re : [resolu]comment récupéré la variable count de fsck
sudo apt-get install showfsck
showfsck affiche le compte à rebours de chaque partoche ext ...
"Oui, oui."
-- Shakespeare (Richard III, Acte I, Scène IV)
Hors ligne
#3 Le 14/10/2007, à 12:09
- cep
Re : [resolu]comment récupéré la variable count de fsck
Plusieurs autres solutions.
Par exemple :
sudo tune2fs -l /dev/hdxy |grep "Mount count"
Adapter /dev/hdxy au numéro du fs.
Hors ligne
#4 Le 14/10/2007, à 12:11
- yurek
Re : [resolu]comment récupéré la variable count de fsck
voici le code source de ce paquet :
#!/bin/bash
set -e
export LC_ALL=C
for part in `cat /proc/mounts | grep " ext[23]" | cut -d \ -f 1 | sort | uniq`; do
tune2fs -l $part > /dev/null 2>&1 ||
{
echo "Unable to acces to $part infos"
continue
}
MC=$(tune2fs -l $part | awk '/^Mount count:/ {print $3}')
MMC=$(tune2fs -l $part | awk '/^Maximum mount count:/ {print $4}')
NB=$(($MMC - $MC + 1))
if [ $NB = 1 ]; then
echo "***************************"
echo "***************************"
echo "* fsck at next mount for $part"
echo "***************************"
echo "***************************"
elif [ $NB -le 5 ]; then
echo "***************************"
echo "* $NB * /$MMC mount(s) until fsck for $part"
echo "***************************"
else
echo "$NB/$MMC mount(s) until fsck for $part"
fi
done
Dernière modification par yurek (Le 14/10/2007, à 12:12)
http://doc.ubuntu-fr.org/installation/debutants
http://doc.ubuntu-fr.org/diagnostic
http://doc.ubuntu-fr.org/diagnostic_outils
http://doc.ubuntu-fr.org/reflexe_ubunteros
Hors ligne
#5 Le 14/10/2007, à 12:16
- yurek
Re : [resolu]comment récupéré la variable count de fsck
ok merci pour vos réponses qui se "ressemble en terme de commande" rapide le paquet showfsck est plus dynamique il nous conviendra mieux
Dernière modification par yurek (Le 14/10/2007, à 12:17)
http://doc.ubuntu-fr.org/installation/debutants
http://doc.ubuntu-fr.org/diagnostic
http://doc.ubuntu-fr.org/diagnostic_outils
http://doc.ubuntu-fr.org/reflexe_ubunteros
Hors ligne
#6 Le 14/10/2007, à 12:49
- yurek
Re : [resolu]comment récupéré la variable count de fsck
cikolata-laptop:~$ sudo showfsck
Password:
16/38 mount(s) until fsck for /dev/disk/by-uuid/8b252b5b-9262-40bd-80de-734f440d4066
19/39 mount(s) until fsck for /dev/disk/by-uuid/f594f227-aab5-438d-977a-c5a662b56893
je n'arive pas a récupérer uniquement les 16 ou 19 help!!
http://doc.ubuntu-fr.org/installation/debutants
http://doc.ubuntu-fr.org/diagnostic
http://doc.ubuntu-fr.org/diagnostic_outils
http://doc.ubuntu-fr.org/reflexe_ubunteros
Hors ligne
#7 Le 14/10/2007, à 12:58
- yurek
Re : [resolu]comment récupéré la variable count de fsck
sudo showfsck | sed -e 's/\/39/\ /' pour bien séparer mais isoler!!!
Dernière modification par yurek (Le 14/10/2007, à 17:34)
http://doc.ubuntu-fr.org/installation/debutants
http://doc.ubuntu-fr.org/diagnostic
http://doc.ubuntu-fr.org/diagnostic_outils
http://doc.ubuntu-fr.org/reflexe_ubunteros
Hors ligne
#8 Le 14/10/2007, à 17:46
- yurek
Re : [resolu]comment récupéré la variable count de fsck
ca y'est j'ai trouvéééééééé jsuis contenttttttt
alros c'est bien plus simple:
sudo showfsck | head -n1 -c2
le head -n1 affiche la première ligne
le head c2 affiche les 2 premier octet.
ce qui donne mon fameux 16
merci a tous...
http://doc.ubuntu-fr.org/installation/debutants
http://doc.ubuntu-fr.org/diagnostic
http://doc.ubuntu-fr.org/diagnostic_outils
http://doc.ubuntu-fr.org/reflexe_ubunteros
Hors ligne