Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
elearning:workbooks:centos:6:avance:l101 [2021/03/31 12:57] – admin | elearning:workbooks:centos:6:avance:l101 [2023/02/15 15:41] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
~~PDF: | ~~PDF: | ||
+ | |||
+ | Version : **2022.01** | ||
Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
- | ======LCF301 | + | ======LCF300 |
=====Contenu du Module===== | =====Contenu du Module===== | ||
- | * **LCF301 | + | * **LCF300 |
- | * Contenu du Module | + | * X Window System |
- | * Fichiers Spéciaux | + | * Configuration |
- | * Commandes | + | * Gestionnaire de Fenêtres |
- | * La Commande lspci | + | * Toolkits |
- | * La Commande lsusb | + | * Freedesktop |
- | * La Commande dmidecode | + | * Display Manager |
- | * Répertoire /proc | + | * XDM, GDM et KDM |
- | * Répertoires | + | * LightDM |
- | * ide/scsi | + | * X.orgX11 |
- | * acpi | + | * Présentation |
- | * bus | + | * Démarrage et Arrêt |
- | * net | + | * Utilisation |
- | * sys | + | * Configuration |
- | * La Commande sysctl | + | * La Section ServerFlags |
- | * Fichiers | + | * La Section ServerLayout |
- | * Processeur | + | * La Section Files |
- | * Interruptions système | + | * La Section |
- | * Canaux DMA | + | * La Section InputDevice |
- | * Plages d' | + | * La Section Monitor |
- | * Périphériques | + | * La Section Device |
- | * Modules | + | * La Section Screen |
- | * Statistiques de l' | + | * La Commande xwininfo |
- | * Partitions | + | * La Commande |
- | * Espaces de pagination | + | * L' |
- | * Statistiques d' | + | * Le Clavier et la Souris |
- | * Statistiques d' | + | * Claviers Visuels |
- | * Version du noyau | + | * L' |
- | * Interprétation des informations dans /proc | + | * Autres Technologies |
- | * Commandes | + | |
- | * free | + | |
- | * uptime ou w | + | |
- | * iostat | + | |
- | * vmstat | + | |
- | * mpstat | + | |
- | * sar | + | |
- | * Utilisation des commandes en production | + | |
- | * Identifier un système limité par le processeur | + | |
- | * Identifier un système ayant un problème de mémoire | + | |
- | * Identifier un système ayant un problème d' | + | |
- | * Modules usb | + | |
- | * udev | + | |
- | * La Commande | + | |
- | * Système de fichiers /sys | + | |
- | * Limiter les Ressources | + | |
- | * ulimit | + | |
- | * Groupes de Contrôle | + | |
- | * LAB #1 - Travailler avec les cgroups sous RHEL/CentOS 7 | + | |
- | =====Fichiers Spéciaux===== | + | =====X Window System===== |
- | Dans l'ordinateur les périphériques sont reliés à un **contrôleur** qui communique avec le processeur à l'aide d' | + | L'architecture graphique de Linux est **X Window System**, aussi appelé |
- | <WRAP center round important> | + | * Fenêtres, |
- | **Important** : Les périphériques qui nécessitent à ce que l' | + | * Boutons, |
- | </ | + | |
+ | | ||
+ | | ||
- | Consultez le contenu du répertoire | + | **X** est une application client/serveur. |
- | < | + | Il existe trois versions de X : |
- | [root@centos7 ~]# ls -l /dev | more | + | |
- | total 0 | + | |
- | crw-------. 1 root root 10, 235 Oct 28 09:40 autofs | + | |
- | drwxr-xr-x. 2 root root 140 Oct 28 09:40 block | + | |
- | drwxr-xr-x. 2 root root 80 Oct 28 09:40 bsg | + | |
- | crw-------. 1 root root 10, 234 Oct 28 09:40 btrfs-control | + | |
- | drwxr-xr-x. 3 root root 60 Oct 28 09:40 bus | + | |
- | lrwxrwxrwx. 1 root root 3 Oct 28 09:40 cdrom -> sr0 | + | |
- | drwxr-xr-x. 2 root root 2800 Oct 28 09:41 char | + | |
- | crw-------. 1 root root 5, 1 Oct 28 09:40 console | + | |
- | lrwxrwxrwx. 1 root root 11 Oct 28 09:40 core -> / | + | |
- | drwxr-xr-x. 3 root root 80 Oct 28 09:40 cpu | + | |
- | crw-------. 1 root root | + | |
- | crw-------. 1 root root | + | |
- | drwxr-xr-x. 5 root root 100 Oct 28 09:40 disk | + | |
- | drwxr-xr-x. 2 root root 60 Oct 28 09:40 dri | + | |
- | lrwxrwxrwx. 1 root root 13 Oct 28 09:40 fd -> / | + | |
- | crw-rw-rw-. 1 root root 1, 7 Oct 28 09:40 full | + | |
- | crw-rw-rw-. 1 root root 10, 229 Oct 28 09:41 fuse | + | |
- | crw-------. 1 root root 10, 228 Oct 28 09:40 hpet | + | |
- | drwxr-xr-x. 3 root root 0 Oct 28 09:40 hugepages | + | |
- | prw-------. 1 root root 0 Oct 28 09:40 initctl | + | |
- | drwxr-xr-x. 3 root root 240 Oct 28 09:40 input | + | |
- | crw-r--r--. 1 root root 1, 11 Oct 28 09:40 kmsg | + | |
- | --More-- | + | |
- | </ | + | |
- | On peut noter dans la sortie de la commande que certains fichiers sont de type **bloc** (**b**), tandis que d' | + | |
+ | | ||
+ | * **[[http:// | ||
+ | * un logiciel libre utilisé depuis les modifications | ||
+ | | ||
+ | | ||
- | < | + | ====Configuration==== |
- | ... | + | |
- | brw-rw---- | + | |
- | ... | + | |
- | crw-rw-rw- | + | |
- | ... | + | |
- | </ | + | |
- | La différence entre les deux repose sur le type de communication entre le système et le module. Dans le premier cas le système accède au périphérique par des coordonnées du bloc de données sur le support tandis que dans le deuxième cas la communication d' | + | IL existe plusieurs outils pour configurer |
- | Les deux informations clefs du fichier spécial sont situées à la place de la taille d'un fichier normal et se nomment | + | * **XFree86 configure** est la commande utilisé pour configurer |
+ | * **Xorg configure** est la commande utilisé pour configurer un serveur X basé sur X.orgX11. Cette commande produit | ||
- | * le **majeur** identifie le pilote du périphérique et donc son contrôleur, | + | <WRAP center round important> |
- | * le **mineur** identifie | + | **Important** : Ces deux commandes doivent être utilisées quand le serveur X est arrêté. |
+ | </ | ||
- | =====Commandes===== | + | Deux outils qui ne bénéficient plus de support sont **xf86cfg** et **xorgcfg** sont parfois présents dans la distribution et peuvent être utilisés pour configurer le serveur X. |
- | ====La Commande lspci==== | + | Dernièrement il existe des outils spécifiques à une distribution : |
- | Cette commande vous renseigne sur les adaptateurs reliés aux bus PCI, AGP et PCI express | + | * Red Hat, CentOS, Fedora |
- | <code> | + | <WRAP center round important> |
- | [root@centos7 ~]# lspci | + | **Important** |
- | 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02) | + | </WRAP> |
- | 00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/ | + | |
- | 00:01.1 IDE interface: Intel Corporation 82371AB/ | + | |
- | 00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter | + | |
- | 00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02) | + | |
- | 00:04.0 System peripheral: InnoTek Systemberatung GmbH VirtualBox Guest Service | + | |
- | 00:05.0 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio Controller (rev 01) | + | |
- | 00:06.0 USB controller: Apple Inc. KeyLargo/ | + | |
- | 00:07.0 Bridge: Intel Corporation 82371AB/ | + | |
- | 00:0b.0 USB controller: Intel Corporation 82801FB/ | + | |
- | 00:0d.0 SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ | + | |
- | </code> | + | |
- | Pour obtenir | + | Les fichiers |
- | < | + | * **[[http://www.xfree86.org|XFree86]]** 4.x, |
- | [root@centos7 ~]# lspci -v -s 00:03.0 | + | * **/etc/ |
- | 00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02) | + | * **[[http:// |
- | Subsystem: Intel Corporation PRO/1000 MT Desktop Adapter | + | * **/etc/ |
- | Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 19 | + | * **[[http:// |
- | Memory at f0000000 (32-bit, non-prefetchable) | + | * **/etc/ |
- | I/O ports at d010 [size=8] | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Kernel driver in use: e1000 | + | |
- | </code> | + | |
- | ou : | + | =====Gestionnaire de Fenêtres===== |
- | < | + | **X** ne doit être confondue avec un **Gestionnaire de Fenêtres** |
- | [root@centos7 ~]# lspci -vv -s 00:03.0 | + | |
- | 00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller | + | |
- | Subsystem: Intel Corporation PRO/1000 MT Desktop Adapter | + | |
- | Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- | + | |
- | Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- | + | |
- | Latency: 64 (63750ns min) | + | |
- | Interrupt: pin A routed to IRQ 19 | + | |
- | Region 0: Memory at f0000000 (32-bit, non-prefetchable) [size=128K] | + | |
- | Region 2: I/O ports at d010 [size=8] | + | |
- | Capabilities: | + | |
- | Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-, | + | |
- | Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- | + | |
- | Capabilities: | + | |
- | Command: DPERE- ERO+ RBC=512 OST=1 | + | |
- | Status: Dev=ff:1f.0 64bit- 133MHz- SCD- USC- DC=simple DMMRBC=2048 DMOST=1 DMCRS=8 RSCEM- 266MHz- 533MHz- | + | |
- | Kernel driver in use: e1000 | + | |
- | </ | + | |
- | ===Options de la commande=== | + | * KDE, |
+ | * GNOME, | ||
+ | * twm, | ||
+ | * IceWM, | ||
+ | * Rvwm, | ||
+ | * CDE, | ||
+ | * WindowMaker, | ||
+ | * Enlightenment, | ||
+ | * Xfce, | ||
+ | * Afterstep | ||
+ | * Compiz Fusion, | ||
+ | * Fluxbox, | ||
+ | * Openbox, | ||
+ | * Metacity, | ||
+ | * Blackbox, | ||
+ | * Ion, | ||
+ | * Wmii, | ||
+ | * etc. | ||
- | Les options de cette commande | + | Les Gestionnaires les plus connus |
- | < | + | * **KDE** (//Kool Desktop Environment// |
- | [root@centos7 ~]# lspci --help | + | * **GNOME** (//Gnu Network Object Model Environment// |
- | lspci: invalid option -- ' | + | |
- | Usage: lspci [< | + | |
- | Basic display modes: | + | =====Toolkits===== |
- | -mm Produce machine-readable output (single -m for an obsolete format) | + | |
- | -t Show bus tree | + | |
- | Display options: | + | Chaque Gestionnaire utilise une bibliothèque graphique contenant des fonctions " |
- | -v Be verbose | + | |
- | -k Show kernel drivers handling each device | + | |
- | -x Show hex-dump of the standard part of the config space | + | |
- | -xxx Show hex-dump of the whole config space (dangerous; root only) | + | |
- | -xxxx Show hex-dump of the 4096-byte extended config space (root only) | + | |
- | -b Bus-centric view (addresses and IRQ's as seen by the bus) | + | |
- | -D Always show domain numbers | + | |
- | Resolving of device ID's to names: | + | Une bibliothèque complète est appelée un **Widget Toolkit**. Le Toolkit le plus connu est **MOTIF**. Cependant **MOTIF** |
- | -n Show numeric ID's | + | |
- | -nn Show both textual and numeric ID's (names & numbers) | + | |
- | -q Query the PCI ID database for unknown ID's via DNS | + | |
- | -qq As above, but re-query locally cached entries | + | |
- | -Q Query the PCI ID database for all ID's via DNS | + | |
- | Selection of devices: | + | Comme dans beaucoup de cas de développement sous Linux, il existe plusieurs Toolkits dont les deux les plus connus sont : |
- | -s [[[[< | + | |
- | -d [< | + | |
- | Other options: | + | * **GTK** (//GIMP Toolkit//), programé en langage C et embarqué par défaut dans le Gestionnaire de Fenêtres **Gnome**, |
- | -i < | + | * **QT** |
- | -p < | + | |
- | -M Enable `bus mapping' | + | |
- | PCI access options: | + | =====Freedesktop===== |
- | -A < | + | |
- | -O <par>=< | + | |
- | -G Enable PCI access debugging | + | |
- | -H < | + | |
- | -F < | + | |
- | </ | + | |
- | ====La Commande lsusb==== | + | Afin d' |
- | Cette commande vous renseigne sur les adaptateurs reliés au bus usb : | + | =====Display Manager===== |
- | < | + | Le **Display Manager** est chargé de gérer les connexions locales et à distance, les authentifications et les ouvertures de sessions. De ce fait, Le Display Manager est l' |
- | [root@centos7 ~]# lsusb | + | |
- | Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | + | |
- | Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub | + | |
- | [root@centos7 ~]# lsusb -vt | + | Pour les connexions à distance le Display Manager utilise le protocole **XDMCP** (//X Display Manager Control Panel//)). Le fichier de configuration de XDMCP est **/etc/X11/ |
- | /: Bus 02.Port 1: Dev 1, Class=root_hub, | + | |
- | /: Bus 01.Port 1: Dev 1, Class=root_hub, | + | |
- | </code> | + | |
- | ===Options de la commande=== | + | ====XDM, GDM et KDM==== |
- | Les options de cette commande | + | Le Display Manager par défaut, compatible avec tous les serveurs **X**, est **XDM**. |
- | < | + | * **GDM** pour GNOME, |
- | [root@centos7 ~]# lsusb --help | + | |
- | Usage: lsusb [options]... | + | |
- | List USB devices | + | |
- | -v, --verbose | + | |
- | Increase verbosity (show descriptors) | + | |
- | | + | |
- | Show only devices with specified device and/or | + | |
- | bus numbers (in decimal) | + | |
- | -d vendor: | + | |
- | Show only devices with the specified vendor and | + | |
- | product ID numbers (in hexadecimal) | + | |
- | -D device | + | |
- | Selects which device lsusb will examine | + | |
- | -t, --tree | + | |
- | Dump the physical USB device hierarchy as a tree | + | |
- | | + | |
- | Show version of program | + | |
- | -h, --help | + | |
- | Show usage and help | + | |
- | </ | + | |
- | ====La Commande dmidecode==== | + | Les deux premiers sont essentiellement des XDM avec des fonctionnalités supplémentaires telles : |
- | La commande | + | |
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
- | * l' | + | ====LightDM==== |
- | * les extensions possibles. | + | |
- | < | + | LightDM est un gestionnaire d' |
- | [root@centos7 ~]# dmidecode | + | |
- | # dmidecode 2.12 | + | |
- | SMBIOS 2.5 present. | + | |
- | 10 structures occupying 450 bytes. | + | |
- | Table at 0x000E1000. | + | |
- | Handle 0x0000, DMI type 0, 20 bytes | + | * Pas de dépendances de Gnome |
- | BIOS Information | + | * Utilisation de webkit pour le rendu des thèmes |
- | Vendor: innotek GmbH | + | * Support de Toolkits Gtk et Qt |
- | Version: VirtualBox | + | |
- | Release Date: 12/ | + | |
- | Address: 0xE0000 | + | |
- | Runtime Size: 128 kB | + | |
- | ROM Size: 128 kB | + | |
- | Characteristics: | + | |
- | ISA is supported | + | |
- | PCI is supported | + | |
- | Boot from CD is supported | + | |
- | Selectable boot is supported | + | |
- | 8042 keyboard services are supported (int 9h) | + | |
- | CGA/mono video services are supported (int 10h) | + | |
- | ACPI is supported | + | |
- | Handle 0x0001, DMI type 1, 27 bytes | + | Sous RHEL/CentOS 7, LightDM n'est pas installé par défaut et se trouve dans le dépôt EPEL. Installez donc le dépôt |
- | System Information | + | |
- | Manufacturer: | + | |
- | Product Name: VirtualBox | + | |
- | Version: 1.2 | + | |
- | Serial Number: 0 | + | |
- | UUID: DDEE345C-66F8-4250-B5A2-85CEF2C1C54D | + | |
- | Wake-up Type: Power Switch | + | |
- | SKU Number: Not Specified | + | |
- | Family: Virtual Machine | + | |
- | Handle 0x0008, DMI type 2, 15 bytes | + | < |
- | Base Board Information | + | [root@centos7 ~]# yum install -y epel-release |
- | Manufacturer: Oracle Corporation | + | Loaded plugins: fastestmirror, |
- | Product Name: VirtualBox | + | Loading mirror speeds from cached hostfile |
- | Version: 1.2 | + | * base: fr.mirror.babylon.network |
- | Serial Number: 0 | + | * extras: fr.mirror.babylon.network |
- | Asset Tag: Not Specified | + | * updates: fr.mirror.babylon.network |
- | Features: | + | Resolving Dependencies |
- | Board is a hosting board | + | --> Running transaction check |
- | Location In Chassis: Not Specified | + | ---> Package epel-release.noarch 0:7-6 will be installed |
- | Chassis Handle: 0x0003 | + | --> Finished Dependency Resolution |
- | Type: Motherboard | + | |
- | Contained Object Handles: 0 | + | |
- | Handle 0x0003, DMI type 3, 13 bytes | + | Dependencies Resolved |
- | Chassis Information | + | |
- | Manufacturer: | + | |
- | Type: Other | + | |
- | Lock: Not Present | + | |
- | Version: Not Specified | + | |
- | Serial Number: Not Specified | + | |
- | Asset Tag: Not Specified | + | |
- | Boot-up State: Safe | + | |
- | Power Supply State: Safe | + | |
- | Thermal State: Safe | + | |
- | Security Status: None | + | |
- | Handle 0x0007, DMI type 126, 42 bytes | + | ================================================================================ |
- | Inactive | + | Package |
+ | ================================================================================ | ||
+ | Installing: | ||
+ | | ||
- | Handle 0x0005, DMI type 126, 15 bytes | + | Transaction Summary |
- | Inactive | + | ================================================================================ |
+ | Install | ||
- | Handle 0x0006, DMI type 126, 28 bytes | + | Total download size: 14 k |
- | Inactive | + | Installed size: 24 k |
+ | Downloading packages: | ||
+ | epel-release-7-6.noarch.rpm | ||
+ | Running transaction check | ||
+ | Running transaction test | ||
+ | Transaction test succeeded | ||
+ | Running transaction | ||
+ | Installing : epel-release-7-6.noarch | ||
+ | Verifying | ||
- | Handle 0x0002, DMI type 11, 7 bytes | + | Installed: |
- | OEM Strings | + | |
- | String 1: vboxVer_4.3.28 | + | |
- | String 2: vboxRev_100309 | + | |
- | + | ||
- | Handle 0x0008, DMI type 128, 8 bytes | + | |
- | OEM-specific Type | + | |
- | Header and Data: | + | |
- | 80 08 08 00 01 15 21 00 | + | |
- | + | ||
- | Handle 0xFEFF, DMI type 127, 4 bytes | + | |
- | End Of Table | + | |
+ | Complete! | ||
</ | </ | ||
- | ===Options de la commande=== | + | Installez ensuite LightDM |
- | + | ||
- | Les options de cette commande sont : | + | |
< | < | ||
- | [root@centos7 ~]# dmidecode | + | [root@centos7 ~]# yum install |
- | Usage: dmidecode [OPTIONS] | + | Loaded plugins: fastestmirror, |
- | Options are: | + | epel/ |
- | -d, --dev-mem FILE | + | epel | 4.3 kB |
- | -h, --help | + | (1/3): epel/x86_64/group_gz |
- | -q, --quiet Less verbose output | + | (2/3): epel/ |
- | -s, --string KEYWORD | + | (3/3): epel/ |
- | -t, --type TYPE Only display the entries of given type | + | Loading mirror speeds from cached hostfile |
- | -u, --dump Do not decode the entries | + | * base: fr.mirror.babylon.network |
- | | + | * epel: mirrors.ircam.fr |
- | | + | * extras: fr.mirror.babylon.network |
- | -V, --version | + | * updates: fr.mirror.babylon.network |
- | </code> | + | Resolving Dependencies |
+ | --> Running transaction check | ||
+ | ---> Package lightdm.x86_64 0: | ||
+ | --> Processing Dependency: lightdm-greeter = 1.2 for package: lightdm-1.10.6-4.el7.x86_64 | ||
+ | --> Processing Dependency: lightdm-gobject(x86-64) = 1.10.6-4.el7 for package: lightdm-1.10.6-4.el7.x86_64 | ||
+ | --> Running transaction check | ||
+ | ---> Package lightdm-gobject.x86_64 0: | ||
+ | ---> Package lightdm-gtk.x86_64 0: | ||
+ | --> Processing Dependency: lightdm-gtk-common = 1.8.5-19.el7 for package: lightdm-gtk-1.8.5-19.el7.x86_64 | ||
+ | --> Running transaction check | ||
+ | ---> Package lightdm-gtk-common.noarch 0: | ||
+ | --> Finished Dependency Resolution | ||
- | =====Répertoire /proc===== | + | Dependencies Resolved |
- | Le répertoire /proc contient des fichiers et des répertoires virtuels. Le contenu de ces fichiers est créé dynamiquement lors de la consultation. Seul root peut consulter la totalité des informations dans le répertoire /proc. | + | ================================================================================ |
+ | | ||
+ | ================================================================================ | ||
+ | Installing: | ||
+ | | ||
+ | Installing for dependencies: | ||
+ | | ||
+ | | ||
+ | | ||
- | < | + | Transaction Summary |
- | [root@centos7 ~]# ls /proc | + | ================================================================================ |
- | 1 | + | Install |
- | 10 | + | |
- | 11 | + | |
- | 12 | + | |
- | 1215 | + | |
- | 1217 | + | |
- | 1227 | + | |
- | 1228 | + | |
- | 1230 | + | |
- | 1264 | + | |
- | 13 | + | |
- | 1372 | + | |
- | 14 | + | |
- | 15 | + | |
- | 16 | + | |
- | 17 | + | |
- | 1732 | + | |
- | 1744 | + | |
- | 17788 2486 | + | |
- | 18 | + | |
- | 19 | + | |
- | 2 259 28 2998 434 | + | |
- | 20 | + | |
- | 20638 2597 | + | |
- | 21 | + | |
- | </ | + | |
- | ====Répertoires==== | + | Total download size: 362 k |
+ | Installed size: 970 k | ||
+ | Downloading packages: | ||
+ | warning: / | ||
+ | Public key for lightdm-1.10.6-4.el7.x86_64.rpm is not installed | ||
+ | (1/4): lightdm-1.10.6-4.el7.x86_64.rpm | ||
+ | (2/4): lightdm-gobject-1.10.6-4.el7.x86_64.rpm | ||
+ | (3/4): lightdm-gtk-1.8.5-19.el7.x86_64.rpm | ||
+ | (4/4): lightdm-gtk-common-1.8.5-19.el7.noarch.rpm | ||
+ | -------------------------------------------------------------------------------- | ||
+ | Total 179 kB/s | 362 kB 00:02 | ||
+ | Retrieving key from file:/// | ||
+ | Importing GPG key 0x352C64E5: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | Running transaction check | ||
+ | Running transaction test | ||
+ | Transaction test succeeded | ||
+ | Running transaction | ||
+ | Installing : lightdm-gobject-1.10.6-4.el7.x86_64 | ||
+ | Installing : lightdm-gtk-common-1.8.5-19.el7.noarch | ||
+ | Installing : lightdm-1.10.6-4.el7.x86_64 | ||
+ | Installing : lightdm-gtk-1.8.5-19.el7.x86_64 | ||
+ | Verifying | ||
+ | Verifying | ||
+ | Verifying | ||
+ | Verifying | ||
- | ===ide/ | + | Installed: |
+ | lightdm.x86_64 0: | ||
- | Ce répertoire contient des répertoires dans lesquels se trouvent des informations sur la capacité, le type et la géométrie des disques. | + | Dependency Installed: |
+ | lightdm-gobject.x86_64 0: | ||
- | ===acpi=== | + | Complete! |
+ | </ | ||
- | Ce répertoire contient des informations sur la gestion | + | Le fichier |
- | + | ||
- | ===bus=== | + | |
- | + | ||
- | Ce répertoire contient un sous-répertoire par bus. | + | |
- | + | ||
- | ===net=== | + | |
- | + | ||
- | Ce répertoire contient des informations sur le réseau. | + | |
- | + | ||
- | ===sys=== | + | |
- | + | ||
- | Ce répertoire contient des paramètres du noyau. Certains des fichiers dans ce répertoire sont accessibles en écriture par root en temps réel. Par exemple pour éviter des attaques réseau | + | |
- | + | ||
- | # echo 1 > /proc/sys/net/ | + | |
- | + | ||
- | Cette commande a pour résultat d' | + | |
- | + | ||
- | ===La commande sysctl=== | + | |
- | + | ||
- | Les fichiers dans le répertoire **/ | + | |
- | + | ||
- | La commande **sysctl** applique les règles consignés dans le fichier **/ | + | |
- | + | ||
- | Saisissez la commande | + | |
< | < | ||
- | [root@centos7 ~]# cat /etc/sysctl.conf | + | [root@centos7 ~]# cat /etc/lightdm/ |
- | # System | + | # |
- | # To override those settings, enter new settings here, or in an /etc/sysctl.d/< | + | # General configuration |
+ | # | ||
+ | # start-default-seat = True to always start one seat if none are defined in the configuration | ||
+ | # greeter-user = User to run greeter as | ||
+ | # minimum-display-number = Minimum display number to use for X servers | ||
+ | # minimum-vt = First VT to run displays on | ||
+ | # lock-memory = True to prevent memory from being paged to disk | ||
+ | # user-authority-in-system-dir = True if session authority should be in the system location | ||
+ | # guest-account-script = Script to be run to setup guest account | ||
+ | # logind-load-seats = True to automatically set up multi-seat configuration from logind | ||
+ | # logind-check-graphical = True to on start seats that are marked as graphical by logind | ||
+ | # log-directory = Directory to log information to | ||
+ | # run-directory = Directory to put running state in | ||
+ | # cache-directory = Directory to cache to | ||
+ | # sessions-directory = Directory to find sessions | ||
+ | # remote-sessions-directory = Directory to find remote sessions | ||
+ | # greeters-directory = Directory to find greeters | ||
+ | # backup-logs = True to move add a .old suffix to old log files when opening new ones | ||
# | # | ||
- | # For more information, | + | [LightDM] |
+ | #start-default-seat=true | ||
+ | # | ||
+ | # | ||
+ | minimum-vt=1 | ||
+ | # | ||
+ | user-authority-in-system-dir=true | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
- | [root@centos7 ~]# cat / | ||
- | # Kernel sysctl configuration file | ||
# | # | ||
- | # For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and | + | # Seat defaults |
- | # sysctl.conf(5) for more details. | + | # |
+ | # type = Seat type (xlocal, xremote) | ||
+ | # xdg-seat = Seat name to set pam_systemd XDG_SEAT variable and name to pass to X server | ||
+ | # pam-service = PAM service to use for login | ||
+ | # pam-autologin-service = PAM service to use for autologin | ||
+ | # pam-greeter-service = PAM service to use for greeters | ||
+ | # xserver-command = X server command to run (can also contain arguments e.g. X -special-option) | ||
+ | # xmir-command = Xmir server command to run (can also contain arguments e.g. Xmir -special-option) | ||
+ | # xserver-layout = Layout to pass to X server | ||
+ | # xserver-config = Config file to pass to X server | ||
+ | # xserver-allow-tcp = True if TCP/IP connections are allowed to this X server | ||
+ | # xserver-share = True if the X server is shared for both greeter | ||
+ | # xserver-hostname = Hostname of X server (only for type=xremote) | ||
+ | # xserver-display-number = Display number of X server (only for type=xremote) | ||
+ | # xdmcp-manager = XDMCP manager to connect to (implies xserver-allow-tcp=true) | ||
+ | # xdmcp-port = XDMCP UDP/IP port to communicate on | ||
+ | # xdmcp-key = Authentication key to use for XDM-AUTHENTICATION-1 (stored in keys.conf) | ||
+ | # unity-compositor-command = Unity compositor command to run (can also contain arguments e.g. unity-system-compositor -special-option) | ||
+ | # unity-compositor-timeout = Number of seconds to wait for compositor to start | ||
+ | # greeter-session = Session to load for greeter | ||
+ | # greeter-hide-users = True to hide the user list | ||
+ | # greeter-allow-guest = True if the greeter should show a guest login option | ||
+ | # greeter-show-manual-login = True if the greeter should offer a manual login option | ||
+ | # greeter-show-remote-login = True if the greeter should offer a remote login option | ||
+ | # user-session = Session to load for users | ||
+ | # allow-user-switching = True if allowed to switch users | ||
+ | # allow-guest = True if guest login is allowed | ||
+ | # guest-session = Session to load for guests (overrides user-session) | ||
+ | # session-wrapper = Wrapper script to run session with | ||
+ | # greeter-wrapper = Wrapper script to run greeter with | ||
+ | # guest-wrapper = Wrapper script to run guest sessions with | ||
+ | # display-setup-script = Script to run when starting a greeter session (runs as root) | ||
+ | # display-stopped-script = Script to run after stopping the display server (runs as root) | ||
+ | # greeter-setup-script = Script to run when starting a greeter (runs as root) | ||
+ | # session-setup-script = Script to run when starting a user session (runs as root) | ||
+ | # session-cleanup-script = Script to run when quitting a user session (runs as root) | ||
+ | # autologin-guest = True to log in as guest by default | ||
+ | # autologin-user = User to log in with by default (overrides autologin-guest) | ||
+ | # autologin-user-timeout = Number of seconds to wait before loading default user | ||
+ | # autologin-session = Session to load for automatic login (overrides user-session) | ||
+ | # autologin-in-background = True if autologin session should not be immediately activated | ||
+ | # exit-on-failure = True if the daemon should exit if this seat fails | ||
+ | # | ||
+ | [SeatDefaults] | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | xserver-command=X -background none | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | greeter-session=lightdm-greeter | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | session-wrapper=/ | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
- | # Disable netfilter on bridges. | + | # |
- | net.bridge.bridge-nf-call-ip6tables = 0 | + | # Seat configuration |
- | net.bridge.bridge-nf-call-iptables = 0 | + | # |
- | net.bridge.bridge-nf-call-arptables = 0 | + | # Each seat must start with " |
+ | # Uses settings from [SeatDefaults], | ||
+ | # | ||
+ | #[Seat:0] | ||
- | # Controls the maximum shared segment size, in bytes | + | # |
- | kernel.shmmax | + | # XDMCP Server configuration |
+ | # | ||
+ | # enabled = True if XDMCP connections should be allowed | ||
+ | # port = UDP/IP port to listen for connections on | ||
+ | # listen-address = Host/ | ||
+ | # key = Authentication key to use for XDM-AUTHENTICATION-1 or blank to not use authentication (stored | ||
+ | # | ||
+ | # The authentication key is a 56 bit DES key specified in hex as 0xnnnnnnnnnnnnnn. | ||
+ | # it can be a word and the first 7 characters are used as the key. | ||
+ | # | ||
+ | [XDMCPServer] | ||
+ | # | ||
+ | #port=177 | ||
+ | # | ||
+ | #key= | ||
- | # Controls the maximum number of shared memory segments, in pages | ||
- | |||
- | [root@centos7 ~]# ls -l / | ||
- | total 0 | ||
- | lrwxrwxrwx. 1 root root 14 Jun 4 09:54 99-sysctl.conf -> ../ | ||
- | |||
- | [root@centos7 ~]# cat / | ||
- | # System default settings live in / | ||
- | # To override those settings, enter new settings here, or in an / | ||
# | # | ||
- | # For more information, | + | # VNC Server configuration |
+ | # | ||
+ | # enabled = True if VNC connections should be allowed | ||
+ | # command = Command to run Xvnc server with | ||
+ | # port = TCP/IP port to listen for connections on | ||
+ | # listen-address = Host/ | ||
+ | # width = Width of display to use | ||
+ | # height = Height of display to use | ||
+ | # depth = Color depth of display to use | ||
+ | # | ||
+ | [VNCServer] | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | #depth=8 | ||
</ | </ | ||
- | ==Options | + | La configuration |
- | + | ||
- | Les options | + | |
< | < | ||
- | [root@centos7 ~]# sysctl | + | [root@centos7 ~]# cat / |
- | + | # | |
- | Usage: | + | # background |
- | | + | # theme-name = GTK+ theme to use |
- | + | # icon-theme-name = Icon theme to use | |
- | Options: | + | # font-name = Font to use |
- | | + | # xft-antialias = Whether |
- | -A alias of -a | + | # xft-dpi = Resolution for Xft in dots per inch (e.g. 96) |
- | -X alias of -a | + | # xft-hintstyle = What degree of hinting to use (none, slight, medium, or hintfull) |
- | --deprecated | + | # xft-rgba = Type of subpixel antialiasing (none, rgb, bgr, vrgb or vbgr) |
- | -b, --binary | + | # show-indicators = semi-colon ";" |
- | -e, --ignore | + | # show-clock (true or false) |
- | -N, --names | + | # clock-format = strftime-format string, e.g. %H:%M |
- | -n, --values | + | # keyboard = command to launch on-screen keyboard |
- | | + | # position = main window position: x y |
- | -f alias of -p | + | # default-user-image = Image used as default user icon, path or #icon-name |
- | --system | + | # screensaver-timeout = Timeout (in seconds) until the screen blanks when the greeter is called as lockscreen |
- | -r, --pattern < | + | # |
- | select setting that match expression | + | [greeter] |
- | -q, --quiet do not echo variable set | + | background=/ |
- | -w, --write enable writing a value to variable | + | #theme-name= |
- | -o does nothing | + | #icon-theme-name= |
- | -x does nothing | + | #font-name= |
- | -d alias of -h | + | #xft-antialias= |
- | + | #xft-dpi= | |
- | -h, --help | + | #xft-hintstyle= |
- | -V, --version | + | #xft-rgba= |
- | + | #show-indicators= | |
- | For more details see sysctl(8). | + | #show-clock= |
+ | #clock-format= | ||
+ | #keyboard= | ||
+ | # | ||
+ | # | ||
</ | </ | ||
- | <WRAP center round important> | + | =====X.orgX11===== |
- | **Important** : Consultez la page de la traduction du manuel de **sysctl** **[[http:// | + | |
- | </ | + | |
- | ====Fichiers==== | + | ====Présentation==== |
- | ===Processeur=== | + | L' |
< | < | ||
- | [root@centos7 ~]# cat /proc/cpuinfo | + | [root@centos7 ~]# whereis Xorg |
- | processor : 0 | + | Xorg: /usr/bin/Xorg / |
- | vendor_id : GenuineIntel | + | |
- | cpu family : 6 | + | |
- | model : 55 | + | |
- | model name : Intel(R) Celeron(R) CPU N2840 @ 2.16GHz | + | |
- | stepping : 8 | + | |
- | microcode : 0x19 | + | |
- | cpu MHz : 2167.721 | + | |
- | cache size : 6144 KB | + | |
- | physical id : 0 | + | |
- | siblings : | + | |
- | core id : 0 | + | |
- | cpu cores : 1 | + | |
- | apicid : 0 | + | |
- | initial apicid : 0 | + | |
- | fpu : yes | + | |
- | fpu_exception : | + | |
- | cpuid level : 5 | + | |
- | wp : yes | + | |
- | flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc rep_good nopl pni monitor ssse3 lahf_lm | + | |
- | bogomips : 4335.44 | + | |
- | clflush size : 64 | + | |
- | cache_alignment : | + | |
- | address sizes : 36 bits physical, 48 bits virtual | + | |
- | power management: | + | |
</ | </ | ||
- | ===Interruptions système=== | + | Les modules de **X.orgX11** sont installés par défaut dans **/ |
< | < | ||
- | [root@centos7 ~]# cat /proc/interrupts | + | [root@centos7 ~]# ls -lR /usr/lib64/xorg |
- | CPU0 | + | / |
- | 0: | + | total 36 |
- | | + | drwxr-xr-x. 5 root root 4096 Jun 4 10:00 modules |
- | | + | -rw-r--r--. 1 root root 31246 Apr 10 2015 protocol.txt |
- | 9: | + | |
- | 12: 22452 IO-APIC-edge i8042 | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | NMI: 0 | + | |
- | LOC: 1630315 | + | |
- | SPU: 0 | + | |
- | PMI: 0 | + | |
- | IWI: 83206 IRQ work interrupts | + | |
- | RTR: 0 APIC ICR read retries | + | |
- | RES: 0 | + | |
- | CAL: 0 | + | |
- | TLB: 0 TLB shootdowns | + | |
- | TRM: 0 | + | |
- | THR: 0 | + | |
- | MCE: 0 | + | |
- | MCP: | + | |
- | ERR: 0 | + | |
- | MIS: 0 | + | |
- | </ | + | |
- | <WRAP center round important> | + | / |
- | **Important** | + | total 776 |
- | </ | + | drwxr-xr-x. 2 root root 4096 Jun 4 15:33 drivers |
+ | drwxr-xr-x. 2 root root 22 Jun 4 10:00 extensions | ||
+ | drwxr-xr-x. 2 root root 106 Jun 4 10:02 input | ||
+ | -rwxr-xr-x. 1 root root 99568 Apr 10 2015 libexa.so | ||
+ | -rwxr-xr-x. 1 root root 20016 Apr 10 2015 libfbdevhw.so | ||
+ | -rwxr-xr-x. 1 root root 153528 Apr 10 2015 libfb.so | ||
+ | -rwxr-xr-x. 1 root root 19952 Mar 6 2015 libglamoregl.so | ||
+ | -rwxr-xr-x. 1 root root 150992 Apr 10 2015 libint10.so | ||
+ | -rwxr-xr-x. 1 root root 36552 Apr 10 2015 libshadowfb.so | ||
+ | -rwxr-xr-x. 1 root root 36248 Apr 10 2015 libshadow.so | ||
+ | -rwxr-xr-x. 1 root root 28232 Apr 10 2015 libvbe.so | ||
+ | -rwxr-xr-x. 1 root root 33576 Apr 10 2015 libvgahw.so | ||
+ | -rwxr-xr-x. 1 root root 198568 Apr 10 2015 libwfb.so | ||
- | ===Canaux DMA=== | + | / |
+ | total 2616 | ||
+ | -rwxr-xr-x. 1 root root 11296 Mar 6 2015 ati_drv.so | ||
+ | -rwxr-xr-x. 1 root root 20408 Jun 9 2014 dummy_drv.so | ||
+ | -rwxr-xr-x. 1 root root 24648 Jun 10 2014 fbdev_drv.so | ||
+ | -rwxr-xr-x. 1 root root 1501152 Mar 6 2015 intel_drv.so | ||
+ | -rwxr-xr-x. 1 root root 50472 Jun 9 2014 modesetting_drv.so | ||
+ | -rwxr-xr-x. 1 root root 211080 Jun 10 2014 nouveau_drv.so | ||
+ | -rwxr-xr-x. 1 root root 181560 Mar 11 2015 qxl_drv.so | ||
+ | -rwxr-xr-x. 1 root root 438848 Mar 6 2015 radeon_drv.so | ||
+ | -rwxr-xr-x. 1 root root 24216 Jun 9 2014 v4l_drv.so | ||
+ | lrwxrwxrwx. 1 root root 50 Jun 4 15:33 vboxvideo_drv.so -> / | ||
+ | -rwxr-xr-x. 1 root root 28936 Jun 10 2014 vesa_drv.so | ||
+ | -rwxr-xr-x. 1 root root 162008 Mar 6 2015 vmware_drv.so | ||
- | < | + | /usr/lib64/ |
- | [root@centos7 ~]# cat /proc/dma | + | total 296 |
- | 4: cascade | + | -rwxr-xr-x. 1 root root 302520 Apr 10 2015 libglx.so |
- | </ | + | |
- | ===Plages d' | + | /usr/lib64/xorg/ |
- | + | total 276 | |
- | < | + | -rwxr-xr-x. 1 root root 58776 Jun 10 2014 evdev_drv.so |
- | [root@centos7 ~]# cat /proc/ioports | more | + | -rwxr-xr-x. 1 root root 70464 Mar 6 2015 synaptics_drv.so |
- | 0000-001f | + | -rwxr-xr-x. 1 root root 20144 Jun 10 2014 vmmouse_drv.so |
- | 0020-0021 : pic1 | + | -rwxr-xr-x. 1 root root 11440 Jun 10 2014 void_drv.so |
- | 0040-0043 : timer0 | + | -rwxr-xr-x. 1 root root 113864 Jun 10 2014 wacom_drv.so |
- | 0050-0053 : timer1 | + | |
- | 0060-0060 : keyboard | + | |
- | 0064-0064 : keyboard | + | |
- | 0070-0071 : rtc_cmos | + | |
- | 0070-0071 : rtc0 | + | |
- | 0080-008f : dma page reg | + | |
- | 00a0-00a1 : pic2 | + | |
- | 00c0-00df : dma2 | + | |
- | 00f0-00ff : fpu | + | |
- | 0170-0177 : 0000:00:01.1 | + | |
- | 0170-0177 : ata_piix | + | |
- | 01f0-01f7 : 0000:00:01.1 | + | |
- | 01f0-01f7 : ata_piix | + | |
- | 0376-0376 : 0000:00:01.1 | + | |
- | 0376-0376 : ata_piix | + | |
- | 03c0-03df : vga+ | + | |
- | 03f6-03f6 : 0000:00:01.1 | + | |
- | 03f6-03f6 : ata_piix | + | |
- | 0cf8-0cff : PCI conf1 | + | |
- | 4000-4003 : ACPI PM1a_EVT_BLK | + | |
- | --More-- | + | |
</ | </ | ||
- | <WRAP center round alert 60%> | + | Sous RHEL/CentOS 7 les paquets X.orgX11 installés peuvent être trouvés en utilisant la commande suivante : |
- | Si deux périphériques ont le même port, les **deux** périphériques seront inutilisables. | + | |
- | </ | + | |
- | + | ||
- | ===Périphériques=== | + | |
< | < | ||
- | [root@centos7 ~]# cat / | + | [root@centos7 ~]# rpm -qa | grep xorg |
- | Character devices: | + | xorg-x11-drv-intel-2.99.916-5.el7.x86_64 |
- | 1 mem | + | xorg-x11-fonts-Type1-7.5-9.el7.noarch |
- | 4 /dev/vc/0 | + | abrt-addon-xorg-2.1.11-19.el7.centos.0.3.x86_64 |
- | 4 tty | + | xorg-x11-utils-7.5-13.1.el7.x86_64 |
- | 4 ttyS | + | xorg-x11-drv-void-1.4.0-23.el7.x86_64 |
- | 5 /dev/tty | + | xorg-x11-drv-dummy-0.3.6-15.el7.x86_64 |
- | 5 / | + | xorg-x11-drv-fbdev-0.4.3-15.el7.x86_64 |
- | 5 /dev/ptmx | + | xorg-x11-drv-evdev-2.8.2-5.el7.x86_64 |
- | 6 lp | + | xorg-x11-glamor-0.6.0-2.20140918git347ef4f.el7.x86_64 |
- | 7 vcs | + | xorg-x11-drv-qxl-0.1.1-12.el7.x86_64 |
- | 10 misc | + | xorg-x11-server-utils-7.7-4.el7.x86_64 |
- | | + | xorg-x11-drivers-7.7-6.el7.x86_64 |
- | | + | xorg-x11-drv-modesetting-0.8.0-13.el7.x86_64 |
- | 29 fb | + | xorg-x11-xinit-1.3.2-14.el7.x86_64 |
- | 99 ppdev | + | xorg-x11-drv-ati-7.4.0-1.20140918git56c7fb8.el7.x86_64 |
- | 116 alsa | + | xorg-x11-xauth-1.0.7-6.1.el7.x86_64 |
- | 128 ptm | + | xorg-x11-drv-vesa-2.3.2-14.el7.x86_64 |
- | 136 pts | + | xorg-x11-font-utils-7.5-18.1.el7.x86_64 |
- | 162 raw | + | xorg-x11-server-common-1.15.0-33.el7_1.x86_64 |
- | 180 usb | + | xorg-x11-drv-vmware-13.0.2-1.el7.x86_64 |
- | 188 ttyUSB | + | xorg-x11-drv-vmmouse-13.0.0-10.el7.x86_64 |
- | 189 usb_device | + | xorg-x11-server-Xorg-1.15.0-33.el7_1.x86_64 |
- | 202 cpu/msr | + | xorg-x11-drv-wacom-0.23.0-6.el7.x86_64 |
- | 203 cpu/cpuid | + | xorg-x11-drv-nouveau-1.0.10-5.el7.x86_64 |
- | 226 drm | + | xorg-x11-drv-synaptics-1.7.1-13.el7.x86_64 |
- | 250 hidraw | + | xorg-x11-xkb-utils-7.7-9.1.el7.x86_64 |
- | 251 usbmon | + | xorg-x11-drv-v4l-0.2.0-35.el7.x86_64 |
- | 252 bsg | + | |
- | 253 watchdog | + | |
- | 254 rtc | + | |
- | + | ||
- | Block devices: | + | |
- | 259 blkext | + | |
- | 8 sd | + | |
- | | + | |
- | 11 sr | + | |
- | 65 sd | + | |
- | 66 sd | + | |
- | 67 sd | + | |
- | 68 sd | + | |
- | 69 sd | + | |
- | 70 sd | + | |
- | 71 sd | + | |
- | 128 sd | + | |
- | 129 sd | + | |
- | 130 sd | + | |
- | 131 sd | + | |
- | 132 sd | + | |
- | 133 sd | + | |
- | 134 sd | + | |
- | 135 sd | + | |
- | 253 device-mapper | + | |
- | 254 mdp | + | |
</ | </ | ||
- | ===Modules=== | + | ====Démarrage et Arrêt==== |
- | < | + | Les distributions RHEL ont historiquement utilisés les niveaux d' |
- | [root@centos7 ~]# cat /proc/modules | more | + | |
- | tcp_lp 12663 0 - Live 0xffffffffa059d000 | + | |
- | lp 17759 0 - Live 0xffffffffa0593000 | + | |
- | nls_utf8 12557 1 - Live 0xffffffffa0527000 | + | |
- | isofs 39844 1 - Live 0xffffffffa0588000 | + | |
- | bnep 19704 2 - Live 0xffffffffa0516000 | + | |
- | bluetooth 372662 7 bnep, Live 0xffffffffa052c000 | + | |
- | rfkill 26536 3 bluetooth, Live 0xffffffffa051f000 | + | |
- | fuse 87741 3 - Live 0xffffffffa04ff000 | + | |
- | ip6t_rpfilter 12546 1 - Live 0xffffffffa04fa000 | + | |
- | ip6t_REJECT 12939 2 - Live 0xffffffffa04f5000 | + | |
- | ipt_REJECT 12541 2 - Live 0xffffffffa04f0000 | + | |
- | xt_conntrack 12760 7 - Live 0xffffffffa04e6000 | + | |
- | ebtable_nat 12807 0 - Live 0xffffffffa04e1000 | + | |
- | ebtable_broute 12731 0 - Live 0xffffffffa04eb000 | + | |
- | bridge 115385 1 ebtable_broute, | + | |
- | stp 12976 1 bridge, Live 0xffffffffa04be000 | + | |
- | llc 14552 2 bridge,stp, Live 0xffffffffa04b5000 | + | |
- | ebtable_filter 12827 0 - Live 0xffffffffa04b0000 | + | |
- | ebtables 30913 3 ebtable_nat, | + | |
- | 000 | + | |
- | ip6table_nat 12864 1 - Live 0xffffffffa049e000 | + | |
- | nf_conntrack_ipv6 18738 5 - Live 0xffffffffa0498000 | + | |
- | nf_defrag_ipv6 34651 1 nf_conntrack_ipv6, | + | |
- | --More-- | + | |
- | </code> | + | |
- | ===Statistiques de l' | + | ====Utilisation==== |
- | < | + | Pour interagir avec et contrôler X.orgX11, un utilisateur dispose de plusieurs raccourcis claviers : |
- | [root@centos7 ~]# cat / | + | |
- | 11 0 sr0 21 0 132 157 0 0 0 0 0 157 157 | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | </ | + | |
- | ===Partitions=== | + | ^ Raccourci |
+ | | < | ||
+ | | < | ||
+ | | < | ||
- | < | + | ====Configuration==== |
- | [root@centos7 ~]# cat / | + | |
- | major minor # | + | |
- | 11 0 56876 sr0 | + | <WRAP center round important> |
- | 8 0 | + | **Important** : Notez que X.orgX11 s' |
- | | + | </WRAP> |
- | | + | |
- | | + | |
- | </code> | + | |
- | ===Espaces | + | Un fichier |
- | <code> | + | <file> |
- | [root@centos7 ~]# cat /proc/swaps | + | Section " |
- | Filename Type Size Used Priority | + | Identifier |
- | / | + | |
- | </ | + | |
+ | EndSection | ||
- | ===Statistiques d' | + | Section " |
+ | BoardName | ||
+ | Driver | ||
+ | Identifier | ||
+ | VendorName | ||
+ | EndSection | ||
- | < | + | Section " |
- | [root@centos7 ~]# cat / | + | |
- | 1.82 1.07 0.81 3/379 25349 | + | Depth 24 |
- | </code> | + | EndSubSection |
+ | Device | ||
+ | | ||
+ | Monitor | ||
+ | EndSection | ||
+ | </file> | ||
- | ===Statistiques d' | + | Des applications tierces peuvent déposer des fichiers |
< | < | ||
- | [root@centos7 ~]# cat /proc/meminfo | + | [root@centos7 ~]# ls -l /usr/ |
- | MemTotal: | + | total 24 |
- | MemFree: | + | -rw-r--r--. 1 root root 1099 Apr 10 2015 10-evdev.conf |
- | MemAvailable: | + | -rw-r--r--. 1 root root 1867 Apr 10 2015 10-quirks.conf |
- | Buffers: | + | -rw-r--r--. 1 root root 1704 Mar 6 2015 50-synaptics.conf |
- | Cached: | + | -rw-r--r--. 1 root root 115 Jun 10 2014 50-vmmouse.conf |
- | SwapCached: | + | -rw-r--r--. 1 root root 835 Jun 10 2014 50-wacom.conf |
- | Active: | + | -rw-r--r--. 1 root root |
- | Inactive: | + | |
- | Active(anon): | + | |
- | Inactive(anon): | + | |
- | Active(file): | + | |
- | Inactive(file): | + | |
- | Unevictable: | + | |
- | Mlocked: | + | |
- | SwapTotal: | + | |
- | SwapFree: | + | |
- | Dirty: | + | |
- | Writeback: | + | |
- | AnonPages: | + | |
- | Mapped: | + | |
- | Shmem: | + | |
- | Slab: 98304 kB | + | |
- | SReclaimable: | + | |
- | SUnreclaim: | + | |
- | KernelStack: | + | |
- | PageTables: | + | |
- | NFS_Unstable: | + | |
- | Bounce: | + | |
- | WritebackTmp: | + | |
- | CommitLimit: | + | |
- | Committed_AS: | + | |
- | VmallocTotal: | + | |
- | VmallocUsed: | + | |
- | VmallocChunk: | + | |
- | HardwareCorrupted: | + | |
- | AnonHugePages: | + | |
- | HugePages_Total: | + | |
- | HugePages_Free: | + | |
- | HugePages_Rsvd: | + | |
- | HugePages_Surp: | + | |
- | Hugepagesize: | + | |
- | DirectMap4k: | + | |
- | DirectMap2M: | + | |
</ | </ | ||
- | ===Version du noyau=== | + | <WRAP center round important> |
+ | **Important** : Les fichiers dans le répertoire **xorg.conf.d** sont numérotés. L' | ||
+ | </ | ||
- | < | + | Les fichiers de configuration contiennent des sections. Chaque section commence par une directive **Section** |
- | [root@centos7 ~]# cat / | + | |
- | Linux version 3.10.0-229.4.2.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Wed May 13 10:06:09 UTC 2015 | + | |
- | </ | + | |
- | ==== Interprétation des informations dans /proc==== | + | < |
+ | Section " | ||
+ | ... | ||
+ | </file> | ||
- | Les informations brutes stockées dans /proc peuvent être interprétées grâce à l' | + | et se termine par une directive **EndSection** |
- | * free, | + | < |
- | * uptime et w, | + | ... |
- | * iostat, | + | EndSection |
- | * vmstat, | + | </ |
- | * mpstat, | + | |
- | * sar. | + | |
- | ===Commandes=== | + | Dans chaque section se trouvent des lignes comprennant une **Option** suivi d'une ou de plusieurs **Valeurs** : |
- | ==free== | + | < |
+ | Identifier | ||
+ | </ | ||
- | La commande | + | <WRAP center round important> |
+ | **A faire** : Notez que la valeur est entourée | ||
+ | </ | ||
- | < | + | Certaines options sont des booléenes. Les valeurs admises sont : |
- | [root@centos7 ~]# free -m | + | |
- | total used free shared | + | |
- | Mem: 1749 | + | |
- | Swap: 2999 | + | |
- | </ | + | |
- | Dans le cas de cet exemple, nous pouvons constater que l’affichage montre | + | * **Vrai** : 1, on, true, yes, |
+ | * **Faux** | ||
- | * 1749 Mo de mémoire physique totale, | + | ===La Section ServerFlags=== |
- | * 859 Mo de mémoire physique utilisée et 76 Mo de mémoire physique libre, | + | |
- | * 2999 Mo de mémoire swap totale et 3 Mo de swap utilisé | + | |
- | Les options de cette commande sont : | + | Cette section optionnelle contient des directives globales. Cependant les valeurs attribuées ici peuvent être modifiées par les valeurs des directives dans la section **ServerLayout**. |
- | < | + | Un exemple de cette section est : |
- | [root@centos7 ~]# free --help | + | |
- | Usage: | + | < |
- | free [options] | + | Section " |
+ | Option " | ||
+ | EndSection | ||
+ | </ | ||
- | Options: | + | Les directives les plus courantes dans cette section sont : |
- | -b, --bytes | + | |
- | -k, --kilo | + | |
- | -m, --mega | + | |
- | -g, --giga | + | |
- | | + | |
- | -h, --human | + | |
- | | + | |
- | -l, --lohi | + | |
- | -t, --total | + | |
- | -s N, --seconds N | + | |
- | -c N, --count N | + | |
- | -w, --wide | + | |
- | --help | + | ^ Directive |
- | -V, --version | + | | " |
+ | | " | ||
- | For more details see free(1). | + | ===La Section ServerLayout=== |
- | </ | + | |
- | ==uptime ou w== | + | Cette section regroupe les informations concernant les périphériques en entrée et les périphériques en sortie. |
- | Chacune des ces commandes indique la charge moyenne du ou des processeurs depuis 1 minute, 5 minutes et 15 minutes | + | Un exemple de cette section est : |
- | <code> | + | <file> |
- | [root@centos7 ~]# uptime | + | Section |
- | 14:43:46 up 4:05, 2 users, | + | Identifier |
+ | Screen | ||
+ | InputDevice | ||
+ | InputDevice | ||
+ | EndSection | ||
+ | </ | ||
- | [root@centos7 ~]# w | + | Les directives les plus courantes dans cette section sont : |
- | 14:43:49 up 4:05, 2 users, | + | |
- | USER | + | |
- | trainee | + | |
- | trainee | + | |
- | </ | + | |
- | Les valeurs **load average** ou //charge moyenne// indiquent le nombre moyen de processus en cours de traitement ou en attente pour la période concernée. | + | ^ Directive |
- | + | | " | |
- | Par exemple si les valeurs sur un système muni d'un seul processeur étaient **3, | + | | " |
- | + | | " | |
- | * 2,48 processus en attente | + | | " |
- | * 3,00 processus en attente dans les dernières 5 minutes, | + | |
- | * 2,85 processus en attente dans les dernières 15 minutes. | + | |
- | + | ||
- | Les options de ces commandes sont : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# uptime --help | + | |
- | + | ||
- | Usage: | + | |
- | | + | |
- | + | ||
- | Options: | + | |
- | -p, --pretty | + | |
- | -h, --help | + | |
- | -s, --since | + | |
- | -V, --version | + | |
- | + | ||
- | For more details see uptime(1). | + | |
- | + | ||
- | [root@centos7 ~]# w --help | + | |
- | + | ||
- | Usage: | + | |
- | w [options] | + | |
- | + | ||
- | Options: | + | |
- | -h, --no-header | + | |
- | -u, --no-current | + | |
- | -s, --short | + | |
- | -f, --from | + | |
- | -o, --old-style | + | |
- | -i, --ip-addr | + | |
- | + | ||
- | | + | |
- | -V, --version | + | |
- | + | ||
- | For more details see w(1). | + | |
- | </code> | + | |
- | + | ||
- | ==iostat== | + | |
- | + | ||
- | La commande **iostat** affiche des statistiques sur l'utilisation des disques, des terminaux et des lecteurs | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# iostat | + | |
- | Linux 3.10.0-229.4.2.el7.x86_64 (centos7.fenestros.loc) 11/02/2015 _x86_64_ (1 CPU) | + | |
- | + | ||
- | avg-cpu: | + | |
- | | + | |
- | + | ||
- | Device: | + | |
- | scd0 0.00 | + | |
- | sda | + | |
- | </ | + | |
- | + | ||
- | Au-dessous de la première ligne indiquant la version | + | |
- | + | ||
- | * Pourcentage | + | |
- | * Pourcentage de temps passé en mode utilisateur (pour les processus qui ont modifié leur priorité de programmation à l'aide de la commande nice) | + | |
- | | + | |
- | | + | |
- | + | ||
- | Notez la valeur de **%iowait**. Dans le cas où ce pourcentage est trop élévé, ceci indique que le processeur passe son temps à attendre les entrées et les sorties de disque. | + | |
- | + | ||
- | Pour surveiller la vitesse des entrées et des sorties du disque, vous pouvez utiliser la commande **hdparm**. | + | |
- | + | ||
- | Sous RHEL/CentOS 7, la commande **hdparm** n' | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# yum install hdparm | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# hdparm -t /dev/sda | + | |
- | + | ||
- | /dev/sda: | + | |
- | | + | |
- | </ | + | |
- | + | ||
- | Au-dessous du rapport d' | + | |
- | + | ||
- | * La spécification du périphérique, | + | |
- | * Le nombre de transferts (ou opérations d'E/S) par seconde. | + | |
- | * Le nombre de blocs de 512 octets lus par seconde. | + | |
- | * Le nombre de blocs de 512 octets écrits par seconde. | + | |
- | * Le nombre total de blocs de 512 octets lus par seconde. | + | |
- | * Le nombre total de blocs de 512 octets écrits par seconde. | + | |
- | + | ||
- | Les options de cette commande sont : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# iostat --help | + | |
- | Usage: iostat [ options ] [ < | + | |
- | Options are: | + | |
- | [ -c ] [ -d ] [ -h ] [ -k | -m ] [ -N ] [ -t ] [ -V ] [ -x ] [ -y ] [ -z ] | + | |
- | [ -j { ID | LABEL | PATH | UUID | ... } ] | + | |
- | [ [ -T ] -g < | + | |
- | [ < | + | |
- | </ | + | |
- | + | ||
- | ==vmstat== | + | |
- | + | ||
- | La commande **vmstat** affiche des statistiques | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# vmstat 1 10 | + | |
- | procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | </ | + | |
- | + | ||
- | La première ligne subdivise le champ en six catégories à savoir : processus, mémoire, swap, E/S, système et CPU sur lesquelles elle donne des statistiques. La seconde ligne identifie de manière encore plus détaillée chacun des champs, permettant ainsi de parcourir simplement et rapidement l' | + | |
- | + | ||
- | Les champs relatifs aux processus sont les suivants : | + | |
- | + | ||
- | * r — Le nombre de processus exécutables attendant d' | + | |
- | * b — Le nombre de processus exécutables | + | |
- | + | ||
- | Les champs relatifs à la mémoire sont les suivants : | + | |
- | + | ||
- | * swpd — La quantité de mémoire virtuelle utilisée | + | |
- | * free — La quantité de mémoire libre | + | |
- | * buff — La quantité de mémoire utilisée par les tampons (ou buffers) | + | |
- | * cache — La quantité de mémoire utilisée comme cache de pages | + | |
- | + | ||
- | Les champs relatifs au swap sont les suivants : | + | |
- | + | ||
- | * si — La quantité de mémoire chargée depuis le disque | + | |
- | * so — La quantité de mémoire déchargée sur le disque | + | |
- | + | ||
- | Les champs relatifs aux Entrées/ | + | |
- | + | ||
- | * bi — Blocs envoyés vers un périphérique blocs | + | |
- | * bo— Blocs reçus d'un périphérique blocs | + | |
- | + | ||
- | Les champs relatifs au système sont les suivants : | + | |
- | + | ||
- | * in — Nombre d' | + | |
- | * cs — Nombre de changements de contexte par seconde | + | |
- | + | ||
- | Les champs relatifs au CPU sont les suivants : | + | |
- | + | ||
- | * us — Le pourcentage de temps pendant lequel le CPU exécute un code de niveau utilisateur | + | |
- | * sy — Le pourcentage de temps pendant lequel le CPU exécute un code de niveau système | + | |
- | * id — Le pourcentage de temps pendant lequel le CPU était inoccupé | + | |
- | * wa — Attente d' | + | |
- | + | ||
- | Les options de cette commande sont : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# vmstat --help | + | |
- | + | ||
- | Usage: | + | |
- | | + | |
- | + | ||
- | Options: | + | |
- | -a, --active | + | |
- | -f, --forks | + | |
- | -m, --slabs | + | |
- | -n, --one-header | + | |
- | -s, --stats | + | |
- | -d, --disk | + | |
- | -D, --disk-sum | + | |
- | -p, --partition < | + | |
- | -S, --unit < | + | |
- | -w, --wide | + | |
- | -t, --timestamp | + | |
- | + | ||
- | -h, --help | + | |
- | -V, --version | + | |
- | + | ||
- | For more details see vmstat(8). | + | |
- | </ | + | |
<WRAP center round important> | <WRAP center round important> | ||
- | **Important** : Par défaut | + | **Important** : Le fichier de configuration peut contenir deux ou plusieurs sections ServerLayout. Seule la première sera prise en compte. |
</ | </ | ||
- | ==mpstat== | + | ===La Section Files=== |
- | La commande **mpstat** affiche des statistiques détaillées sur le CPU : | + | Cette section regroupe les informations concernant les fichiers de configuration supplémentaires. |
- | < | + | Un exemple de cette section est : |
- | [root@centos7 ~]# mpstat | + | |
- | Linux 3.10.0-229.4.2.el7.x86_64 (centos7.fenestros.loc) 11/02/2015 _x86_64_ (1 CPU) | + | |
- | 03:19:32 PM CPU %usr %nice %sys %iowait | + | < |
- | 03:19:32 PM all 9.38 0.14 2.52 0.31 0.00 0.24 0.00 0.00 0.00 87.42 | + | Section " |
- | </code> | + | RgbPath |
+ | FontPath | ||
+ | EndSection | ||
+ | </file> | ||
- | Dans le cas où vous avez plusieurs processeurs ou coeurs, vous pouvez visualiser ces mêmes informations par unité de traitement | + | Les directives les plus courantes dans cette section sont : |
- | < | + | ^ Directive |
- | [root@centos7 ~]# mpstat -P ALL | + | | " |
- | Linux 3.10.0-229.4.2.el7.x86_64 (centos7.fenestros.loc) 11/02/2015 _x86_64_ (1 CPU) | + | | " |
- | + | | " | |
- | 03:20:06 PM CPU %usr %nice %sys %iowait | + | |
- | 03:20:06 PM all 9.42 0.14 2.53 0.31 0.00 0.24 0.00 0.00 0.00 87.36 | + | |
- | 03:20:06 PM 0 9.42 0.14 2.53 0.31 0.00 0.24 0.00 0.00 0.00 | + | |
- | </ | + | |
- | Pour afficher 5 jeux de statistiques à des intervales de 2 secondes pour tous les unités de traitement, il convient d' | + | Voici le fichier **/ |
< | < | ||
- | [root@centos7 ~]# mpstat -P ALL 2 5 | + | [root@centos7 ~]# more /usr/share/ |
- | Linux 3.10.0-229.4.2.el7.x86_64 (centos7.fenestros.loc) 11/02/2015 _x86_64_ (1 CPU) | + | 255 250 250 snow |
- | + | 248 248 255 ghost white | |
- | 03:20:43 PM CPU %usr | + | 248 248 255 GhostWhite |
- | 03:20:45 PM all | + | 245 245 245 white smoke |
- | 03:20:45 PM 0 | + | 245 245 245 WhiteSmoke |
- | + | 220 220 220 gainsboro | |
- | 03:20:45 PM CPU %usr | + | 255 250 240 floral white |
- | 03:20:47 PM all | + | 255 250 240 FloralWhite |
- | 03:20:47 PM 0 | + | 253 245 230 old lace |
- | + | 253 245 230 OldLace | |
- | 03:20:47 PM CPU %usr | + | 250 240 230 linen |
- | 03:20:49 PM all | + | 250 235 215 antique white |
- | 03:20:49 PM 0 | + | 250 235 215 AntiqueWhite |
- | + | 255 239 213 papaya whip | |
- | 03:20:49 PM CPU %usr | + | 255 239 213 PapayaWhip |
- | 03:20:51 PM all | + | 255 235 205 blanched almond |
- | 03:20:51 PM 0 | + | 255 235 205 BlanchedAlmond |
- | + | 255 228 196 bisque | |
- | 03:20:51 PM CPU %usr | + | 255 218 185 peach puff |
- | 03:20:53 PM all | + | 255 218 185 PeachPuff |
- | 03:20:53 PM 0 | + | 255 222 173 navajo white |
- | + | 255 222 173 NavajoWhite | |
- | Average: | + | 255 228 181 moccasin |
- | Average: | + | 255 248 220 cornsilk |
- | Average: | + | 255 255 240 ivory |
+ | 255 250 205 lemon chiffon | ||
+ | 255 250 205 LemonChiffon | ||
+ | 255 245 238 seashell | ||
+ | 240 255 240 honeydew | ||
+ | --More--(3%) | ||
</ | </ | ||
- | Les options de cette commande sont : | + | ===La Section Modules=== |
- | < | + | Par défaut le serveur X charge ses modules à partir du répertoire |
- | [root@centos7 ~]# mpstat --help | + | |
- | Usage: mpstat [ options ] [ < | + | |
- | Options are: | + | |
- | [ -A ] [ -u ] [ -V ] [ -I { SUM | CPU | SCPU | ALL } ] | + | |
- | [ -P { <cpu> [,...] | ON | ALL } ] | + | |
- | </ | + | |
- | + | ||
- | ==sar== | + | |
- | + | ||
- | La commande | + | |
- | + | ||
- | ^ Option ^ Description ^ | + | |
- | | -u | Pourcentage d' | + | |
- | | -q | Nombre de processus en attente | | + | |
- | | -r | Utilisation de la mémoire centrale | | + | |
- | | -w | Surveillance du swapping | | + | |
- | | -p | Surveillance de la pagination | | + | |
- | | -b | Utilisation des tampons | | + | |
- | | -d | Utilisation des disques | | + | |
- | + | ||
- | Sous RHEL/CentOS 7 la commande | + | |
< | < | ||
- | [root@centos7 ~]# ls /usr/lib64/sa | + | [root@centos7 ~]# ls /usr/lib64/xorg/ |
- | sa1 sa2 sadc | + | drivers |
+ | extensions | ||
</ | </ | ||
- | |||
- | Le script **/ | ||
- | |||
- | ^ Option ^ Description ^ | ||
- | | -t | L' | ||
- | | -n | Nombre de collectes | | ||
- | |||
- | Le script **/ | ||
- | |||
- | Pour pouvoir fonctionner correctement, | ||
- | |||
- | Modifiez le fichier **/ | ||
< | < | ||
- | [root@centos7 | + | root@debian8:~# ls /usr/lib/xorg/modules |
- | # Run system activity accounting tool every 10 minutes | + | drivers |
- | # */10 * * * * root /usr/lib64/sa/sa1 1 1 | + | extensions |
- | */2 * * * * root / | + | |
- | # 0 * * * * root / | + | |
- | # Generate a daily summary of process accounting at 23:53 | + | |
- | 53 23 * * * root / | + | |
</ | </ | ||
- | Attendez deux minutes puis saisissez les commandes suivantes : | + | <WRAP center round important> |
- | + | **Important** : Le chemin par défaut | |
- | <code> | + | |
- | [root@centos7 ~]# sar | + | |
- | Linux 3.10.0-229.4.2.el7.x86_64 (centos7.fenestros.loc) 11/02/2015 _x86_64_ (1 CPU) | + | |
- | + | ||
- | 02:20:02 PM | + | |
- | 02:30:01 PM | + | |
- | 02:40:01 PM | + | |
- | 02:50:01 PM | + | |
- | 03:00:01 PM | + | |
- | 03:10:01 PM | + | |
- | 03:20:01 PM | + | |
- | 03:28:02 PM | + | |
- | 03:30:01 PM | + | |
- | 03:32:01 PM | + | |
- | Average: | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# sar -u 5 3 | + | |
- | Linux 3.10.0-229.4.2.el7.x86_64 (centos7.fenestros.loc) 11/02/2015 _x86_64_ (1 CPU) | + | |
- | + | ||
- | 03:34:01 PM | + | |
- | 03:34:06 PM | + | |
- | 03:34:11 PM | + | |
- | 03:34:16 PM | + | |
- | Average: | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# sar -r 5 3 | + | |
- | Linux 3.10.0-229.4.2.el7.x86_64 (centos7.fenestros.loc) 11/02/2015 _x86_64_ (1 CPU) | + | |
- | + | ||
- | 03:34:48 PM kbmemfree kbmemused | + | |
- | 03:34:53 PM 137708 | + | |
- | 03:34:58 PM 130988 | + | |
- | 03:35:03 PM 131360 | + | |
- | Average: | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# sar -w 5 3 | + | |
- | Linux 3.10.0-229.4.2.el7.x86_64 (centos7.fenestros.loc) 11/02/2015 _x86_64_ (1 CPU) | + | |
- | + | ||
- | 03:35:51 PM proc/ | + | |
- | 03:35:56 PM 0.00 608.04 | + | |
- | 03:36:01 PM 1.06 531.75 | + | |
- | 03:36:06 PM | + | |
- | Average: | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# sar -b 5 3 | + | |
- | Linux 3.10.0-229.4.2.el7.x86_64 (centos7.fenestros.loc) 11/02/2015 _x86_64_ (1 CPU) | + | |
- | + | ||
- | 03:36:09 PM | + | |
- | 03:36:14 PM 0.00 0.00 0.00 0.00 0.00 | + | |
- | 03:36:19 PM 0.00 0.00 0.00 0.00 0.00 | + | |
- | 03:36:24 PM 2.32 0.00 2.32 0.00 | + | |
- | Average: | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# sar -d 5 3 | + | |
- | Linux 3.10.0-229.4.2.el7.x86_64 (centos7.fenestros.loc) 11/02/2015 _x86_64_ (1 CPU) | + | |
- | + | ||
- | 03:36:46 PM | + | |
- | 03:36:51 PM | + | |
- | 03:36:51 PM dev8-0 | + | |
- | + | ||
- | 03:36:51 PM | + | |
- | 03:36:56 PM | + | |
- | 03:36:56 PM dev8-0 | + | |
- | + | ||
- | 03:36:56 PM | + | |
- | 03:37:01 PM | + | |
- | 03:37:01 PM dev8-0 | + | |
- | + | ||
- | Average: | + | |
- | Average: | + | |
- | Average: | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# sar -p 5 3 | + | |
- | Linux 3.10.0-229.4.2.el7.x86_64 (centos7.fenestros.loc) 11/02/2015 _x86_64_ (1 CPU) | + | |
- | + | ||
- | 03:37:16 PM | + | |
- | 03:37:21 PM | + | |
- | 03:37:26 PM | + | |
- | 03:37:31 PM | + | |
- | Average: | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# sar -v 5 3 | + | |
- | Linux 3.10.0-229.4.2.el7.x86_64 (centos7.fenestros.loc) 11/02/2015 _x86_64_ (1 CPU) | + | |
- | + | ||
- | 03:38:44 PM dentunusd | + | |
- | 03:38:49 PM 136266 | + | |
- | 03:38:54 PM 136266 | + | |
- | 03:38:59 PM 136266 | + | |
- | Average: | + | |
- | </ | + | |
- | + | ||
- | Les options de cette commande sont : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# sar --help | + | |
- | Usage: sar [ options ] [ < | + | |
- | Options are: | + | |
- | [ -A ] [ -B ] [ -b ] [ -C ] [ -d ] [ -H ] [ -h ] [ -p ] [ -q ] [ -R ] | + | |
- | [ -r ] [ -S ] [ -t ] [ -u [ ALL ] ] [ -V ] [ -v ] [ -W ] [ -w ] [ -y ] | + | |
- | [ -I { <int> [,...] | SUM | ALL | XALL } ] [ -P { <cpu> [,...] | ALL } ] | + | |
- | [ -m { < | + | |
- | [ -j { ID | LABEL | PATH | UUID | ... } ] | + | |
- | [ -f [ < | + | |
- | [ -i < | + | |
- | </ | + | |
- | + | ||
- | ===Utilisation des commandes en production=== | + | |
- | + | ||
- | ==Identifier un système limité par le processeur== | + | |
- | + | ||
- | Dans ce cas utilisez les commandes suivantes : | + | |
- | + | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | * iostat -c | + | |
- | + | ||
- | ==Identifier un système ayant un problème de mémoire== | + | |
- | + | ||
- | Dans ce cas utilisez les commandes suivantes | + | |
- | + | ||
- | * free | + | |
- | * sar -B | + | |
- | + | ||
- | + | ||
- | ==Identifier un système ayant un problème d' | + | |
- | + | ||
- | Utilisez la commande : | + | |
- | + | ||
- | * iostat -d -x | + | |
- | + | ||
- | + | ||
- | =====Modules usb===== | + | |
- | + | ||
- | L' | + | |
- | + | ||
- | ^ Version USB ^ Module ^ Nom Complet ^ | + | |
- | | 1.0\1.1 | + | |
- | | ::: | **OHCI** | //Open Controller Host Interface// | | + | |
- | | 2.0 | **EHCI** | //Enhanced Host Controller Interface// | | + | |
- | | 3.0 | **XHCI** | // | + | |
- | + | ||
- | Le tableau suivant liste les modules courrament chargés en fonction du périphérique utilisé : | + | |
- | + | ||
- | ^ Module ^ Type de Périphérique ^ | + | |
- | | **usb_storage** | + | |
- | | **usbhid** | + | |
- | | **snd-usb-audio** | + | |
- | | **usbvidéo** | + | |
- | | **irda-usb** | + | |
- | | **usbnet** | + | |
- | + | ||
- | Les modules | + | |
- | + | ||
- | * INITrd, | + | |
- | * Le processus init, | + | |
- | * kmod, d'une manière dynamique et transparente lors du branchement du périphérique, | + | |
- | * udev, | + | |
- | * manuellement. | + | |
- | + | ||
- | <WRAP center round todo> | + | |
- | **A faire** : Branchez une clef USB avant de continuer. Si vous utilisez %%VirtualBox%%, | + | |
</ | </ | ||
- | =====udev===== | + | Un exemple de cette section est : |
- | Depuis le noyau Linux 2.6 Linux est capable de détecter des périphériques branchés à chaud. Cette technologie s' | + | <file> |
- | + | Section | |
- | * Udev, | + | Load " |
- | * HAL, | + | EndSection |
- | * Dbus. | + | </file> |
- | + | ||
- | Les rôles de chaque composant sont les suivants : | + | |
- | + | ||
- | * Udev se charge de créer et supprimer d'une manière dynamique les nœuds dans le répertoire **/dev**, | + | |
- | * HAL obtient des informations à partir d'Udev et créé un fichier au format XML représentant le périphérique branché. Il informe ensuite Nautilus en utilisant le Dbus, | + | |
- | * Dbus joue le rôle d'un bus système qui est utilisé pour la communication inter-processus. | + | |
- | + | ||
- | Lors de démarrage de Linux, Udev joue un rôle important : | + | |
- | + | ||
- | * Au démarrage **tmpfs** est monté sur /dev, | + | |
- | * Udev copie les éventuels nœuds statiques de **/ | + | |
- | * le démon **udevd** collecte des données appelées **uevents** du noyau et cherche une règle correspondante dans le répertoire **/ | + | |
- | * Udev crée les nœuds et liens symboliques spécifiés dans la règle identifiée, | + | |
- | * Udev stocke les règles contenues dans **/ | + | |
- | * En cas de modification des ces règles, Udev met à jour la mémoire. | + | |
- | + | ||
- | Udev repose sur le filesystem **sysfs** monté sur /sys qui permet de rendre les périphériques visibles à Udev dans l'// | + | |
- | + | ||
- | Le fichier de configuration principal d'Udev est **/ | + | |
- | + | ||
- | <code> | + | |
- | [root@centos7 ~]# cat / | + | |
- | # see udev(7) for details | + | |
- | + | ||
- | #udev_log="info" | + | |
- | </ | + | |
- | + | ||
- | Les fichiers de règles se trouvent dans **/ | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# ls / | + | |
- | 10-dm.rules | + | |
- | 11-dm-lvm.rules | + | |
- | 11-dm-mpath.rules | + | |
- | 13-dm-disk.rules | + | |
- | 40-libgphoto2.rules | + | |
- | 40-redhat.rules | + | |
- | 40-usb_modeswitch.rules | + | |
- | 42-usb-hid-pm.rules | + | |
- | 50-rbd.rules | + | |
- | 50-udev-default.rules | + | |
- | 56-hpmud.rules | + | |
- | 60-alias-kmsg.rules | + | |
- | 60-cdrom_id.rules | + | |
- | 60-fprint-autosuspend.rules | + | |
- | 60-keyboard.rules | + | |
- | 60-net.rules | + | |
- | 60-persistent-alsa.rules | + | |
- | 60-persistent-input.rules | + | |
- | 60-persistent-serial.rules | + | |
- | 60-persistent-storage.rules | + | |
- | 60-persistent-storage-tape.rules | + | |
- | 60-persistent-v4l.rules | + | |
- | 60-raw.rules | + | |
- | 61-accelerometer.rules | + | |
- | </code> | + | |
<WRAP center round important> | <WRAP center round important> | ||
- | **Important** : Il vous est possible d' | + | **Attention** : Dans l' |
</ | </ | ||
- | Comme indique le nom de chaque fichier, le contenu est composé de règles à l' | + | ===La Section InputDevice=== |
- | < | + | Cette section décrit un périphérique en entrée. Il n'ya normalement qu'une section pour le clavier, les souris étant généralement détectées automatiquement. Vous pouvez cependant configurer une section **InputDevice** pour une souris en ecrasant la configuration par défaut. |
- | [root@centos7 ~]# cat / | + | |
- | # do not edit this file, it will be overwritten on update | + | |
- | SUBSYSTEM==" | + | Un exemple de cette section est : |
- | # select | + | < |
- | SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+=" | + | Section |
- | SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100" | + | |
+ | Driver | ||
+ | | ||
+ | Option | ||
+ | EndSection | ||
+ | </ | ||
- | SUBSYSTEM==" | + | Les directives les plus courantes dans cette section sont : |
- | SUBSYSTEM==" | + | |
- | ENV{MODALIAS}!="", | + | |
- | ACTION!="add", GOTO="default_permissions_end" | + | ^ Directive |
+ | | "Identifier" | ||
+ | | "Driver" | ||
+ | | " | ||
- | SUBSYSTEM==" | + | Quand la section décrit une souris, on trouve typiquement les options suivantes : |
- | SUBSYSTEM==" | + | |
- | SUBSYSTEM==" | + | |
- | SUBSYSTEM==" | + | |
- | SUBSYSTEM==" | + | |
- | SUBSYSTEM==" | + | |
- | SUBSYSTEM==" | + | |
- | KERNEL==" | + | |
- | SUBSYSTEM=="mem", | + | ^ Option |
+ | | "Protocol" | ||
+ | | "Device" | ||
+ | | "Emulate3Buttons | ||
- | SUBSYSTEM==" | + | ===La Section Monitor=== |
- | SUBSYSTEM==" | + | Cette section décrit |
- | SUBSYSTEM==" | + | |
- | --More-- | + | |
- | </ | + | |
- | + | ||
- | Chaque règle prend la forme suivante : | + | |
- | + | ||
- | KEY, [KEY, ...] NAME [, SYMLINK] | + | |
- | + | ||
- | Chaque KEY est un champ au format **type=valeur** qui doit correspondre à un périphérique unique. La valeur de type peut prendre plusieurs formes : | + | |
- | + | ||
- | ^ Type ^ Description ^ Exemples ^ | + | |
- | | BUS | Type de bus | usb, scsi, ide | | + | |
- | | KERNEL | Le nom par défault du périphérique donné par le noyau | hda, ttyUSB0, lp0 | | + | |
- | | SUBSYSTEM | Le nom noyau du sous-système, | + | |
- | | DRIVER | Le nom du pilote qui contrôle le périphérique | usb-storage | | + | |
- | | ID | Le numéro du périphérique sur son bus | PCI bus id, USB id | | + | |
- | | PLACE | Ne concerne que les périphériques USB et donne la position topologique du périphérique sur son bus | S/O | | + | |
- | | SYSFS{filename} | Le nom du fichier dans /sys pour le périphérique. Ce fichier contient le fabricant, le label, le numéro de série et UUID du périphérique. La vérification de jusqu' | + | |
- | | PROGRAM | Ceci permet à Udev d' | + | |
- | | RESULT | Valeur à comparer au résultat de PROGRAM | S/O | | + | |
- | + | ||
- | NAME et SYMLINK sont utilisées pour stipuler ce que Udev doit faire avec le périphérique : | + | |
- | + | ||
- | ^ Type ^ Description ^ Exemples ^ | + | |
- | | NAME | Le nome du nœud dans /dev | S/O | | + | |
- | | SYMLINK | Le ou les lien(s) symbolique(s) qui pointe(nt) vers le NAME | S/O | | + | |
- | + | ||
- | ====La commande udevadm==== | + | |
- | + | ||
- | Pour obtenir de l'information sur un périphérique il convient d' | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# udevadm info --query=all -n /dev/sda | + | |
- | P: / | + | |
- | N: sda | + | |
- | S: disk/ | + | |
- | E: DEVLINKS=/ | + | |
- | E: DEVNAME=/ | + | |
- | E: DEVPATH=/ | + | |
- | E: DEVTYPE=disk | + | |
- | E: ID_ATA=1 | + | |
- | E: ID_ATA_FEATURE_SET_PM=1 | + | |
- | E: ID_ATA_FEATURE_SET_PM_ENABLED=1 | + | |
- | E: ID_ATA_SATA=1 | + | |
- | E: ID_ATA_SATA_SIGNAL_RATE_GEN2=1 | + | |
- | E: ID_ATA_WRITE_CACHE=1 | + | |
- | E: ID_ATA_WRITE_CACHE_ENABLED=1 | + | |
- | E: ID_BUS=ata | + | |
- | E: ID_MODEL=VBOX_HARDDISK | + | |
- | E: ID_MODEL_ENC=VBOX\x20HARDDISK\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20 | + | |
- | E: ID_PART_TABLE_TYPE=dos | + | |
- | E: ID_REVISION=1.0 | + | |
- | E: ID_SERIAL=VBOX_HARDDISK_VBc40eec8a-49b6b6f3 | + | |
- | E: ID_SERIAL_SHORT=VBc40eec8a-49b6b6f3 | + | |
- | E: ID_TYPE=disk | + | |
- | E: MAJOR=8 | + | |
- | E: MINOR=0 | + | |
- | E: MPATH_SBIN_PATH=/ | + | |
- | E: SUBSYSTEM=block | + | |
- | E: TAGS=: | + | |
- | E: USEC_INITIALIZED=957366 | + | |
- | </ | + | |
- | + | ||
- | ===Les options | + | |
- | + | ||
- | Les options de la commande udevadm sont : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# udevadm --help | + | |
- | Usage: udevadm [--help] [--version] [--debug] COMMAND [COMMAND OPTIONS] | + | |
- | info query sysfs or the udev database | + | |
- | trigger | + | |
- | settle | + | |
- | control | + | |
- | monitor | + | |
- | hwdb | + | |
- | test test an event run | + | |
- | test-builtin test a built-in command | + | |
- | + | ||
- | [root@centos7 ~]# udevadm info --help | + | |
- | Usage: udevadm info OPTIONS | + | |
- | --query=< | + | |
- | name name of device node | + | |
- | symlink | + | |
- | path sys device path | + | |
- | property | + | |
- | all all values | + | |
- | --path=< | + | |
- | --name=< | + | |
- | --root | + | |
- | --attribute-walk | + | |
- | of parent devices | + | |
- | --device-id-of-file=< | + | |
- | --export | + | |
- | --export-prefix | + | |
- | --export-db | + | |
- | --cleanup-db | + | |
- | --help | + | |
- | </ | + | |
- | + | ||
- | =====Système de fichiers /sys===== | + | |
- | + | ||
- | Le système de fichiers virtuel | + | |
- | + | ||
- | Saisissez la commande suivante : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# ls -l /sys | + | |
- | total 0 | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. | + | |
- | drwxr-xr-x. 146 root root 0 Oct 28 09:40 module | + | |
- | drwxr-xr-x. | + | |
- | </ | + | |
- | + | ||
- | Chaque répertoire contient des informations : | + | |
- | + | ||
- | * **block** | + | |
- | * contient des informations sur les périphériques bloc | + | |
- | * **bus** | + | |
- | * contient des informations sur les bus de données | + | |
- | * **class** | + | |
- | * contient des informations sur des classes de matériel | + | |
- | * **devices** | + | |
- | * contient des informations sur la position des périphériques sur les bus | + | |
- | * **firmware** | + | |
- | * contient, entre autre, des informations sur l' | + | |
- | * **module** | + | |
- | * contient des informations sur les modules du noyau | + | |
- | * **power** | + | |
- | * contient des informations sur la gestion de l' | + | |
- | * **fs** | + | |
- | * contient des informations sur les systèmes de fichiers | + | |
- | + | ||
- | Pour illustrer ceci, saisissez la commande suivante : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# cat / | + | |
- | 409600 | + | |
- | </ | + | |
- | + | ||
- | Ce chiffre correspond aux nombre de secteurs. | + | |
- | + | ||
- | =====Limitation | + | |
- | + | ||
- | ====ulimit==== | + | |
- | + | ||
- | Les ressources disponibles aux utilisateurs peuvent être limitées par l' | + | |
- | + | ||
- | La commande **ulimit** gère deux types de limite, la limite //hard// en utilisant l' | + | |
- | + | ||
- | La limite // | + | |
- | + | ||
- | L' | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# cat / | + | |
- | # / | + | |
- | # | + | |
- | #This file sets the resource limits for the users logged in via PAM. | + | |
- | #It does not affect resource limits of the system services. | + | |
- | # | + | |
- | #Also note that configuration files in / | + | |
- | #which are read in alphabetical order, override the settings in this | + | |
- | #file in case the domain is the same or more specific. | + | |
- | #That means for example that setting a limit for wildcard domain here | + | |
- | #can be overriden with a wildcard setting in a config file in the | + | |
- | # | + | |
- | #with a user specific setting in the subdirectory. | + | |
- | # | + | |
- | #Each line describes a limit for a user in the form: | + | |
- | # | + | |
- | #< | + | |
- | # | + | |
- | #Where: | + | |
- | #< | + | |
- | # - a user name | + | |
- | # - a group name, with @group syntax | + | |
- | # - the wildcard *, for default entry | + | |
- | # - the wildcard %, can be also used with %group syntax, | + | |
- | # for maxlogin limit | + | |
- | # | + | |
- | #< | + | |
- | # - " | + | |
- | # - " | + | |
- | # | + | |
- | #< | + | |
- | # - core - limits the core file size (KB) | + | |
- | # - data - max data size (KB) | + | |
- | # - fsize - maximum filesize (KB) | + | |
- | # - memlock - max locked-in-memory address space (KB) | + | |
- | # - nofile - max number of open file descriptors | + | |
- | # - rss - max resident set size (KB) | + | |
- | # - stack - max stack size (KB) | + | |
- | # - cpu - max CPU time (MIN) | + | |
- | # - nproc - max number of processes | + | |
- | # - as - address space limit (KB) | + | |
- | # - maxlogins - max number of logins for this user | + | |
- | # - maxsyslogins - max number of logins on the system | + | |
- | # - priority - the priority to run user process with | + | |
- | # - locks - max number of file locks the user can hold | + | |
- | # - sigpending - max number of pending signals | + | |
- | # - msgqueue - max memory used by POSIX message queues (bytes) | + | |
- | # - nice - max nice priority allowed to raise to values: [-20, 19] | + | |
- | # - rtprio - max realtime priority | + | |
- | # | + | |
- | #< | + | |
- | # | + | |
- | + | ||
- | #* | + | |
- | #* | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | #ftp | + | |
- | # | + | |
- | + | ||
- | # End of file | + | |
- | </ | + | |
<WRAP center round important> | <WRAP center round important> | ||
- | **Important** : La valeur | + | **Attention** : Il est important |
</ | </ | ||
- | Par exemple, si root inscrit les deux ligne suivantes dans le fichier / | + | Un exemple |
< | < | ||
- | ... | + | Section " |
- | trainee | + | Identifier |
- | trainee | + | VendorName |
- | ... | + | ModelName |
+ | DisplaySize | ||
+ | HorizSync | ||
+ | VertRefresh | ||
+ | EndSection | ||
</ | </ | ||
- | la limite du nombre de fichiers ouverts simultanément par trainee est de 1 024. Par contre, trainee a la possibilité d' | + | Les directives les plus courantes dans cette section sont : |
- | < | + | ^ Directive |
- | $ ulimit -n 4096 | + | | " |
- | </ | + | | " |
+ | | " | ||
+ | | " | ||
+ | | " | ||
+ | | " | ||
+ | | " | ||
+ | | " | ||
- | Pour consulter la liste des limites actuelles, il convient d' | ||
- | < | + | ===La Section Device=== |
- | [root@centos7 ~]# ulimit -a | + | |
- | core file size (blocks, -c) 0 | + | |
- | data seg size | + | |
- | scheduling priority | + | |
- | file size | + | |
- | pending signals | + | |
- | max locked memory | + | |
- | max memory size | + | |
- | open files (-n) 1024 | + | |
- | pipe size (512 bytes, -p) 8 | + | |
- | POSIX message queues | + | |
- | real-time priority | + | |
- | stack size (kbytes, -s) 8192 | + | |
- | cpu time | + | |
- | max user processes | + | |
- | virtual memory | + | |
- | file locks (-x) unlimited | + | |
- | </ | + | |
- | ====Options de la commande==== | + | Cette section décrit une carte vidéo. Il y a une section Device pour chaque carte vidéo présente dans la machine. |
- | Les options | + | Un exemple |
- | <code> | + | <file> |
- | [root@centos7 ~]# help ulimit | + | Section " |
- | ulimit: ulimit [-SHacdefilmnpqrstuvx] [limit] | + | Identifier |
- | Modify shell resource limits. | + | Driver |
- | + | VendorName | |
- | Provides control over the resources available to the shell and processes | + | BoardName |
- | it creates, on systems that allow such control. | + | VideoRam |
- | + | Option | |
- | Options: | + | EndSection |
- | | + | </file> |
- | | + | |
- | -a all current limits are reported | + | |
- | -b the socket buffer size | + | |
- | -c the maximum size of core files created | + | |
- | -d the maximum size of a process' | + | |
- | -e the maximum scheduling priority (`nice' | + | |
- | -f the maximum size of files written by the shell and its children | + | |
- | -i the maximum number of pending signals | + | |
- | -l the maximum size a process may lock into memory | + | |
- | -m the maximum resident set size | + | |
- | -n the maximum number of open file descriptors | + | |
- | -p the pipe buffer size | + | |
- | -q the maximum number of bytes in POSIX message queues | + | |
- | -r the maximum real-time scheduling priority | + | |
- | -s the maximum stack size | + | |
- | -t the maximum amount of cpu time in seconds | + | |
- | -u the maximum number of user processes | + | |
- | -v the size of virtual memory | + | |
- | -x the maximum number of file locks | + | |
- | + | ||
- | If LIMIT is given, it is the new value of the specified resource; the | + | |
- | special LIMIT values `soft', | + | |
- | current soft limit, the current hard limit, and no limit, respectively. | + | |
- | Otherwise, the current value of the specified resource is printed. | + | |
- | no option is given, then -f is assumed. | + | |
- | + | ||
- | | + | |
- | -p, which is in increments of 512 bytes, and -u, which is an unscaled | + | |
- | number of processes. | + | |
- | + | ||
- | Exit Status: | + | |
- | Returns success unless an invalid option is supplied or an error occurs. | + | |
- | </code> | + | |
- | ====Groupes de Contrôle==== | + | Les directives les plus courantes dans cette section sont : |
- | Les **Groupes de Contrôles** (//Control Groups//) aussi appelés | + | ^ Directive |
+ | | " | ||
+ | | " | ||
+ | | " | ||
+ | | " | ||
+ | | " | ||
+ | | " | ||
+ | | " | ||
+ | | " | ||
- | Les groupes de contrôle sont organisés de manière hiérarchique, | + | ===La Section Screen=== |
- | Ces hiérarchies multiples et séparés sont necéssaires parce que chaque hiérarchie est attaché à un ou plusieurs | + | Cette section associe une carte vidéo décrite par une section |
- | * **blkio** - utilisé pour établir des limites sur l' | + | Un exemple |
- | * **cpu** - utilisé pour fournir aux tâches des groupes | + | |
- | * **cpuacct** - utilisé pour produire des rapports automatiques sur les ressources CPU utilisées par les tâches dans un groupe de contrôle, | + | |
- | * **cpuset** - utilisé pour assigner des CPU individuels sur un système multicoeur et des noeuds de mémoire à des tâches dans un groupe de contrôle, | + | |
- | * **devices** - utilisé pour autoriser ou pour refuser l' | + | |
- | * **freezer** - utilisé pour suspendre ou pour réactiver les tâches dans un groupe de contrôle, | + | |
- | * **memory** - utilisé pour établir les limites d' | + | |
- | * **net_cls** - utilisé pour repèrer les paquets réseau avec un identifiant de classe (// | + | |
- | * **perf_event** | + | |
- | * **hugetlb** - utilisé pour limiter des ressources sur des pages de mémoire virtuelle de grande taille. | + | |
- | Pour visualiser les hiérarchies, | + | < |
+ | Section " | ||
+ | Identifier " | ||
+ | Device | ||
+ | Monitor | ||
+ | DefaultDepth | ||
+ | SubSection " | ||
+ | Depth | ||
+ | Modes | ||
+ | EndSubSection | ||
+ | SubSection " | ||
+ | Depth | ||
+ | Modes | ||
+ | EndSubSection | ||
+ | EndSection | ||
+ | </ | ||
- | < | + | Les directives les plus courantes dans cette section sont : |
- | [root@centos7 ~]# lssubsys -am | + | |
- | cpuset / | + | |
- | cpu,cpuacct / | + | |
- | memory / | + | |
- | devices / | + | |
- | freezer / | + | |
- | net_cls / | + | |
- | blkio / | + | |
- | perf_event / | + | |
- | hugetlb / | + | |
- | </ | + | |
- | Sous RHEL/CentOS 7, **Systemd** organise les processus dans chaque CGroup. Par exemple tous les processus démarrés par le serveur Apache se trouveront dans le même CGroup, y compris les scripts CGI. Ceci implique que la gestion des ressources en utilisant des hiérarchies | + | ^ Directive |
+ | | " | ||
+ | | " | ||
+ | | " | ||
+ | | " | ||
+ | | " | ||
+ | | " | ||
- | En haut de l' | + | ====La Commande xwininfo==== |
- | * le **system.slice** - l'emplacement des services système, | + | La commande xwininfo permet d'obtenir de l'information concernant |
- | * le **user.slice** - l'emplacement des sessions des utilisateurs, | + | |
- | * le **machine.slice** - l' | + | |
- | + | ||
- | En dessous des tranches peuvent se trouver : | + | |
- | + | ||
- | * des **scopes** - des processus crées par **fork**, | + | |
- | * des **services** - des processus créés par une **Unité**. | + | |
- | + | ||
- | Les slices peuvent être visualisés avec la commande | + | |
< | < | ||
- | [root@centos7 ~]# systemctl list-units --type=slice | + | [root@centos7 ~]# xwininfo |
- | UNIT | + | |
- | -.slice | + | |
- | system-getty.slice loaded active active system-getty.slice | + | |
- | system.slice | + | |
- | user-0.slice | + | |
- | user-1000.slice | + | |
- | user.slice | + | |
- | LOAD = Reflects whether | + | xwininfo: Please select |
- | ACTIVE = The high-level unit activation state, i.e. generalization of SUB. | + | would like information by clicking the |
- | SUB = The low-level unit activation state, values depend on unit type. | + | mouse in that window. |
- | 6 loaded units listed. Pass --all to see loaded but inactive units, too. | + | xwininfo: Window id: 0x2800025 " |
- | To show all installed unit files use ' | + | |
- | </ | + | |
- | L' | + | |
- | + | | |
- | < | + | |
- | [root@centos7 ~]# systemd-cgls | + | |
- | ├─1 / | + | |
- | ├─user.slice | + | |
- | │ └─user-1000.slice | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | └─system.slice | + | |
- | | + | |
- | │ └─3478 / | + | |
- | ├─polkit.service | + | |
- | │ └─822 / | + | -geometry 1366x574+0+28 |
- | ├─wpa_supplicant.service | + | |
- | | + | |
- | ├─crond.service | + | |
- | | + | |
- | ├─atd.service | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | │ ├─ 3384 / | + | |
- | │ ├─13111 /bin/sh / | + | |
- | │ └─13458 sleep 1 | + | |
- | ├─postfix.service | + | |
- | │ ├─1810 / | + | |
- | │ ├─1833 pickup -l -t unix -u | + | |
- | │ └─1834 qmgr -l -t unix -u | + | |
- | ├─cups.service | + | |
- | │ └─756 / | + | |
- | ├─sshd.service | + | |
- | │ └─755 / | + | |
- | ├─docker.service | + | |
- | │ ├─750 /bin/sh -c / | + | |
- | │ ├─753 / | + | |
- | │ └─754 / | + | |
- | ├─NetworkManager.service | + | |
- | │ ├─ 678 / | + | |
- | │ └─1968 / | + | |
- | ├─abrt-xorg.service | + | |
- | │ └─586 / | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | ├─firewalld.service | + | |
- | │ └─510 / | + | |
- | ├─avahi-daemon.service | + | |
- | │ ├─507 avahi-daemon: running [centos7.local | + | |
- | | + | |
- | ├─ModemManager.service | + | |
- | │ └─506 / | + | |
- | ├─smartd.service | + | |
- | │ └─505 / | + | |
- | ├─libstoragemgmt.service | + | |
- | │ └─494 / | + | |
- | ├─gssproxy.service | + | |
- | │ └─517 / | + | |
- | ├─systemd-logind.service | + | |
- | | + | |
- | ├─rsyslog.service | + | |
- | │ └─488 / | + | |
- | ├─alsa-state.service | + | |
- | │ └─487 / | + | |
- | ├─auditd.service | + | |
- | │ ├─463 / | + | |
- | │ ├─473 / | + | |
- | │ └─475 / | + | |
- | ├─systemd-udevd.service | + | |
- | │ └─381 / | + | |
- | ├─lvm2-lvmetad.service | + | |
- | │ └─378 / | + | |
- | ├─systemd-journald.service | + | |
- | │ └─349 / | + | |
- | └─system-getty.slice | + | |
- | └─getty@tty1.service | + | |
- | └─798 / | + | |
</ | </ | ||
- | En utilisant Systemd, plusieurs ressources peuvent être limitées : | + | Les options |
- | + | ||
- | * **CPUShares** - par défault 1024, | + | |
- | * **MemoryLimit** - limite exprimée en Mo ou en Go. Pas de valeur par défaut, | + | |
- | * **BlockIOWeight** - valeur entre 10 et 1000. Pas de valeur par défaut, | + | |
- | * **StartupCPUShares** - comme CPUShares mais uniquement appliqué pendant le démarrage, | + | |
- | * **StartupBlockIOWeight** - comme BlockIOWeight mais uniquement appliqué pendant le démarrage, | + | |
- | * **CPUQuota** - utilisé pour limiter le temps CPU, même quand le système ne fait rien. | + | |
- | + | ||
- | <WRAP center round important> | + | |
- | **Important** : Consultez le manuel systemd.resource-control(5) pour voir les paramètres CGroup qui peuvent être passés à systemctl. | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | ===LAB #1 - Travailler avec les cgroups sous RHEL/CentOS 7=== | + | |
- | + | ||
- | Créez un service appelé **foo** | + | |
< | < | ||
- | [root@centos7 ~]# vi / | + | [root@centos7 ~]# xwininfo --help |
- | [root@centos7 ~]# cat / | + | usage: |
- | [Unit] | + | |
- | Description=The foo service that does nothing useful | + | |
- | After=remote-fs.target nss-lookup.target | + | |
- | [Service] | + | where options include: |
- | ExecStart=/ | + | |
- | ExecStop=/ | + | -display host: |
- | + | | |
- | [Install] | + | -id windowid |
- | WantedBy=multi-user.target | + | -name windowname |
+ | -int print window id in decimal | ||
+ | -children | ||
+ | -tree print children identifiers recursively | ||
+ | -stats | ||
+ | | ||
+ | -events | ||
+ | -size print size hints | ||
+ | -wm print window manager hints | ||
+ | -shape | ||
+ | -frame | ||
+ | -english | ||
+ | -metric | ||
+ | -all | ||
</ | </ | ||
- | Consultez le statut du service foo : | + | ====La Commande xdpyinfo==== |
- | < | + | Xdpyinfo est un utilitaire utilisé pour afficher des informations concernant |
- | [root@centos7 ~]# systemctl status foo.service | + | |
- | ● foo.service - The foo service that does nothing useful | + | |
- | | + | |
- | | + | |
- | </ | + | |
- | + | ||
- | Démarrez et actives | + | |
< | < | ||
- | [root@centos7 ~]# systemctl start foo.service | + | [root@centos7 ~]# xdpyinfo |
- | [root@centos7 ~]# systemctl enable foo.service | + | name of display: |
- | Created symlink from / | + | version number: |
- | [root@centos7 ~]# systemctl status foo.service | + | vendor string: |
- | ● foo.service - The foo service that does nothing useful | + | vendor release number: |
- | Loaded: loaded (/ | + | X.Org version: 1.15.0 |
- | Active: active (running) since Wed 2016-06-15 13:13:17 CEST; 24s ago | + | maximum request size: 16777212 bytes |
- | Main PID: 22256 (sha1sum) | + | motion buffer size: 256 |
- | CGroup: / | + | bitmap unit, bit order, padding: 32, LSBFirst, 32 |
- | └─22256 / | + | image byte order: |
+ | number of supported pixmap formats: 7 | ||
+ | supported pixmap formats: | ||
+ | depth 1, bits_per_pixel 1, scanline_pad 32 | ||
+ | depth 4, bits_per_pixel 8, scanline_pad 32 | ||
+ | depth 8, bits_per_pixel 8, scanline_pad 32 | ||
+ | depth 15, bits_per_pixel 16, scanline_pad 32 | ||
+ | depth 16, bits_per_pixel 16, scanline_pad 32 | ||
+ | depth 24, bits_per_pixel 32, scanline_pad 32 | ||
+ | depth 32, bits_per_pixel 32, scanline_pad 32 | ||
+ | keycode range: | ||
+ | focus: | ||
+ | number of extensions: 27 | ||
+ | | ||
+ | Composite | ||
+ | DAMAGE | ||
+ | DOUBLE-BUFFER | ||
+ | DPMS | ||
+ | DRI2 | ||
+ | GLX | ||
+ | Generic Event Extension | ||
+ | MIT-SCREEN-SAVER | ||
+ | MIT-SHM | ||
+ | Present | ||
+ | RANDR | ||
+ | RECORD | ||
+ | RENDER | ||
+ | SGI-GLX | ||
+ | SHAPE | ||
+ | SYNC | ||
+ | X-Resource | ||
+ | XC-MISC | ||
+ | XFIXES | ||
+ | XFree86-DGA | ||
+ | XFree86-VidModeExtension | ||
+ | XINERAMA | ||
+ | XInputExtension | ||
+ | XKEYBOARD | ||
+ | XTEST | ||
+ | XVideo | ||
+ | default screen number: 0 | ||
+ | number of screens: | ||
- | Jun 15 13:13:17 centos7.fenestros.loc systemd[1]: Started The foo service that does nothing useful. | + | screen #0: |
- | Jun 15 13:13:17 centos7.fenestros.loc systemd[1]: Starting The foo service that does nothing useful... | + | dimensions: |
+ | resolution: 96x96 dots per inch | ||
+ | | ||
+ | root window id: | ||
+ | depth of root window: 24 planes | ||
+ | number of colormaps: | ||
+ | default colormap: | ||
+ | default number of colormap cells: | ||
+ | preallocated pixels: | ||
+ | options: | ||
+ | largest cursor: | ||
+ | current input event mask: 0xda0003 | ||
+ | KeyPressMask | ||
+ | SubstructureNotifyMask | ||
+ | ColormapChangeMask | ||
+ | number of visuals: | ||
+ | default visual id: 0x21 | ||
+ | visual: | ||
+ | visual id: 0x21 | ||
+ | class: | ||
+ | depth: | ||
+ | available colormap entries: | ||
+ | red, green, blue masks: | ||
+ | significant bits in color specification: | ||
+ | visual: | ||
+ | visual id: 0xf9 | ||
+ | class: | ||
+ | depth: | ||
+ | available colormap entries: | ||
+ | red, green, blue masks: | ||
+ | significant bits in color specification: | ||
+ | ... | ||
</ | </ | ||
- | Notez que notre service a été placé dans la tranche **system.slice** | + | Les options de la commande xwininfo sont : |
< | < | ||
- | [root@centos7 ~]# systemctl show -p Slice foo.service | + | [root@centos7 ~]# xdpyinfo |
- | Slice=system.slice | + | usage: |
+ | -display displayname server to query | ||
+ | -version print program version and exit | ||
+ | -queryExtensions print info returned by XQueryExtension | ||
+ | -ext all print detailed info for all supported extensions | ||
+ | -ext extension-name print detailed info for extension-name if one of: | ||
+ | | ||
+ | | ||
+ | XInputExtension RENDER XINERAMA DMX | ||
</ | </ | ||
- | Utilisez ps pour voir le pourcentage du CPU utilisé par ce service : | + | =====L' |
- | < | + | L' |
- | [root@centos7 ~]# ps -p 22256 -o pid, | + | |
- | PID COMMAND | + | |
- | 22256 sha1sum | + | |
- | </code> | + | |
- | Fixez maintenant | + | ====Le Clavier et la Souris==== |
- | < | + | Historiquement, |
- | [root@centos7 ~]# systemctl set-property foo.service CPUShares=250 | + | |
- | </ | + | |
- | Cette limite est permenante et a été inscrite dans le fichier **50-CPUShares.conf** qui se trouve dans le répertoire **/etc/systemd/system/ | + | ^ Paramètre ^ Description ^ |
+ | | Sticky Keys | Permet de maintenir les touches < | ||
+ | | Mouse Keys | Permet d' | ||
+ | | Bounce Keys | Permet de réduire l' | ||
+ | | Slow Keys | Necéssite qu'une touche soit enfoncée pour une durée plus longue avant que le système réagisse | | ||
- | < | + | ====Claviers Visuels==== |
- | [root@centos7 ~]# ls / | + | |
- | 50-CPUShares.conf | + | |
- | [root@centos7 ~]# cat / | + | |
- | [Service] | + | |
- | CPUShares=250 | + | |
- | </ | + | |
- | <WRAP center round important> | + | Un clavier visuel ou //Onscreen Keyboard// est un clavier qui est afficher à l'écran. Les touches sont activées en utilisant |
- | **Important** : En utilisant | + | |
- | </ | + | |
- | Appliquez cette modification en rechargeant systemd et en re-démarrant le service foo.service : | + | Un exemple connu du clavier visuel est **[[http:// |
- | < | + | ====L' |
- | [root@centos7 ~]# systemctl daemon-reload | + | |
- | [root@centos7 ~]# systemctl restart foo.service | + | |
- | </ | + | |
- | Vérifiez maintenant | + | En ce qui concerne la visibilité de l' |
- | < | + | Il existe aussi des loupes telles **Kmag**. |
- | [root@centos7 ~]# cat / | + | |
- | 250 | + | |
- | [root@centos7 ~]# systemctl show -p MainPID foo.service | + | |
- | MainPID=27233 | + | |
- | [root@centos7 ~]# cat / | + | |
- | 4: | + | |
- | 1: | + | |
- | </ | + | |
- | Créez maintenant le service **bar** : | + | ====Autres Technologies==== |
- | < | + | Il existe aussi des logiciels |
- | [root@centos7 ~]# vi / | + | |
- | [root@centos7 ~]# cat / | + | |
- | [Unit] | + | |
- | Description=The bar service that does nothing useful | + | |
- | After=remote-fs.target nss-lookup.target | + | |
- | + | ||
- | [Service] | + | |
- | ExecStart=/ | + | |
- | ExecStop=/ | + | |
- | + | ||
- | [Install] | + | |
- | WantedBy=multi-user.target | + | |
- | </ | + | |
- | + | ||
- | Fixez maintenant la limite | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# systemctl set-property bar.service CPUShares=2000 | + | |
- | Failed to set unit properties on bar.service: | + | |
- | [root@centos7 ~]# systemctl start bar.service | + | |
- | [root@centos7 ~]# systemctl enable bar.service | + | |
- | Created symlink from / | + | |
- | [root@centos7 ~]# systemctl set-property bar.service CPUShares=2000 | + | |
- | </ | + | |
- | + | ||
- | Appliquez la limite : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# systemctl daemon-reload | + | |
- | [root@centos7 ~]# systemctl restart bar.service | + | |
- | [root@centos7 ~]# systemctl status bar.service | + | |
- | ● bar.service - The bar service that does nothing useful | + | |
- | | + | |
- | Drop-In: / | + | |
- | | + | |
- | | + | |
- | Main PID: 29515 (md5sum) | + | |
- | | + | |
- | | + | |
- | + | ||
- | Jun 15 13:37:54 centos7.fenestros.loc systemd[1]: Started The bar service that does nothing useful. | + | |
- | Jun 15 13:37:54 centos7.fenestros.loc systemd[1]: Starting The bar service that does nothing useful... | + | |
- | </ | + | |
- | + | ||
- | Re-démarrer les services foo et bar : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# systemctl restart foo.service | + | |
- | [root@centos7 ~]# systemctl status foo.service | + | |
- | ● foo.service - The foo service that does nothing useful | + | |
- | | + | |
- | Drop-In: / | + | |
- | | + | |
- | | + | |
- | Main PID: 652 (sha1sum) | + | |
- | | + | |
- | | + | |
- | + | ||
- | Jun 15 13:50:08 centos7.fenestros.loc systemd[1]: Started The foo service that does nothing useful. | + | |
- | Jun 15 13:50:08 centos7.fenestros.loc systemd[1]: Starting The foo service that does nothing useful... | + | |
- | [root@centos7 ~]# systemctl restart bar.service | + | |
- | [root@centos7 ~]# systemctl status bar.service | + | |
- | ● bar.service - The bar service that does nothing useful | + | |
- | | + | |
- | Drop-In: / | + | |
- | | + | |
- | | + | |
- | Main PID: 810 (md5sum) | + | |
- | | + | |
- | | + | |
- | + | ||
- | Jun 15 13:50:38 centos7.fenestros.loc systemd[1]: Started The bar service that does nothing useful. | + | |
- | Jun 15 13:50:38 centos7.fenestros.loc systemd[1]: Starting The bar service that does nothing useful... | + | |
- | </ | + | |
- | + | ||
- | Utilisez ps pour voir le pourcentage du CPU utilisé par les deux services : | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# ps -p 652,810 -o pid, | + | |
- | PID COMMAND | + | |
- | 652 sha1sum | + | |
- | 810 md5sum | + | |
- | </ | + | |
----- | ----- | ||
< | < | ||
<div align=" | <div align=" | ||
- | Copyright © 2021 Hugh Norris. | + | Copyright © 2022 Hugh Norris. |
</ | </ |