Archive pour la catégorie ‘LinuxConf’

connaitre le service fourbe qui réveille un hard drive

Vendredi 1 janvier 2010

Sur mon 2.6.2 (je ne sais pas à partir de quelle version cela a été introduit), il est possible de faire un truc du genre :
echo “1″ > /proc/sys/vm/block_dump
ce qui a pour effet de tracer tous les accès disque dans ton syslog.
C’est dinc l’occasion de voir quels sont les processus qui provoquent ces accès disques incongrus…

http://linuxfr.org/~phpgml/9931.html

régler le fuseau horaire sous debian

Mercredi 23 décembre 2009

dpkg-reconfigure tzdata

that’s it.

Changer la taille des fontes des applis gtk

Mardi 22 décembre 2009

Installer le package gtk-theme-switch(2)

Lancer un script au démarrage de Debian

Dimanche 20 décembre 2009

Utiliser le fichier /etc/rc.local

par exemple pour configurer une carte wifi sur wlan1 en rate 54M:

ajouter les lignes:

sudo ifconfig wlan1 down

sudo iwconfig wlan1 rate 54M

sudo ifconfig wlan1 up

Connecter un lecteur distant via sshfs

Vendredi 1 mai 2009

Installer fuse-utils et libfuse2

Installer sshfs

Ajouter fuse dans /etc/modules

Ajouter le user au groupe fuse

Montage dans fstab

sshfs#user@machine:/dossier/distant /mnt/dossier/local fuse noauto,user 0 0

reconnaissance de périphériques avec udev

Mardi 28 avril 2009

Faire reconnaitre automatiquement périph USB
——————————————–
tjs monter au meme endroit

Avoir de l’info sur un périph
udevinfo -a -p /sys/block/sda/ | grep {serial}
(ou | more)

Créer un fichier sous /etc/udev/rules.d/ nommé 00_titanium_early.rules contenant
SUBSYSTEMS==”usb”, ATTRS{serial}==”numseri periph”, KERNEL==”sd*”, SYMLINK+=”usb_disc1″

etc…

relancer udev

/etc/init.d/udev stop
/etc/init.d/udev start
(stop start car reload suffit pas à priori)

Qq identifiants de mon matériel pour XP2200:
——————————————–
APN:
ATTRS{serial} = “Y-407_____021218XFPX0006020918″
ATTRS{vendor} = “FUJIFILM”

DD Samsung (2.5)
ATTRS{serial} = “DEF107679C83″

Le fichier /etc/udev/rules/d/00_xp2200.rules
SUBSYSTEMS==”usb”, ATTRS{serial}==”DEF107679C83″, KERNEL==”sd*”, SYMLINK+=”usb_samsung”
SUBSYSTEMS==”scsi”, ATTRS{vendor}==”FUJIFILM”, KERNEL==”sd*”, SYMLINK+=”usb_apn”

# HD Samsung
SUBSYSTEMS==”usb”, ATTRS{serial}==”DEF107679C83″, KERNEL==”sd*”, SYMLINK+=”usb_samsung”
# Appareil photo Fujifilm
SUBSYSTEMS==”scsi”, ATTRS{vendor}==”FUJIFILM”, KERNEL==”sd*”, SYMLINK+=”usb_apn”
# Archos Ondio 128
SUBSYSTEMS==”usb”, ATTRS{manufacturer}==”ALCOR MICRO “, KERNEL==”sd*”, SYMLINK+=”usb_archos”
# USB Key 4Go
SUBSYSTEMS==”usb”, ATTRS{serial}==”2A071012H6547″, KERNEL==”sd*”, SYMLINK+=”usb_sony”
#ipod
SUBSYSTEMS==”usb”, ATTRS{serial}==”000A2700196F8A11″, KERNEL==”sd*”, SYMLINK+=”usb_ipod”
#external drive (western Digital)
SUBSYSTEMS==”usb”, ATTRS{serial}==”574341533830353139343436″, KERNEL==”sd*”, SYMLINK+=”usb_exte
rnalHD”

Des terminaux sympathiques

Mardi 28 avril 2009

Configuration terminaux
———————–
Utiliser aterm
Penser a mettre la fonte xfont-cirrylic

# aterm +sb -transparent -sh 60 -foreground white -name Terminal -fn  -misc–   medium-r-semicondensed–13-120-75-75-c-60-iso8859-1 -geometry 80×20+10+25 &
aterm +sb -transparent -sh 20 -foreground grey90 -name Terminal -fn -misc-fixed-medium-r-normal-*-*-130-*-*-c-*-iso8859-1  -geometry 85×25+100+25 -vb &
# aterm -fg grey60 -tr -shading 50 -sl 500 -fn -unknown-freemono-medium-r-normal-*-*-100-*-*-c-*-koi8-r -vb &

Router les logs sur un second pc

Mardi 28 avril 2009

renvoyer les logs syslog sur un autre serveur

Sur titanium:

vim /etc/syslog.conf

mettre uniquement
*.* @xp2200

Sur Xp2200:

vim /etc/default/syslogd
Ajouter
SYSLOGD=”-r”
Pour autoriser le “remote” des logs

Redémarrer les 2 daemons Syslog
killall -HUP syslogd

Capteurs via sensors

Mardi 28 avril 2009

Faire marcher les capteurs
————————–

- Faire péter un sensors-detect (répondre YES)
- Ajouter les modules dans /etc/modules (répondre oui à la proposition)
- Lancer sensors pour avoir les températures et vitesses FAN
- Relancer le systeme

Verifier avec tail -f /var/log/syslog que tout est ok niveau alarmes.

Pour changer les niveaux des alarmes:
vim /etc/sensors.conf

chercher la puce w83697hf-* et modifier les valeurs selon les labels indiqués…

redémarrer via sensors -s
ou faire un /etc/init.d/sensord restart

sur titanium, rechercher la carte via686a

Config mise sur XP2200 de sensors.conf
chip “w83697hf-*”

# Same as above for w83781d except that in5 and in6 are computed differently.
# Rather than an internal inverting op amp, the 82d/83s use standard positive
# inputs and the negative voltages are level shifted by a 3.6V reference.
# The math is convoluted, so we hope that your motherboard
# uses the recommended resistor values.

# no in1 on this chip.

label in0 “VCore”
label in1 “In1″
label in2 “+3.3V”
label in3 “+5V”
label in4 “+12V”
label in5 “-12V”
label in6 “-5V”
label in7 “V5SB”
label in8 “VBat”

# Tyan Trinity S2495 KT400 has a few differences. Thanks to Eric Schumann
# for proving this information. Same is true for Epox 8K3A and 8KHA+.
# Thanks to Thomas Schorpp for additional feedback.
#    label in2 “VAgp”
label in5 “+3.3V” # aka. Vio
#    label in6 “Vdimm”
#    label in7 “VBat”
#    label in8 “V5SB”
#
# You’ll also want to comment out the in5 and in6 compute lines right below,
# and rename compute in7 to compute in8.

compute in3 ((6.8/10)+1)*@ ,  @/((6.8/10)+1)
compute in4 ((28/10)+1)*@  ,  @/((28/10)+1)
compute in5 (5.14 * @) - 14.91  ,  (@ + 14.91) / 5.14
compute in6 (3.14 * @) -  7.71  ,  (@ +  7.71) / 3.14
compute in7 ((6.8/10)+1)*@ ,  @/((6.8/10)+1)

# 697HF does not have VID inputs so you MUST set your core
# voltage limits below. Currently set for 1.8V core.
#               vvv
set in0_min 0
set in0_max 3
set in2_min 3.3 * 0.95
set in2_max 3.3 * 1.05
set in3_min 5.0 * 0.95
set in3_max 5.0 * 1.05
set in4_min 12 * 0.90
set in4_max 12 * 1.10
set in5_max 10 * 0.90
set in5_min -13 * 1.10
set in6_max 4 * 0.95
set in6_min -6 * 1.05
set in7_min 5 * 0.95
set in7_max 5 * 1.05
set in8_min 3.0 * 0.80
set in8_max 3.0 * 1.20

# And for Tyan Trinity S2495 KT400 and Epox 8K3A and 8KHA+:
#    set in2_min 1.5 * 0.95
#    set in2_max 1.5 * 1.05
#    set in5_min 3.3 * 0.95
#    set in5_max 3.3 * 1.05
#    set in6_min 2.5 * 0.95 # 2.6 on Epox
#    set in6_max 2.5 * 1.05 # 2.6 on Epox
#    set in7_min 3.0 * 0.90
#    set in7_max 3.0 * 1.10
#    set in8_min 5 * 0.90
#    set in8_max 5 * 1.10

# set up sensor types (thermistor is default)
# 1 = PII/Celeron Diode; 2 = 3904 transistor;
# 3435 = thermistor with Beta = 3435
# If temperature changes very little, try 1 or 2.
#   set sensor1 1
#   set sensor2 2
#   set sensor3 3435

# examples for temperature limits
set temp1_over 45
set temp1_hyst 45
set temp2_over 65
set temp2_hyst 60
ignore fan1
ignore fan2
ignore alarms

installation de nfs

Mardi 28 avril 2009

Installation de NFS
——————-

SERVEUR:

aptitude sur nfs-common et nfs-user-server (serveur only)

Droits d’acces : fichier/etc/exports
/mnt/data   xxx.xrousse.lan(rw,sync)
/mnt/backup xxx.xrousse.lan(rw,sync)

NOTE:
192.168.0.0/24(rw,no_root_squash) autorise le réseau privé à lire à priori

Rajouter dans /etc/hosts.deny :
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

Et dans /etc/hosts/allow :
portmap:192.168.0.3
lockd:192.168.0.3
mountd:192.168.0.3
rquotad:192.168.0.3
statd:192.168.0.3

Recharger NFS
killall -HUP nfsd

Client :
——-
montage manuel
mount xxx.xrousse.lan:/mnt/data /mnt/data
montage automatique dans /etc/fstab
# Monte le disque partage du serveur xxx
xxx.xrousse.lan:/mnt/data /mnt/data nfs soft,timeo=5,intr,rsize=8192,wsize=8192  0