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:8:avance:l112 [2021/08/23 17:00] – admin | elearning:workbooks:centos:8:avance:l112 [2024/10/01 08:07] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
~~PDF: | ~~PDF: | ||
+ | |||
+ | Version : **2024.01** | ||
Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
- | ======LCF304 | + | ======LCF604 |
+ | |||
+ | < | ||
+ | [root@centos8 ~]# sed -i ' | ||
+ | [root@centos8 ~]# sed -i ' | ||
+ | </ | ||
=====Contenu du Module===== | =====Contenu du Module===== | ||
- | * **LCF304 | + | * **LCF604 |
- | * X Window System | + | * Contenu du Module |
- | * Configuration | + | * Présentation des Fichiers Spéciaux |
- | * Gestionnaire de Fenêtres | + | * LAB #1 - Découvrir le Matériel |
- | * Toolkits | + | * 1.1 - La Commande lspci |
- | * Freedesktop | + | * 1.2 - La Commande lsusb |
- | * Display Manager | + | * 1.3 - La Commande lsblk |
- | * XDM, GDM et KDM | + | * 1.4 - La Commande lsscsi |
- | * LightDM | + | * 1.5 - La Commande lscpu |
- | * X.orgX11 | + | * 1.6 - La Commande lshw |
- | * Présentation | + | * 1.7 - La Commande dmidecode |
- | * Démarrage et Arrêt | + | * 1.8 - La Commande smartctl |
- | * Utilisation | + | * 1.9 - Les Commandes accton et dump-acct |
- | * Configuration | + | * 1.10 - La Commande lastcomm |
- | * La Section ServerFlags | + | * 1.11 - La Commande sa |
- | * La Section ServerLayout | + | * 1.12 - La Commande ac |
- | * La Section Files | + | * LAB #2 - La Commande sysctl |
- | * La Section | + | * 2.1 - Répertoire /proc |
- | * La Section InputDevice | + | * Fichiers |
- | * La Section Monitor | + | * Processeur |
- | * La Section Device | + | * Interruptions système |
- | * La Section Screen | + | * Canaux DMA |
- | * La Commande | + | * Plages d' |
- | * La Commande | + | * Périphériques |
- | * L' | + | * Modules |
- | * Le Clavier et la Souris | + | * Statistiques de l' |
- | * Claviers Visuels | + | * Partitions |
- | * L' | + | * Espaces de pagination |
- | * Autres Technologies | + | * Statistiques d' |
+ | * Statistiques d' | ||
+ | * Version du noyau | ||
+ | * Répertoires | ||
+ | * ide/scsi | ||
+ | * acpi | ||
+ | * bus | ||
+ | * net | ||
+ | * sys | ||
+ | * 2.2 - Utilisation de la Commande | ||
+ | * LAB #3 - Interprétation des informations dans /proc | ||
+ | * 3.1 - free | ||
+ | * 3.2 - uptime ou w | ||
+ | * 3.3 - iostat | ||
+ | * 3.4 - hdparm | ||
+ | * 3.5 - vmstat | ||
+ | * 3.6 - mpstat | ||
+ | * 3.7 - sar | ||
+ | * Modules usb | ||
+ | * udev | ||
+ | * La Commande | ||
+ | * Système de fichiers /sys | ||
+ | * LAB #4 - Limiter les Ressources | ||
+ | * 4.1 - ulimit | ||
+ | * 4.2 - Groupes de Contrôle | ||
+ | * La Limitation de la Mémoire | ||
+ | * La Commande cgcreate | ||
+ | * La Commande cgdelete | ||
+ | * Le Fichier / | ||
+ | * La Commande cgconfigparser | ||
- | =====X Window System===== | + | =====Présentation des Fichiers Spéciaux===== |
- | L'architecture graphique de Linux est **X Window System**, aussi appelé | + | Dans l'ordinateur les périphériques sont reliés à un **contrôleur** qui communique avec le processeur à l'aide d' |
- | * Fenêtres, | + | <WRAP center round important 60%> |
- | * Boutons, | + | **Important** : Les périphériques qui nécessitent à ce que l' |
- | | + | </ |
- | | + | |
- | | + | |
- | **X** est une application client/serveur. | + | Consultez le contenu du répertoire |
- | Il existe trois versions de X : | + | < |
+ | [root@centos8 ~]# ls -l /dev | more | ||
+ | total 0 | ||
+ | crw-r--r--. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | lrwxrwxrwx. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | crw-------. | ||
+ | lrwxrwxrwx. | ||
+ | drwxr-xr-x. 10 root root 200 Jun 28 02:04 cpu | ||
+ | crw-------. | ||
+ | drwxr-xr-x. | ||
+ | brw-rw----. | ||
+ | brw-rw----. | ||
+ | drwxr-xr-x. | ||
+ | crw-rw----. | ||
+ | lrwxrwxrwx. | ||
+ | crw-rw-rw-. | ||
+ | crw-rw-rw-. | ||
+ | crw-------. | ||
+ | crw-------. | ||
+ | drwxr-xr-x. | ||
+ | crw-------. | ||
+ | lrwxrwxrwx. | ||
+ | drwxr-xr-x. | ||
+ | crw-r--r--. | ||
+ | lrwxrwxrwx. | ||
+ | crw-rw----. | ||
+ | crw-rw----. | ||
+ | crw-rw----. | ||
+ | crw-rw----. | ||
+ | crw-rw----. | ||
+ | drwxr-xr-x. | ||
+ | crw-------. | ||
+ | crw-r-----. | ||
+ | drwxrwxrwt. | ||
+ | drwxr-xr-x. | ||
+ | crw-rw-rw-. | ||
+ | --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-. | ||
+ | ... | ||
+ | </ | ||
- | IL existe plusieurs outils pour configurer | + | 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' |
- | * **XFree86 configure** est la commande utilisé 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 |
- | * **Xorg configure** est la commande utilisé pour configurer un serveur X basé sur X.orgX11. Cette commande produit | + | |
- | <WRAP center round important> | + | * le **majeur** identifie le pilote du périphérique et donc son contrôleur, |
- | **Important** : Ces deux commandes doivent être utilisées quand le serveur X est arrêté. | + | * le **mineur** identifie |
- | </ | + | |
- | 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 | + | =====LAB #1 - Découvrir |
- | Dernièrement il existe des outils spécifiques à une distribution : | + | ====1.1 - La Commande lspci==== |
- | * Red Hat, CentOS, Fedora | + | Cette commande vous renseigne sur les adaptateurs reliés aux bus PCI, AGP et PCI express |
- | <WRAP center round important> | + | <code> |
- | **Important** | + | [root@centos8 ~]# lspci |
- | </WRAP> | + | 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02) |
+ | 00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/ | ||
+ | 00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/ | ||
+ | 00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/ | ||
+ | 00:01.3 Bridge: Intel Corporation 82371AB/ | ||
+ | 00:02.0 VGA compatible controller: Device 1234:1111 (rev 02) | ||
+ | 00:03.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon | ||
+ | 00:07.0 SATA controller: Intel Corporation 82801IR/ | ||
+ | 00:12.0 Ethernet controller: Red Hat, Inc. Virtio network device | ||
+ | 00:1e.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge | ||
+ | 00:1f.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge | ||
+ | </code> | ||
- | Les fichiers | + | Pour obtenir |
- | * **[[http://www.xfree86.org|XFree86]]** 4.x, | + | < |
- | * **/ | + | [root@centos8 ~]# lspci -v -s 00:03.0 |
- | * **[[http:// | + | 00:03.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon |
- | * **/ | + | |
- | * **[[http:// | + | |
- | * **/etc/ | + | Flags: bus master, fast devsel, latency 0, IRQ 10 |
+ | I/O ports at e000 [size=64] | ||
+ | Memory at fe400000 (64-bit, prefetchable) [size=16K] | ||
+ | | ||
+ | Capabilities: | ||
+ | Capabilities: | ||
+ | Capabilities: | ||
+ | | ||
+ | Kernel driver in use: virtio-pci | ||
+ | </code> | ||
- | =====Gestionnaire de Fenêtres===== | + | ou : |
- | **X** ne doit être confondue avec un **Gestionnaire de Fenêtres** (//Window Manager//). Le Gestionnaire de Fenêtres est responsable de la mise en page des élements fournis pas **X**. C'est pour cette raison que sous Linux il existe de nombreux Gestionnaires différents tels : | + | < |
+ | [root@centos8 ~]# lspci -vv -s 00:03.0 | ||
+ | 00:03.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon | ||
+ | Subsystem: Red Hat, Inc. Device 0005 | ||
+ | Physical Slot: 3 | ||
+ | Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- | ||
+ | Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- | ||
+ | Latency: 0 | ||
+ | Interrupt: pin A routed to IRQ 10 | ||
+ | Region 0: I/O ports at e000 [size=64] | ||
+ | Region 4: Memory at fe400000 (64-bit, prefetchable) [size=16K] | ||
+ | Capabilities: [84] Vendor Specific Information: | ||
+ | BAR=0 offset=00000000 size=00000000 | ||
+ | Capabilities: | ||
+ | BAR=4 offset=00003000 size=00001000 multiplier=00000004 | ||
+ | Capabilities: | ||
+ | BAR=4 offset=00002000 size=00001000 | ||
+ | Capabilities: | ||
+ | BAR=4 offset=00001000 size=00001000 | ||
+ | Capabilities: | ||
+ | BAR=4 offset=00000000 size=00001000 | ||
+ | Kernel driver in use: virtio-pci | ||
+ | </ | ||
- | * KDE, | + | ===Options de la commande=== |
- | * GNOME, | + | |
- | * twm, | + | |
- | * IceWM, | + | |
- | * Rvwm, | + | |
- | * CDE, | + | |
- | * WindowMaker, | + | |
- | * Enlightenment, | + | |
- | * Xfce, | + | |
- | * Afterstep | + | |
- | * Compiz Fusion, | + | |
- | * Fluxbox, | + | |
- | * Openbox, | + | |
- | * Metacity, | + | |
- | * Blackbox, | + | |
- | * Ion, | + | |
- | * Wmii, | + | |
- | * etc. | + | |
- | Les Gestionnaires les plus connus | + | Les options de cette commande |
- | * **KDE** (//Kool Desktop Environment// | + | < |
- | * **GNOME** (//Gnu Network Object Model Environment// | + | [root@centos8 ~]# lspci --help |
+ | lspci: invalid option -- ' | ||
+ | Usage: lspci [< | ||
- | =====Toolkits===== | + | Basic display modes: |
+ | -mm | ||
+ | -t Show bus tree | ||
- | Chaque Gestionnaire utilise une bibliothèque graphique contenant des fonctions " | + | Display options: |
+ | -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 | ||
+ | -P Display bridge path in addition to bus and device number | ||
+ | -PP | ||
- | Une bibliothèque complète est appelée un **Widget Toolkit**. Le Toolkit le plus connu est **MOTIF**. Cependant **MOTIF** | + | Resolving of device ID's to names: |
+ | -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 | ||
- | Comme dans beaucoup de cas de développement sous Linux, il existe plusieurs Toolkits dont les deux les plus connus sont : | + | Selection of devices: |
+ | -s [[[[< | ||
+ | -d [< | ||
- | * **GTK** (//GIMP Toolkit//), programé en langage C et embarqué par défaut dans le Gestionnaire de Fenêtres **Gnome**, | + | Other options: |
- | * **QT** (//Cute//), programé en langage C++ et embarqué par défaut dans le Gestionnaire de Fenêtres **KDE**. | + | -i < |
+ | -p < | ||
+ | -M Enable `bus | ||
+ | </ | ||
- | =====Freedesktop===== | + | ====1.2 - La Commande lsusb==== |
- | Afin d' | + | Cette commande vous renseigne |
- | =====Display Manager===== | + | < |
+ | [root@centos8 ~]# lsusb | ||
+ | Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd | ||
+ | Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub | ||
- | 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@centos8 ~]# lsusb -vt |
+ | /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/ | ||
+ | |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, | ||
+ | </ | ||
- | Pour les connexions à distance le Display Manager utilise le protocole **XDMCP** (//X Display Manager Control Panel//)). Le fichier | + | ===Options |
- | ====XDM, GDM et KDM==== | + | Les options de cette commande sont : |
- | Le Display Manager par défaut, compatible avec tous les serveurs **X**, est **XDM**. Les deux autres Display Managers les plus connus sont : | + | < |
+ | [root@centos8 ~]# lsusb --help | ||
+ | Usage: lsusb [options]... | ||
+ | List USB devices | ||
+ | -v, --verbose | ||
+ | Increase verbosity (show descriptors) | ||
+ | -s [[bus]:][devnum] | ||
+ | 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) | ||
+ | .LAB#1 | ||
+ | -D device | ||
+ | Selects which device lsusb will examine | ||
+ | -t, --tree | ||
+ | Dump the physical USB device hierarchy as a tree | ||
+ | -V, --version | ||
+ | Show version of program | ||
+ | -h, --help | ||
+ | Show usage and help | ||
+ | </ | ||
- | * **GDM** pour GNOME, | + | ====1.3 - La Commande lsblk==== |
- | * **KDM** pour KDE, | + | |
- | * **LightDM** de Canonical. | + | |
- | Les deux premiers sont essentiellement | + | Cette commande vous rensigne sur les partitions |
- | * le passage d'un utilisateur à un autre, | + | < |
- | | + | [root@centos8 ~]# lsblk |
- | | + | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT |
- | | + | sda |
- | | + | ├─sda1 |
- | | + | └─sda2 |
+ | | ||
+ | └─cl_centos8-swap 253:1 0 3.2G 0 lvm [SWAP] | ||
+ | sdb | ||
+ | sdc | ||
+ | └─sdc1 | ||
+ | sdd | ||
+ | sr0 11:0 1 1024M 0 rom | ||
- | ====LightDM==== | + | [root@centos8 ~]# lsblk -l |
+ | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | ||
+ | sda | ||
+ | sda1 8:1 0 1G 0 part /boot | ||
+ | sda2 8:2 0 | ||
+ | sdb | ||
+ | sdc | ||
+ | sdc1 8:33 | ||
+ | sdd | ||
+ | sr0 11:0 1 1024M 0 rom | ||
+ | cl_centos8-root 253:0 0 27.8G 0 lvm / | ||
+ | cl_centos8-swap 253:1 0 3.2G 0 lvm [SWAP] | ||
+ | </ | ||
- | LightDM est un gestionnaire d' | + | ===Options |
- | * Pas de dépendances de Gnome | + | Les options |
- | * Utilisation de webkit pour le rendu des thèmes | + | |
- | * Support de Toolkits Gtk et Qt | + | |
- | Sous RHEL/CentOS 7, LightDM | + | < |
+ | [root@centos8 ~]# lsblk --help | ||
+ | |||
+ | Usage: | ||
+ | lsblk [options] [< | ||
+ | |||
+ | List information about block devices. | ||
+ | |||
+ | Options: | ||
+ | -a, --all print all devices | ||
+ | -b, --bytes | ||
+ | -d, --nodeps | ||
+ | -D, --discard | ||
+ | -z, --zoned | ||
+ | -e, --exclude < | ||
+ | -f, --fs | ||
+ | -i, --ascii | ||
+ | -I, --include < | ||
+ | -J, --json | ||
+ | -l, --list | ||
+ | -T, --tree | ||
+ | -m, --perms | ||
+ | -n, --noheadings | ||
+ | -o, --output < | ||
+ | -O, --output-all | ||
+ | -p, --paths | ||
+ | -P, --pairs | ||
+ | -r, --raw use raw output format | ||
+ | -s, --inverse | ||
+ | -S, --scsi | ||
+ | -t, --topology | ||
+ | -x, --sort < | ||
+ | |||
+ | -h, --help | ||
+ | -V, --version | ||
+ | |||
+ | Available output columns: | ||
+ | NAME device name | ||
+ | | ||
+ | | ||
+ | FSTYPE | ||
+ | MOUNTPOINT | ||
+ | | ||
+ | UUID filesystem UUID | ||
+ | PARTTYPE | ||
+ | | ||
+ | PARTUUID | ||
+ | | ||
+ | RA read-ahead of the device | ||
+ | RO read-only device | ||
+ | RM removable device | ||
+ | | ||
+ | | ||
+ | SERIAL | ||
+ | SIZE size of the device | ||
+ | | ||
+ | | ||
+ | | ||
+ | MODE device node permissions | ||
+ | | ||
+ | MIN-IO | ||
+ | OPT-IO | ||
+ | | ||
+ | | ||
+ | ROTA rotational device | ||
+ | | ||
+ | | ||
+ | TYPE device type | ||
+ | DISC-ALN | ||
+ | | ||
+ | DISC-MAX | ||
+ | | ||
+ | | ||
+ | | ||
+ | RAND adds randomness | ||
+ | PKNAME | ||
+ | HCTL Host: | ||
+ | TRAN device transport type | ||
+ | SUBSYSTEMS | ||
+ | | ||
+ | VENDOR | ||
+ | | ||
+ | |||
+ | For more details see lsblk(8). | ||
+ | </ | ||
+ | |||
+ | ====1.4 - La Commande lsscsi==== | ||
+ | |||
+ | Cette commmande vous renseigne sur les périphériques SCSI et NVMe : | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | Loaded plugins: fastestmirror, | + | [1:0:0:0] cd/ |
- | Loading mirror speeds from cached hostfile | + | [2:0: |
- | * base: fr.mirror.babylon.network | + | [3:0: |
- | * extras: fr.mirror.babylon.network | + | [4: |
- | * updates: fr.mirror.babylon.network | + | [5:0:0:0] disk ATA QEMU HARDDISK |
- | Resolving Dependencies | + | </code> |
- | --> Running transaction check | + | |
- | ---> Package epel-release.noarch | + | |
- | --> Finished Dependency Resolution | + | |
- | Dependencies Resolved | + | ===Options de la commande=== |
- | ================================================================================ | + | Les options de cette commande sont : |
- | | + | |
- | ================================================================================ | + | |
- | Installing: | + | |
- | | + | |
- | Transaction Summary | + | < |
- | ================================================================================ | + | [root@centos8 ~]# man lsscsi |
- | Install | + | [root@centos8 ~]# lsscsi --help |
+ | Usage: lsscsi | ||
+ | [--help] [--hosts] [--kname] [--list] [--long] [--long-unit] | ||
+ | [--lunhex] [--no-nvme] [--pdt] [--protection] [--prot-mode] | ||
+ | [--scsi_id] [--size] [--sz-lbs] [--sysfsroot=PATH] [--transport] | ||
+ | [--unit] [--verbose] [--version] [--wwn] | ||
+ | where: | ||
+ | --brief|-b | ||
+ | --classic|-c | ||
+ | --controllers|-C | ||
+ | like SCSI hosts | ||
+ | --device|-d | ||
+ | --generic|-g | ||
+ | --help|-h | ||
+ | --hosts|-H | ||
+ | --kname|-k | ||
+ | --list|-L | ||
+ | attribute=value per line | ||
+ | --long|-l | ||
+ | --long-unit|-U | ||
+ | ' | ||
+ | --lunhex|-x | ||
+ | use twice to get full 16 digit hexadecimal LUN | ||
+ | --no-nvme|-N | ||
+ | --pdt|-D | ||
+ | --protection|-p | ||
+ | --protmode|-P | ||
+ | --scsi_id|-i | ||
+ | --size|-s | ||
+ | twice for power of two (e.g. 2.7 GiB), | ||
+ | thrice for number of blocks)) | ||
+ | --sysfsroot=PATH|-y PATH set sysfs mount point to PATH (def: /sys) | ||
+ | --sz-lbs|-S | ||
+ | adds comma followed by logical block size in bytes | ||
+ | --transport|-t | ||
+ | given, for initiator | ||
+ | | ||
+ | --verbose|-v | ||
+ | --version|-V | ||
+ | --wwn|-w | ||
+ | < | ||
+ | < | ||
+ | <' | ||
- | Total download size: 14 k | + | List SCSI devices or hosts, followed by NVMe namespaces or controllers. |
- | Installed size: 24 k | + | Many storage devices (e.g. SATA disks and USB attached storage) use SCSI |
- | Downloading packages: | + | command sets and hence are also listed by this utility. Hyphenated long |
- | epel-release-7-6.noarch.rpm | 14 kB | + | options can also take underscore (and vice versa). |
- | Running transaction check | + | </code> |
- | Running transaction test | + | |
- | Transaction test succeeded | + | |
- | Running transaction | + | |
- | Installing : epel-release-7-6.noarch | + | |
- | | + | |
- | Installed: | + | ====1.5 - La Commande lscpu==== |
- | epel-release.noarch 0:7-6 | + | |
- | Complete! | + | Cett commande vous renseigne sur l' |
+ | |||
+ | < | ||
+ | [root@centos8 ~]# lscpu | ||
+ | Architecture: | ||
+ | CPU op-mode(s): | ||
+ | Byte Order: | ||
+ | CPU(s): | ||
+ | On-line CPU(s) list: 0-7 | ||
+ | Thread(s) per core: 1 | ||
+ | Core(s) per socket: | ||
+ | Socket(s): | ||
+ | NUMA node(s): | ||
+ | Vendor ID: | ||
+ | BIOS Vendor ID: QEMU | ||
+ | CPU family: | ||
+ | Model: | ||
+ | Model name: Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz | ||
+ | BIOS Model name: | ||
+ | Stepping: | ||
+ | CPU MHz: | ||
+ | BogoMIPS: | ||
+ | Virtualization: | ||
+ | Hypervisor vendor: | ||
+ | Virtualization type: full | ||
+ | L1d cache: | ||
+ | L1i cache: | ||
+ | L2 cache: | ||
+ | L3 cache: | ||
+ | NUMA node0 CPU(s): | ||
+ | Flags: | ||
</ | </ | ||
- | Installez ensuite LightDM | + | ===Options de la commande=== |
+ | |||
+ | Les options de cette commande sont : | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | Loaded plugins: fastestmirror, | + | |
- | epel/ | + | |
- | epel | 4.3 kB | + | |
- | (1/3): epel/ | + | |
- | (2/3): epel/ | + | |
- | (3/3): epel/ | + | |
- | Loading mirror speeds from cached hostfile | + | |
- | * base: fr.mirror.babylon.network | + | |
- | * epel: mirrors.ircam.fr | + | |
- | * extras: fr.mirror.babylon.network | + | |
- | * updates: fr.mirror.babylon.network | + | |
- | 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 | + | |
- | Dependencies Resolved | + | Usage: |
+ | lscpu [options] | ||
- | ================================================================================ | + | Display information about the CPU architecture. |
- | | + | |
- | ================================================================================ | + | |
- | Installing: | + | |
- | | + | |
- | Installing for dependencies: | + | |
- | | + | |
- | | + | |
- | | + | |
- | Transaction Summary | + | Options: |
- | ================================================================================ | + | -a, --all print both online and offline CPUs (default for -e) |
- | Install | + | -b, --online |
+ | -c, --offline | ||
+ | -J, --json | ||
+ | -e, --extended[=< | ||
+ | -p, --parse[=< | ||
+ | -s, --sysroot < | ||
+ | -x, --hex print hexadecimal masks rather than lists of CPUs | ||
+ | -y, --physical | ||
- | Total download size: 362 k | + | -h, --help display this help |
- | Installed size: 970 k | + | -V, --version |
- | 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 | + | |
- | Installed: | + | Available output columns: |
- | | + | CPU logical CPU number |
+ | CORE logical core number | ||
+ | SOCKET | ||
+ | | ||
+ | NODE logical NUMA node number | ||
+ | BOOK logical book number | ||
+ | DRAWER | ||
+ | | ||
+ | POLARIZATION | ||
+ | | ||
+ | CONFIGURED | ||
+ | ONLINE | ||
+ | MAXMHZ | ||
+ | MINMHZ | ||
- | Dependency Installed: | + | For more details see lscpu(1). |
- | lightdm-gobject.x86_64 0:1.10.6-4.el7 | + | </ |
- | Complete! | + | ====1.6 - La Command lshw==== |
+ | |||
+ | Cette commande vous renseigne sur le matériel selon la **classe** de celui-ci. Commencez par visualiser les périphériques et leurs classes répectives : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# lshw -businfo | ||
+ | Bus info Device | ||
+ | ==================================================== | ||
+ | system | ||
+ | bus Motherboard | ||
+ | memory | ||
+ | cpu@0 | ||
+ | cpu@1 | ||
+ | memory | ||
+ | memory | ||
+ | pci@0000: | ||
+ | pci@0000: | ||
+ | input PnP device PNP0303 | ||
+ | input PnP device PNP0f13 | ||
+ | storage | ||
+ | system | ||
+ | pci@0000: | ||
+ | scsi@1: | ||
+ | pci@0000: | ||
+ | usb@1 | ||
+ | usb@1: | ||
+ | pci@0000: | ||
+ | pci@0000: | ||
+ | pci@0000: | ||
+ | virtio@0 | ||
+ | pci@0000: | ||
+ | scsi@2: | ||
+ | scsi@2: | ||
+ | scsi@2: | ||
+ | scsi@3: | ||
+ | scsi@4: | ||
+ | scsi@4: | ||
+ | scsi@5: | ||
+ | pci@0000: | ||
+ | virtio@1 | ||
+ | pci@0000: | ||
+ | virtio@2 | ||
+ | pci@0000: | ||
+ | pci@0000: | ||
+ | input0 | ||
+ | input1 | ||
+ | input3 | ||
+ | input4 | ||
+ | input6 | ||
</ | </ | ||
- | Le fichier | + | Consultez maintenant le matériel |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | # | + | centos8.ittraining.loc |
- | # 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 | + | *-pnp00:03 |
- | # guest-account-script = Script to be run to setup guest account | + | product: PnP device PNP0b00 |
- | # logind-load-seats = True to automatically set up multi-seat configuration from logind | + | physical id: 3 |
- | # logind-check-graphical = True to on start seats that are marked as graphical by logind | + | capabilities: |
- | # log-directory = Directory to log information to | + | configuration: driver=rtc_cmos |
- | # run-directory = Directory to put running state in | + | </code> |
- | # 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 | + | |
- | # | + | |
- | [LightDM] | + | |
- | # | + | |
- | # | + | |
- | #minimum-display-number=0 | + | |
- | minimum-vt=1 | + | |
- | #lock-memory=true | + | |
- | user-authority-in-system-dir=true | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | Consultez maintenant le matériel des autres classes principales : |
- | # Seat defaults | + | |
- | # | + | |
- | # 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 and session | + | |
- | # 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=/ | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
+ | < | ||
+ | [root@centos8 ~]# lshw -c memory | ||
+ | *-firmware | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | date: 04/01/2014 | ||
+ | size: 96KiB | ||
+ | *-memory | ||
+ | | ||
+ | | ||
+ | size: 16GiB | ||
+ | | ||
+ | | ||
+ | | ||
+ | description: | ||
+ | vendor: QEMU | ||
+ | physical id: 0 | ||
+ | slot: DIMM 0 | ||
+ | |||
+ | [root@centos8 ~]# lshw -c video | ||
+ | *-display | ||
+ | | ||
+ | | ||
+ | | ||
+ | bus info: pci@0000: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | [root@centos8 ~]# lshw -c storage | ||
+ | *-pnp00: | ||
+ | | ||
+ | | ||
+ | | ||
+ | *-ide | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | bus info: pci@0000: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | *-sata | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | bus info: pci@0000: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | [root@centos8 ~]# lshw -c disk | ||
+ | *-cdrom | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | bus info: scsi@1: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | *-disk:0 | ||
+ | | ||
+ | | ||
+ | | ||
+ | bus info: scsi@2: | ||
+ | | ||
+ | | ||
+ | | ||
+ | size: 32GiB (34GB) | ||
+ | | ||
+ | | ||
+ | *-disk:1 | ||
+ | | ||
+ | | ||
+ | | ||
+ | bus info: scsi@3: | ||
+ | | ||
+ | | ||
+ | | ||
+ | size: 4GiB (4294MB) | ||
+ | | ||
+ | *-disk:2 | ||
+ | | ||
+ | | ||
+ | | ||
+ | bus info: scsi@4: | ||
+ | | ||
+ | | ||
+ | | ||
+ | size: 64GiB (68GB) | ||
+ | | ||
+ | | ||
+ | *-disk:3 | ||
+ | | ||
+ | | ||
+ | | ||
+ | bus info: scsi@5: | ||
+ | | ||
+ | | ||
+ | | ||
+ | size: 32GiB (34GB) | ||
+ | | ||
+ | |||
+ | |||
+ | [root@centos8 ~]# lshw -c volume | ||
+ | *-volume: | ||
+ | | ||
+ | | ||
+ | | ||
+ | bus info: scsi@2: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | size: 1GiB | ||
+ | | ||
+ | | ||
+ | | ||
+ | *-volume:1 | ||
+ | | ||
+ | | ||
+ | bus info: scsi@2: | ||
+ | | ||
+ | | ||
+ | size: 30GiB | ||
+ | | ||
+ | | ||
+ | *-volume | ||
+ | | ||
+ | | ||
+ | | ||
+ | bus info: scsi@4: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | size: 63GiB | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | [root@centos8 ~]# lshw -c network | ||
+ | *-network: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | bus info: pci@0000: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | description: | ||
+ | physical id: 0 | ||
+ | bus info: virtio@1 | ||
+ | logical name: ens18 | ||
+ | serial: 5e: | ||
+ | capabilities: | ||
+ | configuration: | ||
+ | *-network:1 | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | bus info: pci@0000: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | description: | ||
+ | physical id: 0 | ||
+ | bus info: virtio@2 | ||
+ | logical name: ens19 | ||
+ | serial: ea: | ||
+ | capabilities: | ||
+ | configuration: | ||
+ | </ | ||
+ | |||
+ | ===Options de la commande=== | ||
+ | |||
+ | Les options de cette commande sont : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# lshw -h | ||
+ | Hardware Lister (lshw) - B.02.19.2 | ||
+ | usage: lshw [-format] [-options ...] | ||
+ | lshw -version | ||
+ | |||
+ | -version | ||
+ | |||
+ | format can be | ||
+ | -html | ||
+ | -xml output hardware tree as XML | ||
+ | -json | ||
+ | -short | ||
+ | -businfo | ||
+ | |||
+ | options can be | ||
+ | -dump filename | ||
+ | -class CLASS only show a certain class of hardware | ||
+ | -C CLASS same as ' | ||
+ | -c CLASS same as ' | ||
+ | -disable TEST | ||
+ | -enable TEST enable a test (like pci, isapnp, cpuid, etc. ) | ||
+ | -quiet | ||
+ | -sanitize | ||
+ | -numeric | ||
+ | -notime | ||
+ | </ | ||
+ | |||
+ | ====1.7 - La Commande dmidecode==== | ||
+ | |||
+ | La commande **dmidecode** lit la table **DMI** (//Desktop Management Interface// | ||
+ | |||
+ | * l' | ||
+ | * les extensions possibles. | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# dmidecode | ||
+ | # dmidecode 3.2 | ||
+ | Getting SMBIOS data from sysfs. | ||
+ | SMBIOS 2.8 present. | ||
+ | 11 structures occupying 511 bytes. | ||
+ | Table at 0x000F5870. | ||
+ | |||
+ | Handle 0x0000, DMI type 0, 24 bytes | ||
+ | BIOS Information | ||
+ | Vendor: SeaBIOS | ||
+ | Version: rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org | ||
+ | Release Date: 04/01/2014 | ||
+ | Address: 0xE8000 | ||
+ | Runtime Size: 96 kB | ||
+ | ROM Size: 64 kB | ||
+ | Characteristics: | ||
+ | BIOS characteristics not supported | ||
+ | Targeted content distribution is supported | ||
+ | BIOS Revision: 0.0 | ||
+ | |||
+ | Handle 0x0100, DMI type 1, 27 bytes | ||
+ | System Information | ||
+ | Manufacturer: | ||
+ | Product Name: Standard PC (i440FX + PIIX, 1996) | ||
+ | Version: pc-i440fx-5.2 | ||
+ | Serial Number: Not Specified | ||
+ | UUID: 95bd69e3-4a74-44a7-b58c-b74fbfb86df2 | ||
+ | Wake-up Type: Power Switch | ||
+ | SKU Number: Not Specified | ||
+ | Family: Not Specified | ||
+ | |||
+ | Handle 0x0300, DMI type 3, 22 bytes | ||
+ | Chassis Information | ||
+ | Manufacturer: | ||
+ | Type: Other | ||
+ | Lock: Not Present | ||
+ | Version: pc-i440fx-5.2 | ||
+ | Serial Number: Not Specified | ||
+ | Asset Tag: Not Specified | ||
+ | Boot-up State: Safe | ||
+ | Power Supply State: Safe | ||
+ | Thermal State: Safe | ||
+ | Security Status: Unknown | ||
+ | OEM Information: | ||
+ | Height: Unspecified | ||
+ | Number Of Power Cords: Unspecified | ||
+ | Contained Elements: 0 | ||
+ | SKU Number: Not Specified | ||
+ | |||
+ | Handle 0x0400, DMI type 4, 42 bytes | ||
+ | Processor Information | ||
+ | Socket Designation: | ||
+ | Type: Central Processor | ||
+ | Family: Other | ||
+ | Manufacturer: | ||
+ | ID: 61 0F 00 00 FF FB 8B 07 | ||
+ | Version: pc-i440fx-5.2 | ||
+ | Voltage: Unknown | ||
+ | External Clock: Unknown | ||
+ | Max Speed: 2000 MHz | ||
+ | Current Speed: 2000 MHz | ||
+ | Status: Populated, Enabled | ||
+ | Upgrade: Other | ||
+ | L1 Cache Handle: Not Provided | ||
+ | L2 Cache Handle: Not Provided | ||
+ | L3 Cache Handle: Not Provided | ||
+ | Serial Number: Not Specified | ||
+ | Asset Tag: Not Specified | ||
+ | Part Number: Not Specified | ||
+ | Core Count: 4 | ||
+ | Core Enabled: 4 | ||
+ | Thread Count: 1 | ||
+ | Characteristics: | ||
+ | |||
+ | Handle 0x0401, DMI type 4, 42 bytes | ||
+ | Processor Information | ||
+ | Socket Designation: | ||
+ | Type: Central Processor | ||
+ | Family: Other | ||
+ | Manufacturer: | ||
+ | ID: 61 0F 00 00 FF FB 8B 07 | ||
+ | Version: pc-i440fx-5.2 | ||
+ | Voltage: Unknown | ||
+ | External Clock: Unknown | ||
+ | Max Speed: 2000 MHz | ||
+ | Current Speed: 2000 MHz | ||
+ | Status: Populated, Enabled | ||
+ | Upgrade: Other | ||
+ | L1 Cache Handle: Not Provided | ||
+ | L2 Cache Handle: Not Provided | ||
+ | L3 Cache Handle: Not Provided | ||
+ | Serial Number: Not Specified | ||
+ | Asset Tag: Not Specified | ||
+ | Part Number: Not Specified | ||
+ | Core Count: 4 | ||
+ | Core Enabled: 4 | ||
+ | Thread Count: 1 | ||
+ | Characteristics: | ||
+ | |||
+ | Handle 0x1000, DMI type 16, 23 bytes | ||
+ | Physical Memory Array | ||
+ | Location: Other | ||
+ | Use: System Memory | ||
+ | Error Correction Type: Multi-bit ECC | ||
+ | Maximum Capacity: 4 GB | ||
+ | Error Information Handle: Not Provided | ||
+ | Number Of Devices: 1 | ||
+ | |||
+ | Handle 0x1100, DMI type 17, 40 bytes | ||
+ | Memory Device | ||
+ | Array Handle: 0x1000 | ||
+ | Error Information Handle: Not Provided | ||
+ | Total Width: Unknown | ||
+ | Data Width: Unknown | ||
+ | Size: 4 GB | ||
+ | Form Factor: DIMM | ||
+ | Set: None | ||
+ | Locator: DIMM 0 | ||
+ | Bank Locator: Not Specified | ||
+ | Type: RAM | ||
+ | Type Detail: Other | ||
+ | Speed: Unknown | ||
+ | Manufacturer: | ||
+ | Serial Number: Not Specified | ||
+ | Asset Tag: Not Specified | ||
+ | Part Number: Not Specified | ||
+ | Rank: Unknown | ||
+ | Configured Memory Speed: Unknown | ||
+ | Minimum Voltage: Unknown | ||
+ | Maximum Voltage: Unknown | ||
+ | Configured Voltage: Unknown | ||
+ | |||
+ | Handle 0x1300, DMI type 19, 31 bytes | ||
+ | Memory Array Mapped Address | ||
+ | Starting Address: 0x00000000000 | ||
+ | Ending Address: 0x000BFFFFFFF | ||
+ | Range Size: 3 GB | ||
+ | Physical Array Handle: 0x1000 | ||
+ | Partition Width: 1 | ||
+ | |||
+ | Handle 0x1301, DMI type 19, 31 bytes | ||
+ | Memory Array Mapped Address | ||
+ | Starting Address: 0x00100000000 | ||
+ | Ending Address: 0x0013FFFFFFF | ||
+ | Range Size: 1 GB | ||
+ | Physical Array Handle: 0x1000 | ||
+ | Partition Width: 1 | ||
+ | |||
+ | Handle 0x2000, DMI type 32, 11 bytes | ||
+ | System Boot Information | ||
+ | Status: No errors detected | ||
+ | |||
+ | Handle 0x7F00, DMI type 127, 4 bytes | ||
+ | End Of Table | ||
+ | </ | ||
+ | |||
+ | ===Options de la commande=== | ||
+ | |||
+ | Les options de cette commande sont : | ||
+ | |||
+ | < | ||
+ | [root@centos7 ~]# dmidecode --help | ||
+ | Usage: dmidecode [OPTIONS] | ||
+ | Options are: | ||
+ | -d, --dev-mem FILE Read memory from device FILE (default: /dev/mem) | ||
+ | -h, --help | ||
+ | -q, --quiet | ||
+ | -s, --string KEYWORD | ||
+ | -t, --type TYPE Only display the entries of given type | ||
+ | -u, --dump | ||
+ | | ||
+ | | ||
+ | -V, --version | ||
+ | </ | ||
+ | |||
+ | ====1.8 - La Commande smartctl==== | ||
+ | |||
+ | **smartctl** contrôle le système SMART (Self-Monitoring, | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# smartctl --smart=on --saveauto=on --offlineauto=on /dev/sdb | ||
+ | |||
+ | [root@centos8 ~]# smartctl -a /dev/sdb | ||
+ | smartctl 7.1 2020-04-05 r5049 [x86_64-linux-4.18.0-305.7.1.el8_4.x86_64] (local build) | ||
+ | Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org | ||
+ | |||
+ | === START OF INFORMATION SECTION === | ||
+ | Device Model: | ||
+ | Serial Number: | ||
+ | Firmware Version: 2.5+ | ||
+ | User Capacity: | ||
+ | Sector Size: 512 bytes logical/ | ||
+ | Device is: Not in smartctl database [for details use: -P showall] | ||
+ | ATA Version is: | ||
+ | Local Time is: Sun Nov 13 09:12:18 2022 CET | ||
+ | SMART support is: Available - device has SMART capability. | ||
+ | SMART support is: Enabled | ||
+ | |||
+ | === START OF READ SMART DATA SECTION === | ||
+ | SMART overall-health self-assessment test result: PASSED | ||
+ | |||
+ | General SMART Values: | ||
+ | Offline data collection status: | ||
+ | was completed without error. | ||
+ | Auto Offline Data Collection: Disabled. | ||
+ | Self-test execution status: | ||
+ | without error or no self-test has ever | ||
+ | been run. | ||
+ | Total time to complete Offline | ||
+ | data collection: | ||
+ | Offline data collection | ||
+ | capabilities: | ||
+ | No Auto Offline data collection support. | ||
+ | Suspend Offline collection upon new | ||
+ | command. | ||
+ | Offline surface scan supported. | ||
+ | Self-test supported. | ||
+ | No Conveyance Self-test supported. | ||
+ | No Selective Self-test supported. | ||
+ | SMART capabilities: | ||
+ | power-saving mode. | ||
+ | Supports SMART auto save timer. | ||
+ | Error logging capability: | ||
+ | No General Purpose Logging support. | ||
+ | Short self-test routine | ||
+ | recommended polling time: ( 2) minutes. | ||
+ | Extended self-test routine | ||
+ | recommended polling time: ( 54) minutes. | ||
+ | |||
+ | SMART Attributes Data Structure revision number: 1 | ||
+ | Vendor Specific SMART Attributes with Thresholds: | ||
+ | ID# ATTRIBUTE_NAME | ||
+ | 1 Raw_Read_Error_Rate | ||
+ | 3 Spin_Up_Time | ||
+ | 4 Start_Stop_Count | ||
+ | 5 Reallocated_Sector_Ct | ||
+ | 9 Power_On_Hours | ||
+ | 12 Power_Cycle_Count | ||
+ | 190 Airflow_Temperature_Cel 0x0003 | ||
+ | |||
+ | SMART Error Log Version: 1 | ||
+ | No Errors Logged | ||
+ | |||
+ | SMART Self-test log structure revision number 1 | ||
+ | No self-tests have been logged. | ||
+ | |||
+ | Selective Self-tests/ | ||
+ | </ | ||
+ | |||
+ | ===Options de la commande=== | ||
+ | |||
+ | Les options de cette commande sont : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# smartctl --help | ||
+ | smartctl 7.1 2020-04-05 r5049 [x86_64-linux-4.18.0-305.7.1.el8_4.x86_64] (local build) | ||
+ | Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org | ||
+ | |||
+ | Usage: smartctl [options] device | ||
+ | |||
+ | ============================================ SHOW INFORMATION OPTIONS ===== | ||
+ | |||
+ | -h, --help, --usage | ||
+ | | ||
+ | |||
+ | -V, --version, --copyright, | ||
+ | Print license, copyright, and version information and exit | ||
+ | |||
+ | -i, --info | ||
+ | Show identity information for device | ||
+ | |||
+ | --identify[=[w][nvb]] | ||
+ | Show words and bits from IDENTIFY DEVICE data (ATA) | ||
+ | |||
+ | -g NAME, --get=NAME | ||
+ | Get device setting: all, aam, apm, dsn, lookahead, security, | ||
+ | wcache, rcache, wcreorder, wcache-sct | ||
+ | |||
+ | -a, --all | ||
+ | Show all SMART information for device | ||
+ | |||
+ | -x, --xall | ||
+ | Show all information for device | ||
+ | |||
+ | --scan | ||
+ | Scan for devices | ||
+ | |||
+ | --scan-open | ||
+ | Scan for devices and try to open each device | ||
+ | |||
+ | ================================== SMARTCTL RUN-TIME BEHAVIOR OPTIONS ===== | ||
+ | |||
+ | -j, --json[=[cgiosuv]] | ||
+ | Print output in JSON format | ||
+ | |||
+ | -q TYPE, --quietmode=TYPE | ||
+ | Set smartctl quiet mode to one of: errorsonly, silent, noserial | ||
+ | |||
+ | -d TYPE, --device=TYPE | ||
+ | | ||
+ | ata, scsi[+TYPE], | ||
+ | |||
+ | -T TYPE, --tolerance=TYPE | ||
+ | | ||
+ | |||
+ | -b TYPE, --badsum=TYPE | ||
+ | Set action on bad checksum to one of: warn, exit, ignore | ||
+ | |||
+ | -r TYPE, --report=TYPE | ||
+ | | ||
+ | |||
+ | -n MODE[, | ||
+ | No check if: never, sleep, standby, idle (see man page) | ||
+ | |||
+ | ============================== DEVICE FEATURE ENABLE/ | ||
+ | |||
+ | -s VALUE, --smart=VALUE | ||
+ | Enable/ | ||
+ | |||
+ | -o VALUE, --offlineauto=VALUE | ||
+ | Enable/ | ||
+ | |||
+ | -S VALUE, --saveauto=VALUE | ||
+ | Enable/ | ||
+ | |||
+ | -s NAME[, | ||
+ | Enable/ | ||
+ | dsn, | ||
+ | standby, | ||
+ | wcreorder, | ||
+ | |||
+ | ======================================= READ AND DISPLAY DATA OPTIONS ===== | ||
+ | |||
+ | -H, --health | ||
+ | Show device SMART health status | ||
+ | |||
+ | -c, --capabilities | ||
+ | Show device SMART capabilities | ||
+ | |||
+ | -A, --attributes | ||
+ | Show device SMART vendor-specific Attributes and values | ||
+ | |||
+ | -f FORMAT, --format=FORMAT | ||
+ | Set output format for attributes: old, brief, hex[, | ||
+ | |||
+ | -l TYPE, --log=TYPE | ||
+ | Show device log. TYPE: error, selftest, selective, directory[, | ||
+ | xerror[, | ||
+ | sasphy[, | ||
+ | scttempint, | ||
+ | gplog, | ||
+ | |||
+ | -v N,OPTION , --vendorattribute=N, | ||
+ | Set display OPTION for vendor Attribute N (see man page) | ||
+ | |||
+ | -F TYPE, --firmwarebug=TYPE | ||
+ | Use firmware bug workaround: | ||
+ | none, nologdir, samsung, samsung2, samsung3, xerrorlba, swapid | ||
+ | |||
+ | -P TYPE, --presets=TYPE | ||
+ | Drive-specific presets: use, ignore, show, showall | ||
+ | |||
+ | -B [+]FILE, --drivedb=[+]FILE | ||
+ | Read and replace [add] drive database from FILE | ||
+ | [default is +/ | ||
+ | and then / | ||
+ | |||
+ | ============================================ DEVICE SELF-TEST OPTIONS ===== | ||
+ | |||
+ | -t TEST, --test=TEST | ||
+ | Run test. TEST: offline, short, long, conveyance, force, vendor,N, | ||
+ | select,M-N, pending,N, afterselect, | ||
+ | |||
+ | -C, --captive | ||
+ | Do test in captive mode (along with -t) | ||
+ | |||
+ | -X, --abort | ||
+ | Abort any non-captive test on device | ||
+ | |||
+ | =================================================== SMARTCTL EXAMPLES ===== | ||
+ | |||
+ | smartctl --all / | ||
+ | |||
+ | smartctl --smart=on --offlineauto=on --saveauto=on /dev/sda | ||
+ | (Enables SMART on first disk) | ||
+ | |||
+ | smartctl --test=long / | ||
+ | |||
+ | smartctl --attributes --log=selftest --quietmode=errorsonly /dev/sda | ||
+ | (Prints Self-Test & Attribute errors) | ||
+ | smartctl --all --device=3ware, | ||
+ | smartctl --all --device=3ware, | ||
+ | smartctl --all --device=3ware, | ||
+ | smartctl --all --device=3ware, | ||
+ | (Prints all SMART info for 3rd ATA disk on 3ware RAID controller) | ||
+ | smartctl --all --device=hpt, | ||
+ | (Prints all SMART info for the SATA disk attached to the 3rd PMPort | ||
+ | of the 1st channel on the 1st HighPoint RAID controller) | ||
+ | smartctl --all --device=areca, | ||
+ | (Prints all SMART info for 3rd ATA disk of the 1st enclosure | ||
+ | on Areca RAID controller) | ||
+ | </ | ||
+ | |||
+ | ====1.9 - Les Commandes accton et dump-acct==== | ||
+ | |||
+ | Cette commande permet d' | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# accton on | ||
+ | Turning on process accounting, file set to the default '/ | ||
+ | [root@centos8 ~]# systemctl status psacct | ||
+ | ● psacct.service - Kernel process accounting | ||
+ | | ||
+ | | ||
+ | ...skipping... | ||
+ | ● psacct.service - Kernel process accounting | ||
+ | | ||
+ | | ||
+ | |||
+ | [root@centos8 ~]# systemctl enable psacct | ||
+ | Created symlink / | ||
+ | |||
+ | [root@centos8 ~]# systemctl start psacct | ||
+ | |||
+ | [root@centos8 ~]# systemctl status psacct | ||
+ | ● psacct.service - Kernel process accounting | ||
+ | | ||
+ | | ||
+ | Process: 39765 ExecStart=/ | ||
+ | Process: 39763 ExecStartPre=/ | ||
+ | Main PID: 39765 (code=exited, | ||
+ | |||
+ | Nov 13 09:35:16 centos8.ittraining.loc systemd[1]: Starting Kernel process accounting> | ||
+ | Nov 13 09:35:16 centos8.ittraining.loc accton[39765]: | ||
+ | Nov 13 09:35:16 centos8.ittraining.loc systemd[1]: Started Kernel process accounting. | ||
+ | </ | ||
+ | |||
+ | Par contre le fichier **/ | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cat / | ||
+ | #pcKaccton pcEusleep%$pcu, | ||
+ | </ | ||
+ | |||
+ | La commande **dump-acct** permet de voir son contenu mais pas de l' | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# dump-acct / | ||
+ | accton | ||
+ | sleep | ||
+ | awk | ||
+ | ksmtuned | ||
+ | pgrep | ||
+ | ksmtuned | ||
+ | ksmtuned | ||
+ | awk | ||
+ | ksmtuned | ||
+ | less |v3| | ||
+ | systemctl | ||
+ | sleep | ||
+ | awk | ||
+ | ksmtuned | ||
+ | pgrep | ||
+ | ksmtuned | ||
+ | ksmtuned | ||
+ | awk | ||
+ | ksmtuned | ||
+ | rpc-pipefs-gene |v3| | ||
+ | nfs-server-gene |v3| | ||
+ | systemd-cryptse |v3| | ||
+ | systemd-system- |v3| | ||
+ | systemd-hiberna |v3| | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | ===Options de la commande=== | ||
+ | |||
+ | Les options de cette commande sont : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# dump-acct --help | ||
+ | Usage: dump-acct [-hrR] [-n < | ||
+ | [--num < | ||
+ | [--format < | ||
+ | [--ahz < | ||
+ | |||
+ | The system' | ||
+ | </ | ||
+ | |||
+ | ====1.10 - La Commande lastcomm==== | ||
+ | |||
+ | Cette commande vous renseigne sur l' | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# lastcomm | ||
+ | bash F root | ||
+ | gdbus X root | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | kworker/ | ||
+ | ksmtuned | ||
+ | ksmtuned | ||
+ | pgrep root | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | sleep root | ||
+ | kworker/ | ||
+ | kworker/ | ||
+ | kworker/ | ||
+ | dump-acct | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | ksmtuned | ||
+ | ksmtuned | ||
+ | pgrep root | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | sleep root | ||
+ | dump-acct | ||
+ | man root | ||
+ | less | ||
+ | kworker/ | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | ksmtuned | ||
+ | ksmtuned | ||
+ | pgrep root | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | sleep root | ||
+ | man | ||
+ | nroff root | ||
+ | groff root | ||
+ | grotty | ||
+ | troff root | ||
+ | nroff | ||
+ | locale | ||
+ | tbl root | ||
+ | preconv | ||
+ | man | ||
+ | man | ||
+ | man | ||
+ | man | ||
+ | man | ||
+ | man | ||
+ | man | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | ksmtuned | ||
+ | ksmtuned | ||
+ | pgrep root | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | sleep root | ||
+ | dump-acct | ||
+ | kworker/ | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | ksmtuned | ||
+ | ksmtuned | ||
+ | pgrep root | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | sleep root | ||
+ | cat root | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | ksmtuned | ||
+ | ksmtuned | ||
+ | pgrep root | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | sleep root | ||
+ | kworker/ | ||
+ | systemctl | ||
+ | less | ||
+ | systemd-cgroups | ||
+ | systemd-cgroups | ||
+ | systemctl | ||
+ | systemd-tty-ask | ||
+ | accton | ||
+ | accton | ||
+ | accton-create | ||
+ | systemctl | ||
+ | (sd-executor) | ||
+ | systemd-gpt-aut | ||
+ | systemd-getty-g | ||
+ | systemd-veritys | ||
+ | systemd-sysv-ge | ||
+ | systemd-debug-g | ||
+ | selinux-autorel | ||
+ | grep | ||
+ | ostree-system-g | ||
+ | systemd-rc-loca | ||
+ | anaconda-genera | ||
+ | lvm2-activation | ||
+ | kdump-dep-gener | ||
+ | selinuxenabled | ||
+ | lvmconfig | ||
+ | grep | ||
+ | readlink | ||
+ | systemd-fstab-g | ||
+ | systemd-hiberna | ||
+ | systemd-system- | ||
+ | systemd-cryptse | ||
+ | nfs-server-gene | ||
+ | rpc-pipefs-gene | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | ksmtuned | ||
+ | ksmtuned | ||
+ | pgrep root | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | sleep root | ||
+ | systemctl | ||
+ | less | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | ksmtuned | ||
+ | ksmtuned | ||
+ | pgrep root | ||
+ | ksmtuned | ||
+ | awk root | ||
+ | sleep root | ||
+ | accton | ||
+ | |||
+ | [root@centos8 ~]# lastcomm grep | ||
+ | grep | ||
+ | grep | ||
+ | grep | ||
+ | grep | ||
+ | </ | ||
+ | |||
+ | ===Options de la commande=== | ||
+ | |||
+ | Les options de cette commande sont : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# lastcomm --help | ||
+ | Usage: lastcomm [-hpV] [-f file] [command] ... [user] ... [terminal] ... | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | The system' | ||
+ | </ | ||
+ | |||
+ | ====1.11 - La Commande sa==== | ||
+ | |||
+ | Cette commande vous renseigne sur les statistiques sur les processus lancés et leurs ressources systèmes: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# sa -u | egrep " | ||
+ | root 0.00 cpu 1090k mem 0 io accton | ||
+ | root 0.00 cpu 1827k mem 0 io sleep | ||
+ | root 0.00 cpu 6378k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 11276k mem 0 io pgrep | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6528k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6344k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 2426k mem 0 io less | ||
+ | root 0.00 cpu 23376k mem 0 io systemctl | ||
+ | root 0.00 cpu 1827k mem 0 io sleep | ||
+ | root 0.00 cpu 6378k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 11276k mem 0 io pgrep | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6528k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6344k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 9688k mem 0 io rpc-pipefs-gene | ||
+ | root 0.00 cpu 9720k mem 0 io nfs-server-gene | ||
+ | root 0.00 cpu 22592k mem 0 io systemd-cryptse | ||
+ | root 0.00 cpu 22592k mem 0 io systemd-system- | ||
+ | root 0.00 cpu 22592k mem 0 io systemd-hiberna | ||
+ | root 0.00 cpu 22592k mem 0 io systemd-fstab-g | ||
+ | root 0.00 cpu 1098k mem 0 io readlink | ||
+ | root 0.00 cpu 2302k mem 0 io grep | ||
+ | root 0.00 cpu 16260k mem 0 io lvmconfig | ||
+ | root 0.00 cpu 3350k mem 0 io selinuxenabled | ||
+ | root 0.00 cpu 5862k mem 0 io kdump-dep-gener | ||
+ | root 0.00 cpu 8406k mem 0 io lvm2-activation | ||
+ | root 0.00 cpu 5764k mem 0 io anaconda-genera | ||
+ | root 0.00 cpu 22592k mem 0 io systemd-rc-loca | ||
+ | root 0.01 cpu 38192k mem 0 io ostree-system-g | ||
+ | root 0.00 cpu 2302k mem 0 io grep | ||
+ | root 0.00 cpu 5764k mem 0 io selinux-autorel | ||
+ | root 0.00 cpu 22592k mem 0 io systemd-debug-g | ||
+ | root 0.00 cpu 22592k mem 0 io systemd-sysv-ge | ||
+ | root 0.00 cpu 22592k mem 0 io systemd-veritys | ||
+ | root 0.00 cpu 22592k mem 0 io systemd-getty-g | ||
+ | root 0.00 cpu 22592k mem 0 io systemd-gpt-aut | ||
+ | root 0.00 cpu 63728k mem 0 io (sd-executor) | ||
+ | root 0.00 cpu 23632k mem 0 io systemctl | ||
+ | root 0.00 cpu 6496k mem 0 io accton-create | ||
+ | root 0.00 cpu 0k mem 0 io accton | ||
+ | root 0.00 cpu 1090k mem 0 io accton | ||
+ | root 0.00 cpu 22592k mem 0 io systemd-tty-ask | ||
+ | root 0.00 cpu 23376k mem 0 io systemctl | ||
+ | root 0.00 cpu 22592k mem 0 io systemd-cgroups | ||
+ | root 0.00 cpu 22592k mem 0 io systemd-cgroups | ||
+ | root 0.00 cpu 2426k mem 0 io less | ||
+ | root 0.00 cpu 23376k mem 0 io systemctl | ||
+ | root 0.00 cpu 0k mem 0 io kworker/ | ||
+ | root 0.00 cpu 1827k mem 0 io sleep | ||
+ | root 0.00 cpu 6378k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 11276k mem 0 io pgrep | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6528k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6344k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 1828k mem 0 io cat | ||
+ | root 0.00 cpu 1827k mem 0 io sleep | ||
+ | root 0.00 cpu 6378k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 11276k mem 0 io pgrep | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6528k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6344k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 0k mem 0 io kworker/ | ||
+ | root 0.00 cpu 1994k mem 0 io dump-acct | ||
+ | root 0.00 cpu 1827k mem 0 io sleep | ||
+ | root 0.00 cpu 6378k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 11276k mem 0 io pgrep | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6528k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6344k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 4582k mem 0 io man * | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 4844k mem 0 io man * | ||
+ | root 0.00 cpu 4186k mem 0 io preconv | ||
+ | root 0.00 cpu 3476k mem 0 io tbl | ||
+ | root 0.00 cpu 1831k mem 0 io locale | ||
+ | root 0.00 cpu 3182k mem 0 io nroff * | ||
+ | root 0.00 cpu 4186k mem 0 io troff | ||
+ | root 0.00 cpu 3674k mem 0 io grotty | ||
+ | root 0.00 cpu 3496k mem 0 io groff | ||
+ | root 0.00 cpu 3182k mem 0 io nroff | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 1827k mem 0 io sleep | ||
+ | root 0.00 cpu 6378k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 11276k mem 0 io pgrep | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6528k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6344k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 0k mem 0 io kworker/ | ||
+ | root 0.00 cpu 2426k mem 0 io less | ||
+ | root 0.01 cpu 4770k mem 0 io man | ||
+ | root 0.00 cpu 1994k mem 0 io dump-acct | ||
+ | root 0.00 cpu 1827k mem 0 io sleep | ||
+ | root 0.00 cpu 6378k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 11276k mem 0 io pgrep | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6528k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6344k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 2094k mem 0 io dump-acct | ||
+ | root 0.00 cpu 0k mem 0 io kworker/ | ||
+ | root 0.00 cpu 0k mem 0 io kworker/ | ||
+ | root 0.00 cpu 0k mem 0 io kworker/ | ||
+ | root 0.00 cpu 1827k mem 0 io sleep | ||
+ | root 0.00 cpu 6378k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 11276k mem 0 io pgrep | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6528k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 0k mem 0 io kworker/ | ||
+ | root 0.00 cpu 6344k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 93648k mem 0 io gdbus | ||
+ | root 0.00 cpu 6888k mem 0 io bash * | ||
+ | root 0.00 cpu 5410k mem 0 io lastcomm | ||
+ | root 0.00 cpu 1827k mem 0 io sleep | ||
+ | root 0.00 cpu 6378k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 11276k mem 0 io pgrep | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6528k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6344k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 4570k mem 0 io man * | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 4844k mem 0 io man * | ||
+ | root 0.00 cpu 4186k mem 0 io preconv | ||
+ | root 0.00 cpu 3476k mem 0 io tbl | ||
+ | root 0.00 cpu 1831k mem 0 io locale | ||
+ | root 0.00 cpu 3182k mem 0 io nroff * | ||
+ | root 0.00 cpu 4186k mem 0 io troff | ||
+ | root 0.00 cpu 3706k mem 0 io grotty | ||
+ | root 0.00 cpu 3496k mem 0 io groff | ||
+ | root 0.00 cpu 3182k mem 0 io nroff | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 1827k mem 0 io sleep | ||
+ | root 0.00 cpu 6378k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 11276k mem 0 io pgrep | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6528k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6344k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 2426k mem 0 io less | ||
+ | root 0.00 cpu 4770k mem 0 io man | ||
+ | root 0.00 cpu 4604k mem 0 io man * | ||
+ | root 0.00 cpu 4760k mem 0 io man * | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 4844k mem 0 io man * | ||
+ | root 0.00 cpu 4186k mem 0 io preconv | ||
+ | root 0.00 cpu 3476k mem 0 io tbl | ||
+ | root 0.00 cpu 1831k mem 0 io locale | ||
+ | root 0.00 cpu 3182k mem 0 io nroff * | ||
+ | root 0.00 cpu 4186k mem 0 io troff | ||
+ | root 0.00 cpu 3700k mem 0 io grotty | ||
+ | root 0.00 cpu 3496k mem 0 io groff | ||
+ | root 0.00 cpu 3182k mem 0 io nroff | ||
+ | root 0.00 cpu 4804k mem 0 io man * | ||
+ | root 0.00 cpu 1827k mem 0 io sleep | ||
+ | root 0.00 cpu 6378k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 11276k mem 0 io pgrep | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6528k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6344k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 1827k mem 0 io sleep | ||
+ | root 0.00 cpu 6378k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 11276k mem 0 io pgrep | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6528k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6344k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 0k mem 0 io kworker/ | ||
+ | root 0.00 cpu 2426k mem 0 io less | ||
+ | root 0.00 cpu 4770k mem 0 io man | ||
+ | root 0.00 cpu 5312k mem 0 io sa | ||
+ | root 0.00 cpu 3034k mem 0 io grep | ||
+ | root 0.00 cpu 5312k mem 0 io sa | ||
+ | root 0.00 cpu 1827k mem 0 io sleep | ||
+ | root 0.00 cpu 6378k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 11276k mem 0 io pgrep | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6528k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 6344k mem 0 io awk | ||
+ | root 0.00 cpu 6658k mem 0 io ksmtuned | ||
+ | root 0.00 cpu 0k mem 0 io kworker/ | ||
+ | </ | ||
+ | |||
+ | ===Options de la commande=== | ||
+ | |||
+ | Les options de cette commande sont : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# sa --help | ||
+ | |||
+ | Usage: sa [ options ] [ file ] | ||
+ | | ||
+ | options: [-abcdfiljkmnprstuDKP] [-v < | ||
+ | [--other-acct-file < | ||
+ | [--print-seconds] [--dont-read-summary-files] [--debug] | ||
+ | | ||
+ | | ||
+ | [--list-all-names] [--not-interactive] [--threshold < | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | The system' | ||
+ | |||
+ | raw process accounting data: / | ||
+ | summary by command name: / | ||
+ | summary by username: / | ||
+ | </ | ||
+ | |||
+ | ====1.12 - La Commande ac==== | ||
+ | |||
+ | Cette commande vous renseigne sur les statistiques des temps de connexion des utilisateurs : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# ac -p | ||
+ | trainee | ||
+ | total 247.51 | ||
+ | |||
+ | [root@centos8 ~]# ac -d | ||
+ | Jun 16 total 6.41 | ||
+ | Jun 17 total 12.09 | ||
+ | Jul 19 total 6.94 | ||
+ | Jul 20 total 38.95 | ||
+ | Sep 2 total 0.03 | ||
+ | Sep 3 total 0.01 | ||
+ | Sep 5 total 11.01 | ||
+ | Oct 9 total 0.92 | ||
+ | Oct 11 total 4.17 | ||
+ | Oct 12 total 5.45 | ||
+ | Nov 7 total 19.40 | ||
+ | Nov 8 total 54.12 | ||
+ | Nov 9 total 67.32 | ||
+ | Nov 10 total 8.48 | ||
+ | Nov 11 total 3.01 | ||
+ | Today | ||
+ | </ | ||
+ | |||
+ | ===Options de la commande=== | ||
+ | |||
+ | Les options de cette commande sont : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# ac --help | ||
+ | |||
+ | Usage: ac [OPTION] ... | ||
+ | |||
+ | OPTIONS: | ||
+ | -d, --daily-totals | ||
+ | -p, --individual-totals | ||
+ | -f, --file < | ||
+ | --complain | ||
+ | --reboots | ||
+ | --supplants | ||
+ | --timewarps | ||
+ | --compatibility | ||
+ | -a, --all-days | ||
+ | --tw-leniency < | ||
+ | --tw-suspicious < | ||
+ | --print-year | ||
+ | --print-zeros | ||
+ | --debug | ||
+ | -V, --version | ||
+ | -h, --help | ||
+ | |||
+ | The system' | ||
+ | </ | ||
+ | |||
+ | =====LAB #2 - La commande sysctl===== | ||
+ | |||
+ | ====2.1 - Répertoire /proc==== | ||
+ | |||
+ | 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. | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# ls /proc | ||
+ | 1 16391 19 2212 2427 2622 431 | ||
+ | 10 | ||
+ | 1007 | ||
+ | 11 | ||
+ | 11805 16593 2 | ||
+ | 12 | ||
+ | 1219 | ||
+ | 1228 | ||
+ | 1232 | ||
+ | 1234 | ||
+ | 1235 | ||
+ | 1247 | ||
+ | 13 | ||
+ | 1307 | ||
+ | 1339 | ||
+ | 1356 | ||
+ | 14 | ||
+ | 1441 | ||
+ | 1443 | ||
+ | 1444 | ||
+ | 1446 | ||
+ | 14977 1828 | ||
+ | 15 | ||
+ | 15067 183 2167 2330 2571 422 | ||
+ | 1536 | ||
+ | 1553 | ||
+ | 15594 186 2187 2358 259 | ||
+ | 15735 187 2190 2373 2593 427 | ||
+ | 16 | ||
+ | 16165 1883 | ||
+ | 16167 1888 | ||
+ | </ | ||
+ | |||
+ | ===Fichiers=== | ||
+ | |||
+ | ==Processeur== | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cat / | ||
+ | processor | ||
+ | vendor_id | ||
+ | cpu family | ||
+ | model : 6 | ||
+ | model name : Common KVM processor | ||
+ | stepping | ||
+ | microcode | ||
+ | cpu MHz : 1999.987 | ||
+ | cache size : 16384 KB | ||
+ | physical id : 0 | ||
+ | siblings | ||
+ | core id : 0 | ||
+ | cpu cores : 4 | ||
+ | apicid | ||
+ | initial apicid | ||
+ | fpu : yes | ||
+ | fpu_exception | ||
+ | cpuid level : 13 | ||
+ | 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 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti | ||
+ | bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit | ||
+ | bogomips | ||
+ | clflush size : 64 | ||
+ | cache_alignment : 128 | ||
+ | address sizes : 40 bits physical, 48 bits virtual | ||
+ | power management: | ||
+ | |||
+ | processor | ||
+ | vendor_id | ||
+ | cpu family | ||
+ | model : 6 | ||
+ | model name : Common KVM processor | ||
+ | stepping | ||
+ | microcode | ||
+ | cpu MHz : 1999.987 | ||
+ | cache size : 16384 KB | ||
+ | physical id : 0 | ||
+ | siblings | ||
+ | core id : 1 | ||
+ | cpu cores : 4 | ||
+ | apicid | ||
+ | initial apicid | ||
+ | fpu : yes | ||
+ | fpu_exception | ||
+ | cpuid level : 13 | ||
+ | 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 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti | ||
+ | bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit | ||
+ | bogomips | ||
+ | clflush size : 64 | ||
+ | cache_alignment : 128 | ||
+ | address sizes : 40 bits physical, 48 bits virtual | ||
+ | power management: | ||
+ | |||
+ | processor | ||
+ | vendor_id | ||
+ | cpu family | ||
+ | model : 6 | ||
+ | model name : Common KVM processor | ||
+ | stepping | ||
+ | microcode | ||
+ | cpu MHz : 1999.987 | ||
+ | cache size : 16384 KB | ||
+ | physical id : 0 | ||
+ | siblings | ||
+ | core id : 2 | ||
+ | cpu cores : 4 | ||
+ | apicid | ||
+ | initial apicid | ||
+ | fpu : yes | ||
+ | fpu_exception | ||
+ | cpuid level : 13 | ||
+ | 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 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti | ||
+ | bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit | ||
+ | bogomips | ||
+ | clflush size : 64 | ||
+ | cache_alignment : 128 | ||
+ | address sizes : 40 bits physical, 48 bits virtual | ||
+ | power management: | ||
+ | |||
+ | processor | ||
+ | vendor_id | ||
+ | cpu family | ||
+ | model : 6 | ||
+ | model name : Common KVM processor | ||
+ | stepping | ||
+ | microcode | ||
+ | cpu MHz : 1999.987 | ||
+ | cache size : 16384 KB | ||
+ | physical id : 0 | ||
+ | siblings | ||
+ | core id : 3 | ||
+ | cpu cores : 4 | ||
+ | apicid | ||
+ | initial apicid | ||
+ | fpu : yes | ||
+ | fpu_exception | ||
+ | cpuid level : 13 | ||
+ | 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 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti | ||
+ | bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit | ||
+ | bogomips | ||
+ | clflush size : 64 | ||
+ | cache_alignment : 128 | ||
+ | address sizes : 40 bits physical, 48 bits virtual | ||
+ | power management: | ||
+ | |||
+ | processor | ||
+ | vendor_id | ||
+ | cpu family | ||
+ | model : 6 | ||
+ | model name : Common KVM processor | ||
+ | stepping | ||
+ | microcode | ||
+ | cpu MHz : 1999.987 | ||
+ | cache size : 16384 KB | ||
+ | physical id : 1 | ||
+ | siblings | ||
+ | core id : 0 | ||
+ | cpu cores : 4 | ||
+ | apicid | ||
+ | initial apicid | ||
+ | fpu : yes | ||
+ | fpu_exception | ||
+ | cpuid level : 13 | ||
+ | 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 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti | ||
+ | bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit | ||
+ | bogomips | ||
+ | clflush size : 64 | ||
+ | cache_alignment : 128 | ||
+ | address sizes : 40 bits physical, 48 bits virtual | ||
+ | power management: | ||
+ | |||
+ | processor | ||
+ | vendor_id | ||
+ | cpu family | ||
+ | model : 6 | ||
+ | model name : Common KVM processor | ||
+ | stepping | ||
+ | microcode | ||
+ | cpu MHz : 1999.987 | ||
+ | cache size : 16384 KB | ||
+ | physical id : 1 | ||
+ | siblings | ||
+ | core id : 1 | ||
+ | cpu cores : 4 | ||
+ | apicid | ||
+ | initial apicid | ||
+ | fpu : yes | ||
+ | fpu_exception | ||
+ | cpuid level : 13 | ||
+ | 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 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti | ||
+ | bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit | ||
+ | bogomips | ||
+ | clflush size : 64 | ||
+ | cache_alignment : 128 | ||
+ | address sizes : 40 bits physical, 48 bits virtual | ||
+ | power management: | ||
+ | |||
+ | processor | ||
+ | vendor_id | ||
+ | cpu family | ||
+ | model : 6 | ||
+ | model name : Common KVM processor | ||
+ | stepping | ||
+ | microcode | ||
+ | cpu MHz : 1999.987 | ||
+ | cache size : 16384 KB | ||
+ | physical id : 1 | ||
+ | siblings | ||
+ | core id : 2 | ||
+ | cpu cores : 4 | ||
+ | apicid | ||
+ | initial apicid | ||
+ | fpu : yes | ||
+ | fpu_exception | ||
+ | cpuid level : 13 | ||
+ | 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 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti | ||
+ | bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit | ||
+ | bogomips | ||
+ | clflush size : 64 | ||
+ | cache_alignment : 128 | ||
+ | address sizes : 40 bits physical, 48 bits virtual | ||
+ | power management: | ||
+ | |||
+ | processor | ||
+ | vendor_id | ||
+ | cpu family | ||
+ | model : 6 | ||
+ | model name : Common KVM processor | ||
+ | stepping | ||
+ | microcode | ||
+ | cpu MHz : 1999.987 | ||
+ | cache size : 16384 KB | ||
+ | physical id : 1 | ||
+ | siblings | ||
+ | core id : 3 | ||
+ | cpu cores : 4 | ||
+ | apicid | ||
+ | initial apicid | ||
+ | fpu : yes | ||
+ | fpu_exception | ||
+ | cpuid level : 13 | ||
+ | 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 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti | ||
+ | bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit | ||
+ | bogomips | ||
+ | clflush size : 64 | ||
+ | cache_alignment : 128 | ||
+ | address sizes : 40 bits physical, 48 bits virtual | ||
+ | power management: | ||
+ | </ | ||
+ | |||
+ | ==Interruptions système== | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cat / | ||
+ | | ||
+ | 0: 109 0 0 0 0 0 0 0 | ||
+ | 1: 0 0 0 0 9 0 0 0 | ||
+ | 8: 0 0 0 0 0 1 0 0 | ||
+ | 9: 0 0 0 0 0 0 0 0 | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | NMI: 0 0 0 0 0 0 0 0 | ||
+ | LOC: | ||
+ | SPU: 0 0 0 0 0 0 0 0 | ||
+ | PMI: 0 0 0 0 0 0 0 0 | ||
+ | IWI: 0 0 0 0 2 0 0 0 IRQ work interrupts | ||
+ | RTR: 0 0 0 0 0 0 0 0 APIC ICR read retries | ||
+ | RES: | ||
+ | CAL: 11095 11007 10841 10343 14679 | ||
+ | TLB: | ||
+ | TRM: 0 0 0 0 0 0 0 0 | ||
+ | THR: 0 0 0 0 0 0 0 0 | ||
+ | DFR: 0 0 0 0 0 0 0 0 | ||
+ | MCE: 0 0 0 0 0 0 0 0 | ||
+ | MCP: 288 288 288 288 288 288 288 288 | ||
+ | HYP: 0 0 0 0 0 0 0 0 | ||
+ | HRE: 0 0 0 0 0 0 0 0 | ||
+ | HVS: 0 0 0 0 0 0 0 0 | ||
+ | ERR: 0 | ||
+ | MIS: 0 | ||
+ | PIN: 0 0 0 0 0 0 0 0 | ||
+ | NPI: 0 0 0 0 0 0 0 0 | ||
+ | PIW: 0 0 0 0 0 0 0 0 | ||
+ | </ | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | **Important** : Un pilote de périphérique demande au processeur de fournir un service en utilisant un IRQ. Quand la demande est faite, le processeur interrompe ses activités et passe le contrôle au pilote identifié par l'IRQ. Techniquement l' | ||
+ | </ | ||
+ | |||
+ | ==Canaux DMA== | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cat /proc/dma | ||
+ | 4: cascade | ||
+ | </ | ||
+ | |||
+ | ==Plages d' | ||
+ | |||
+ | < | ||
+ | root@centos8 ~]# cat / | ||
+ | 0000-0cf7 : PCI Bus 0000:00 | ||
+ | 0000-001f : dma1 | ||
+ | 0020-0021 : pic1 | ||
+ | 0040-0043 : timer0 | ||
+ | 0050-0053 : timer1 | ||
+ | 0060-0060 : keyboard | ||
+ | 0064-0064 : keyboard | ||
+ | 0070-0077 : rtc0 | ||
+ | 0080-008f : dma page reg | ||
+ | 00a0-00a1 : pic2 | ||
+ | 00c0-00df : dma2 | ||
+ | 00f0-00ff : fpu | ||
+ | 0170-0177 : 0000: | ||
+ | 0170-0177 : ata_piix | ||
+ | 01f0-01f7 : 0000: | ||
+ | 01f0-01f7 : ata_piix | ||
+ | 0376-0376 : 0000: | ||
+ | 0376-0376 : ata_piix | ||
+ | 03c0-03df : vga+ | ||
+ | 03f6-03f6 : 0000: | ||
+ | 03f6-03f6 : ata_piix | ||
+ | --More-- | ||
+ | </ | ||
+ | |||
+ | <WRAP center round alert 60%> | ||
+ | **Important** - Si deux périphériques ont le même port, les **deux** périphériques seront inutilisables. | ||
+ | </ | ||
+ | |||
+ | ==Périphériques== | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cat / | ||
+ | Character devices: | ||
+ | 1 mem | ||
+ | 4 /dev/vc/0 | ||
+ | 4 tty | ||
+ | 4 ttyS | ||
+ | 5 /dev/tty | ||
+ | 5 / | ||
+ | 5 /dev/ptmx | ||
+ | 7 vcs | ||
+ | 10 misc | ||
+ | 13 input | ||
+ | 21 sg | ||
+ | 29 fb | ||
+ | 128 ptm | ||
+ | 136 pts | ||
+ | 162 raw | ||
+ | 180 usb | ||
+ | 188 ttyUSB | ||
+ | 189 usb_device | ||
+ | 202 cpu/msr | ||
+ | 203 cpu/cpuid | ||
+ | 226 drm | ||
+ | 244 aux | ||
+ | 245 hidraw | ||
+ | 246 usbmon | ||
+ | 247 bsg | ||
+ | 248 watchdog | ||
+ | 249 ptp | ||
+ | 250 pps | ||
+ | 251 rtc | ||
+ | 252 dax | ||
+ | 253 tpm | ||
+ | 254 gpiochip | ||
+ | |||
+ | Block devices: | ||
+ | 8 sd | ||
+ | 9 md | ||
+ | 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 | ||
+ | 259 blkext | ||
+ | </ | ||
+ | |||
+ | ==Modules== | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cat / | ||
+ | xt_CHECKSUM 16384 1 - Live 0xffffffffc09a8000 | ||
+ | ipt_MASQUERADE 16384 3 - Live 0xffffffffc09a3000 | ||
+ | xt_conntrack 16384 1 - Live 0xffffffffc099e000 | ||
+ | ipt_REJECT 16384 2 - Live 0xffffffffc0999000 | ||
+ | nft_compat 20480 16 - Live 0xffffffffc0993000 | ||
+ | nf_nat_tftp 16384 0 - Live 0xffffffffc098b000 | ||
+ | nft_objref 16384 1 - Live 0xffffffffc0986000 | ||
+ | nf_conntrack_tftp 16384 3 nf_nat_tftp, | ||
+ | nft_counter 16384 33 - Live 0xffffffffc097c000 | ||
+ | tun 53248 1 - Live 0xffffffffc096e000 | ||
+ | bridge 192512 0 - Live 0xffffffffc093e000 | ||
+ | stp 16384 1 bridge, Live 0xffffffffc0939000 | ||
+ | llc 16384 2 bridge,stp, Live 0xffffffffc0930000 | ||
+ | nft_fib_inet 16384 1 - Live 0xffffffffc08f5000 | ||
+ | nft_fib_ipv4 16384 1 nft_fib_inet, | ||
+ | nft_fib_ipv6 16384 1 nft_fib_inet, | ||
+ | nft_fib 16384 3 nft_fib_inet, | ||
+ | nft_reject_inet 16384 5 - Live 0xffffffffc08de000 | ||
+ | nf_reject_ipv4 16384 2 ipt_REJECT, | ||
+ | nf_reject_ipv6 16384 1 nft_reject_inet, | ||
+ | nft_reject 16384 1 nft_reject_inet, | ||
+ | --More-- | ||
+ | </ | ||
+ | |||
+ | ==Statistiques de l' | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cat / | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 11 0 sr0 10 0 4 2 0 0 0 0 0 9 2 0 0 0 0 | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | ==Partitions== | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cat / | ||
+ | major minor # | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 11 0 1048575 sr0 | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | ==Espaces de pagination== | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cat /proc/swaps | ||
+ | Filename | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ==Statistiques d' | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cat / | ||
+ | 0.00 0.00 0.00 1/697 16936 | ||
+ | </ | ||
+ | |||
+ | ==Statistiques d' | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cat / | ||
+ | MemTotal: | ||
+ | MemFree: | ||
+ | MemAvailable: | ||
+ | Buffers: | ||
+ | Cached: | ||
+ | SwapCached: | ||
+ | Active: | ||
+ | Inactive: | ||
+ | Active(anon): | ||
+ | Inactive(anon): | ||
+ | Active(file): | ||
+ | Inactive(file): | ||
+ | Unevictable: | ||
+ | Mlocked: | ||
+ | SwapTotal: | ||
+ | SwapFree: | ||
+ | Dirty: | ||
+ | Writeback: | ||
+ | AnonPages: | ||
+ | Mapped: | ||
+ | Shmem: | ||
+ | KReclaimable: | ||
+ | Slab: | ||
+ | SReclaimable: | ||
+ | SUnreclaim: | ||
+ | KernelStack: | ||
+ | PageTables: | ||
+ | NFS_Unstable: | ||
+ | Bounce: | ||
+ | WritebackTmp: | ||
+ | CommitLimit: | ||
+ | Committed_AS: | ||
+ | VmallocTotal: | ||
+ | VmallocUsed: | ||
+ | VmallocChunk: | ||
+ | Percpu: | ||
+ | HardwareCorrupted: | ||
+ | AnonHugePages: | ||
+ | ShmemHugePages: | ||
+ | ShmemPmdMapped: | ||
+ | FileHugePages: | ||
+ | FilePmdMapped: | ||
+ | HugePages_Total: | ||
+ | HugePages_Free: | ||
+ | HugePages_Rsvd: | ||
+ | HugePages_Surp: | ||
+ | Hugepagesize: | ||
+ | Hugetlb: | ||
+ | DirectMap4k: | ||
+ | DirectMap2M: | ||
+ | </ | ||
+ | |||
+ | ==Version du noyau== | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cat / | ||
+ | Linux version 4.18.0-305.3.1.el8.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC)) #1 SMP Tue Jun 1 16:14:33 UTC 2021 | ||
+ | </ | ||
+ | |||
+ | ===Répertoires=== | ||
+ | |||
+ | ==ide/ | ||
+ | |||
+ | 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. | ||
+ | |||
+ | ==acpi== | ||
+ | |||
+ | Ce répertoire contient des informations sur la gestion de l' | ||
+ | |||
+ | ==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 **%%DoS%%** utilisant la commande **ping**, saisissez la commande suivante : | ||
+ | |||
+ | # echo 1 > / | ||
+ | |||
+ | Cette commande a pour résultat d' | ||
+ | |||
+ | ====2.2 - Utilisation de 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@centos8 ~]# cat / | ||
+ | # sysctl settings are defined through files in | ||
+ | # / | ||
# | # | ||
- | # Seat configuration | + | # Vendors settings live in / |
+ | # To override a whole file, create a new file with the same in | ||
+ | # / | ||
+ | # only specific settings, add a file with a lexically later | ||
+ | # name in / | ||
# | # | ||
- | # Each seat must start with " | + | # For more information, |
- | # Uses settings from [SeatDefaults], any of these can be overriden by setting them in this section. | + | |
- | # | + | [root@centos8 ~]# ls -l /etc/sysctl.d/ |
- | #[Seat:0] | + | total 0 |
+ | lrwxrwxrwx. 1 root root 14 Mar 16 15:42 99-sysctl.conf -> ../ | ||
+ | [root@centos8 ~]# ls -l / | ||
+ | total 24 | ||
+ | -rw-r--r--. 1 root root 1810 Dec 22 2020 10-default-yama-scope.conf | ||
+ | -rw-r--r--. 1 root root 524 Mar 16 15:42 50-coredump.conf | ||
+ | -rw-r--r--. 1 root root 1270 Mar 16 15:42 50-default.conf | ||
+ | -rw-r--r--. 1 root root 246 Jun 15 2020 50-libkcapi-optmem_max.conf | ||
+ | -rw-r--r--. 1 root root 636 Mar 16 15:42 50-pid-max.conf | ||
+ | -rw-r--r--. 1 root root 499 Nov 26 2019 60-libvirtd.conf | ||
+ | [root@centos8 ~]# cat / | ||
+ | # This file is part of systemd. | ||
# | # | ||
- | # XDMCP Server configuration | + | # |
- | # | + | # under the terms of the GNU Lesser General Public License as published by |
- | # enabled = True if XDMCP connections should be allowed | + | # the Free Software Foundation; either version 2.1 of the License, |
- | # 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 in keys.conf) | + | |
- | # | + | |
- | # 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= | + | |
+ | # See sysctl.d(5) and core(5) for documentation. | ||
+ | |||
+ | # To override settings in this file, create a local file in /etc | ||
+ | # (e.g. / | ||
+ | # there. | ||
+ | |||
+ | # System Request functionality of the kernel (SYNC) | ||
# | # | ||
- | # VNC Server configuration | + | # Use kernel.sysrq |
- | # | + | # See https:// |
- | # enabled = True if VNC connections should be allowed | + | # of values and keys. |
- | # command | + | kernel.sysrq |
- | # port = TCP/IP port to listen for connections on | + | |
- | # listen-address = Host/address to listen | + | # Append the PID to the core filename |
- | # width = Width of display to use | + | kernel.core_uses_pid = 1 |
- | # height | + | |
- | # depth = Color depth of display | + | # https:// |
- | # | + | kernel.kptr_restrict = 1 |
- | [VNCServer] | + | |
- | #enabled=false | + | # Source route verification |
- | #command=Xvnc | + | net.ipv4.conf.all.rp_filter |
- | #port=5900 | + | |
- | #listen-address= | + | # Do not accept source routing |
- | #width=1024 | + | net.ipv4.conf.all.accept_source_route |
- | #height=768 | + | |
- | #depth=8 | + | # Promote secondary addresses when the primary |
+ | net.ipv4.conf.all.promote_secondaries | ||
+ | |||
+ | # Fair Queue CoDel packet scheduler to fight bufferbloat | ||
+ | net.core.default_qdisc | ||
+ | |||
+ | # Enable hard and soft link protection | ||
+ | fs.protected_hardlinks | ||
+ | fs.protected_symlinks | ||
</ | </ | ||
- | La configuration | + | Les options |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | # | + | |
- | # background | + | Usage: |
- | # theme-name = GTK+ theme to use | + | |
- | # icon-theme-name = Icon theme to use | + | |
- | # font-name = Font to use | + | Options: |
- | # xft-antialias = Whether to antialias Xft fonts (true or false) | + | |
- | # xft-dpi = Resolution for Xft in dots per inch (e.g. 96) | + | -A alias of -a |
- | # xft-hintstyle = What degree of hinting | + | -X alias of -a |
- | # xft-rgba = Type of subpixel antialiasing (none, rgb, bgr, vrgb or vbgr) | + | --deprecated |
- | # show-indicators = semi-colon ";" | + | -b, --binary |
- | # show-clock (true or false) | + | |
- | # clock-format = strftime-format string, e.g. %H:%M | + | -N, --names |
- | # keyboard = command to launch on-screen keyboard | + | -n, --values |
- | # position = main window position: x y | + | -p, --load[=< |
- | # default-user-image = Image used as default user icon, path or #icon-name | + | |
- | # screensaver-timeout = Timeout | + | --system |
- | # | + | -r, --pattern < |
- | [greeter] | + | |
- | background=/ | + | -q, --quiet |
- | #theme-name= | + | -w, --write |
- | #icon-theme-name= | + | -o does nothing |
- | #font-name= | + | -x does nothing |
- | #xft-antialias= | + | -d alias of -h |
- | #xft-dpi= | + | |
- | #xft-hintstyle= | + | -h, --help |
- | #xft-rgba= | + | -V, --version |
- | #show-indicators= | + | |
- | #show-clock= | + | For more details see sysctl(8). |
- | #clock-format= | + | |
- | #keyboard= | + | |
- | # | + | |
- | # | + | |
</ | </ | ||
- | =====X.orgX11===== | + | <WRAP center round important 60%> |
+ | **Important** : Consultez la page de la traduction du manuel de **sysctl** **[[http:// | ||
+ | </ | ||
+ | |||
+ | =====LAB#3 - Interprétation des informations dans /proc===== | ||
+ | |||
+ | Les informations brutes stockées dans /proc peuvent être interprétées grâce à l' | ||
+ | |||
+ | * free, | ||
+ | * uptime et w, | ||
+ | * iostat, | ||
+ | * hdparm, | ||
+ | * vmstat, | ||
+ | * mpstat, | ||
+ | * sar. | ||
- | ====Présentation==== | + | ====3.1 - La Commande free==== |
- | L' | + | La commande |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | Xorg: / | + | |
+ | Mem: 3735 1135 1818 14 | ||
+ | Swap: 3279 | ||
</ | </ | ||
- | Les modules | + | Dans le cas de cet exemple, nous pouvons constater que l’affichage montre : |
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Les options de cette commande | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | / | + | |
- | 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 | + | |
- | / | + | Usage: |
- | total 776 | + | free [options] |
- | 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 | + | |
- | / | + | Options: |
- | total 2616 | + | -b, --bytes show output in bytes |
- | -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 | + | --mega show output in megabytes |
- | -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 | + | --tera show output in terabytes |
- | -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 | + | -k, --kibi |
- | -rwxr-xr-x. 1 root root 181560 Mar 11 2015 qxl_drv.so | + | -m, --mebi show output in mebibytes |
- | -rwxr-xr-x. 1 root root 438848 Mar 6 2015 radeon_drv.so | + | -g, --gibi show output in gibibytes |
- | -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 | + | --pebi show output in pebibytes |
- | -rwxr-xr-x. 1 root root | + | -h, --human show human-readable output |
- | -rwxr-xr-x. 1 root root 162008 Mar 6 2015 vmware_drv.so | + | |
+ | -l, --lohi | ||
+ | -t, --total | ||
+ | -s N, --seconds N | ||
+ | -c N, --count N | ||
+ | -w, --wide wide output | ||
- | / | + | |
- | total 296 | + | -V, --version |
- | -rwxr-xr-x. 1 root root 302520 Apr 10 2015 libglx.so | + | |
- | / | + | For more details see free(1). |
- | total 276 | + | |
- | -rwxr-xr-x. 1 root root 58776 Jun 10 2014 evdev_drv.so | + | |
- | -rwxr-xr-x. 1 root root 70464 Mar 6 2015 synaptics_drv.so | + | |
- | -rwxr-xr-x. 1 root root 20144 Jun 10 2014 vmmouse_drv.so | + | |
- | -rwxr-xr-x. 1 root root 11440 Jun 10 2014 void_drv.so | + | |
- | -rwxr-xr-x. | + | |
</ | </ | ||
- | Sous RHEL/CentOS 7 les paquets X.orgX11 installés peuvent être trouvés en utilisant | + | ====3.2 - Les Commandes uptime et w==== |
+ | |||
+ | Chacune des ces commandes indique | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | xorg-x11-drv-intel-2.99.916-5.el7.x86_64 | + | 04:39:03 up 1 day, |
- | xorg-x11-fonts-Type1-7.5-9.el7.noarch | + | |
- | abrt-addon-xorg-2.1.11-19.el7.centos.0.3.x86_64 | + | [root@centos8 ~]# w |
- | xorg-x11-utils-7.5-13.1.el7.x86_64 | + | 04:39:04 up 1 day, |
- | xorg-x11-drv-void-1.4.0-23.el7.x86_64 | + | USER |
- | xorg-x11-drv-dummy-0.3.6-15.el7.x86_64 | + | trainee |
- | xorg-x11-drv-fbdev-0.4.3-15.el7.x86_64 | + | |
- | xorg-x11-drv-evdev-2.8.2-5.el7.x86_64 | + | |
- | xorg-x11-glamor-0.6.0-2.20140918git347ef4f.el7.x86_64 | + | |
- | xorg-x11-drv-qxl-0.1.1-12.el7.x86_64 | + | |
- | 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 | + | |
- | xorg-x11-xinit-1.3.2-14.el7.x86_64 | + | |
- | xorg-x11-drv-ati-7.4.0-1.20140918git56c7fb8.el7.x86_64 | + | |
- | xorg-x11-xauth-1.0.7-6.1.el7.x86_64 | + | |
- | xorg-x11-drv-vesa-2.3.2-14.el7.x86_64 | + | |
- | xorg-x11-font-utils-7.5-18.1.el7.x86_64 | + | |
- | xorg-x11-server-common-1.15.0-33.el7_1.x86_64 | + | |
- | xorg-x11-drv-vmware-13.0.2-1.el7.x86_64 | + | |
- | xorg-x11-drv-vmmouse-13.0.0-10.el7.x86_64 | + | |
- | xorg-x11-server-Xorg-1.15.0-33.el7_1.x86_64 | + | |
- | xorg-x11-drv-wacom-0.23.0-6.el7.x86_64 | + | |
- | xorg-x11-drv-nouveau-1.0.10-5.el7.x86_64 | + | |
- | xorg-x11-drv-synaptics-1.7.1-13.el7.x86_64 | + | |
- | xorg-x11-xkb-utils-7.7-9.1.el7.x86_64 | + | |
- | xorg-x11-drv-v4l-0.2.0-35.el7.x86_64 | + | |
</ | </ | ||
- | ====Démarrage et Arrêt==== | + | 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. |
- | Les distributions RHEL ont historiquement utilisés | + | Par exemple si les valeurs sur un système |
- | ====Utilisation==== | + | * 2,48 processus en attente dans la dernière minute, |
+ | * 3,00 processus en attente dans les dernières 5 minutes, | ||
+ | * 2,85 processus en attente dans les dernières 15 minutes. | ||
- | Pour interagir avec et contrôler X.orgX11, un utilisateur dispose | + | Les options |
- | ^ Raccourci | + | <code> |
- | | <key>Ctrl</ | + | [root@centos8 ~]# uptime |
- | | < | + | |
- | | < | + | |
- | ====Configuration==== | + | Usage: |
+ | | ||
+ | |||
+ | Options: | ||
+ | -p, --pretty | ||
+ | -h, --help | ||
+ | -s, --since | ||
+ | -V, --version | ||
+ | |||
+ | For more details see uptime(1). | ||
+ | |||
+ | [root@centos8 ~]# 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). | ||
+ | </ | ||
+ | |||
+ | ====3.3 - La Commande iostat==== | ||
+ | |||
+ | La commande **iostat** affiche des statistiques sur l' | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# iostat | ||
+ | bash: iostat: command not found... | ||
+ | Install package ' | ||
+ | |||
+ | |||
+ | * Waiting in queue... | ||
+ | The following packages have to be installed: | ||
+ | | ||
+ | | ||
+ | Proceed with changes? [N/y] y | ||
+ | |||
+ | |||
+ | * Waiting in queue... | ||
+ | * Waiting for authentication... | ||
+ | * Waiting in queue... | ||
+ | * Downloading packages... | ||
+ | * Requesting data... | ||
+ | * Testing changes... | ||
+ | * Installing packages... | ||
+ | Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc) | ||
+ | |||
+ | avg-cpu: | ||
+ | | ||
+ | |||
+ | Device | ||
+ | sda | ||
+ | sdb | ||
+ | scd0 0.00 | ||
+ | dm-0 0.26 | ||
+ | dm-1 0.00 | ||
+ | </ | ||
+ | |||
+ | Au-dessous de la première ligne indiquant la version du noyau du système et son nom d' | ||
+ | |||
+ | * **%user** - Pourcentage de temps passé en mode utilisateur (exécutant des applications, | ||
+ | * **%nice** - Pourcentage de temps passé en mode utilisateur (pour les processus qui ont modifié leur priorité de programmation à l'aide de la commande nice) | ||
+ | * **%system** - Pourcentage de temps passé en mode noyau | ||
+ | * **%steal** - Pourcentage du temps passé par des CPU virtuels en attendant que l' | ||
+ | * **%iowait** - Pourcentage du temps passé à attendre les entrées et les sorties des disques. | ||
+ | * **%idle** - Pourcentage de temps passé en inactivité | ||
+ | |||
+ | 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. | ||
+ | |||
+ | 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 KB lus par seconde. | ||
+ | * Le nombre de blocs de KB écrits par seconde. | ||
+ | * Le nombre total de KB lus. | ||
+ | * Le nombre total de KB écrits. | ||
+ | |||
+ | Dernièrement, | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# iostat -d -x | ||
+ | Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc) | ||
+ | |||
+ | Device | ||
+ | sda 0.20 0.16 | ||
+ | sdb 0.00 0.00 0.02 0.00 | ||
+ | scd0 | ||
+ | dm-0 | ||
+ | dm-1 | ||
+ | </ | ||
+ | |||
+ | Les options de cette commande sont : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# iostat --help | ||
+ | Usage: iostat [ options ] [ < | ||
+ | Options are: | ||
+ | [ -c ] [ -d ] [ -h ] [ -k | -m ] [ -N ] [ -s ] [ -t ] [ -V ] [ -x ] [ -y ] [ -z ] | ||
+ | [ -j { ID | LABEL | PATH | UUID | ... } ] [ --human ] [ -o JSON ] | ||
+ | [ [ -H ] -g < | ||
+ | [ < | ||
+ | </ | ||
+ | |||
+ | ====3.4 - La Commande hdparm==== | ||
+ | |||
+ | Pour surveiller la vitesse des entrées et des sorties du disque, vous pouvez utiliser la commande **hdparm** : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# hdparm -t /dev/sda | ||
+ | |||
+ | /dev/sda: | ||
+ | | ||
+ | </ | ||
+ | |||
+ | ====3.5 - La Commande vmstat==== | ||
+ | |||
+ | La commande **vmstat** affiche des statistiques sur la mémoire, la pagination et la charge ponctuelle du processeur : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# 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 dans un état de veille qui ne peut être interrompu | ||
+ | |||
+ | 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@centos8 ~]# 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** : Notez que X.orgX11 s' | + | **Important** : Par défaut la commande vmstat affiche des informations depuis |
</ | </ | ||
- | Un fichier de configuration **/ | + | ====3.6 - La Commande mpstat==== |
- | < | + | La commande **mpstat** affiche des statistiques détaillées sur le CPU : |
- | Section " | + | |
- | Identifier | + | |
- | ModelName | + | |
- | VendorName | + | |
- | EndSection | + | |
- | Section " | + | < |
- | | + | [root@centos8 ~]# mpstat |
- | Driver | + | Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc) |
- | Identifier | + | |
- | | + | |
- | EndSection | + | |
- | Section " | + | 04: |
- | SubSection " | + | 04: |
- | Depth 24 | + | </code> |
- | EndSubSection | + | |
- | Device | + | |
- | Identifier | + | |
- | | + | |
- | EndSection | + | |
- | </file> | + | |
- | Des applications tierces peuvent déposer des fichiers de configuration qui leur sont propres dans le répertoire **/ | + | Dans le cas où vous avez plusieurs processeurs ou coeurs, vous pouvez visualiser ces mêmes informations par unité de traitement |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | total 24 | + | Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc) |
- | -rw-r--r--. 1 root root 1099 Apr 10 2015 10-evdev.conf | + | |
- | -rw-r--r--. 1 root root 1867 Apr 10 2015 10-quirks.conf | + | 04: |
- | -rw-r--r--. 1 root root 1704 Mar | + | 04: |
- | -rw-r--r--. 1 root root 115 Jun 10 2014 50-vmmouse.conf | + | 04: |
- | -rw-r--r--. 1 root root | + | 04: |
- | -rw-r--r--. 1 root root 61 Mar 6 2015 glamor.conf | + | 04: |
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | </code> | ||
+ | |||
+ | Pour afficher 5 jeux de statistiques à des intervales de 2 secondes pour tous les unités de traitement, il convient d' | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# mpstat | ||
+ | Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc) | ||
+ | |||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | |||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | |||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | |||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | |||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | 04: | ||
+ | |||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | </ | ||
+ | |||
+ | Les options de cette commande sont : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# mpstat | ||
+ | Usage: mpstat [ options ] [ < | ||
+ | Options are: | ||
+ | [ -A ] [ -n ] [ -u ] [ -V ] [ -I { SUM | CPU | SCPU | ALL } ] | ||
+ | [ -N { < | ||
+ | </ | ||
+ | |||
+ | ====3.7 - La Commande sar==== | ||
+ | |||
+ | La commande **sar** (**S**ystem **A**ctivity **R**eporter) permet de surveiller toutes les ressources du système selon l' | ||
+ | |||
+ | Sous RHEL/CentOS 8 la commande **/ | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# ls / | ||
+ | sa1 sa2 sadc | ||
+ | </ | ||
+ | |||
+ | Le script **/ | ||
+ | |||
+ | ^ Option ^ Description ^ | ||
+ | | -t | L' | ||
+ | | -n | Nombre de collectes | | ||
+ | |||
+ | Le script **/ | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# ls / | ||
+ | sa29 s | ||
+ | |||
+ | |||
+ | ar29 | ||
+ | </ | ||
+ | |||
+ | Sous CentOS / RHEL 8, l' | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cat / | ||
+ | # / | ||
+ | # (C) 2014 Tomasz Torcz < | ||
+ | # | ||
+ | # sysstat-11.7.3 systemd unit file: | ||
+ | # Activates activity collector every 10 minutes | ||
+ | |||
+ | [Unit] | ||
+ | Description=Run system activity accounting tool every 10 minutes | ||
+ | |||
+ | [Timer] | ||
+ | OnCalendar=*: | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=sysstat.service | ||
+ | </ | ||
+ | |||
+ | La valeur de **OnCalendar** indique un collecte toutes les dix minutes. | ||
+ | |||
+ | Pour modifier l' | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# systemctl edit sysstat-collect.timer | ||
+ | [root@centos8 ~]# cat / | ||
+ | [Unit] | ||
+ | Description=Run system activity accounting tool every 2 minutes | ||
+ | |||
+ | [Timer] | ||
+ | OnCalendar= | ||
+ | OnCalendar=*: | ||
+ | AccuracySec=0 | ||
</ | </ | ||
- | <WRAP center round important> | + | <WRAP center round important |
- | **Important** : Les fichiers dans le répertoire | + | **Important** : Notez la ligne **OnCalendar=** qui est necessaire afin de surcharger |
</ | </ | ||
- | Les fichiers | + | Vérifiez ensuite la prise en compte |
- | <file> | + | <code> |
- | Section " | + | [root@centos8 ~]# systemctl status sysstat-collect.timer |
- | ... | + | ● sysstat-collect.timer - Run system activity accounting tool every 2 minutes |
- | </file> | + | |
+ | | ||
+ | | ||
+ | | ||
+ | Trigger: Tue 2021-06-29 09:20:00 EDT; 1min 19s left | ||
- | et se termine par une directive **EndSection** | + | Jun 29 06:16:04 centos8.ittraining.loc systemd[1]: Started Run system activity accounting tool every 10 minutes. |
+ | </ | ||
- | <file> | + | <code> |
+ | [root@centos8 ~]# journalctl -g sysstat-collect.service | ||
+ | -- Logs begin at Mon 2021-06-28 02:04:10 EDT, end at Tue 2021-06-29 09:18:00 EDT. -- | ||
+ | Jun 29 06:20:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
+ | Jun 29 06:26:29 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
+ | Jun 29 06:30:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
+ | Jun 29 06:40:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
+ | Jun 29 06:50:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
+ | Jun 29 07:00:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
+ | Jun 29 07:10:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
+ | Jun 29 07:20:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
+ | Jun 29 07:30:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
+ | Jun 29 07:40:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
+ | Jun 29 07:50:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
+ | Jun 29 07:53:56 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
+ | Jun 29 07:54:00 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
+ | Jun 29 07:56:00 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
+ | Jun 29 07:58:00 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
+ | Jun 29 08:00:00 centos8.ittraining.loc systemd[1]: sysstat-collect.service: | ||
... | ... | ||
- | EndSection | + | </code> |
- | </file> | + | |
- | Dans chaque section se trouvent des lignes comprennant une **Option** suivi d'une ou de plusieurs **Valeurs** | + | Saisissez la commande suivante |
- | <file> | + | <code> |
- | | + | [root@centos8 ~]# sar |
- | </file> | + | Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc) |
- | <WRAP center round important> | + | 06:16:04 LINUX RESTART |
- | **A faire** | + | |
- | </ | + | |
- | Certaines options sont des booléenes. Les valeurs admises sont : | + | 06: |
+ | 06: | ||
+ | 06:30:33 all 0.02 0.00 0.03 0.00 0.00 | ||
+ | 06: | ||
+ | 06: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | Average: | ||
- | * **Vrai** | + | 07:55:44 LINUX RESTART |
- | * **Faux** | + | |
- | ===La Section ServerFlags=== | + | 07: |
+ | 07: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 08: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
- | 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**. | + | 09: |
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | Average: | ||
+ | </ | ||
- | Un exemple de cette section est : | + | ===Statistiques d' |
- | < | + | Visualisez maintenant les statistiques d' |
- | Section " | + | |
- | Option " | + | |
- | EndSection | + | |
- | </ | + | |
- | Les directives les plus courantes dans cette section sont : | + | < |
+ | [root@centos8 ~]# sar -u 5 3 | ||
+ | Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc) | ||
- | ^ Directive | + | 09: |
- | | " | + | 09: |
- | | " | + | 09: |
+ | 09: | ||
+ | Average: | ||
+ | </code> | ||
- | ===La Section ServerLayout=== | + | D' |
- | Cette section regroupe les informations concernant les périphériques en entrée et les périphériques en sortie. | + | < |
+ | [root@centos8 ~]# sar -u ALL 5 3 | ||
+ | Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc) | ||
- | Un exemple de cette section est : | + | 01:49:14 CPU %usr |
+ | 01: | ||
+ | 01: | ||
+ | 01: | ||
+ | Average: | ||
+ | </ | ||
- | < | + | Pour consulter les statistiques d'un coeur spécifique, |
- | Section | + | |
- | Identifier | + | |
- | Screen | + | |
- | InputDevice | + | |
- | InputDevice | + | |
- | EndSection | + | |
- | </ | + | |
- | Les directives les plus courantes dans cette section sont : | + | < |
+ | [root@centos8 ~]# sar -u -P 1 5 3 | ||
+ | Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc) | ||
- | ^ Directive | + | 01: |
- | | " | + | 01: |
- | | " | + | 01: |
- | | " | + | 01: |
- | | " | + | Average: |
+ | [root@centos8 ~]# sar -u -P 5 5 3 | ||
+ | Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc) | ||
+ | |||
+ | 01: | ||
+ | 01: | ||
+ | 01: | ||
+ | 01: | ||
+ | Average: | ||
+ | </ | ||
+ | |||
+ | ===Statistiques d' | ||
+ | |||
+ | Utilisez l' | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# sar -r 5 3 | ||
+ | Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc) | ||
+ | |||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | Average: | ||
+ | </ | ||
+ | |||
+ | Utilisez l' | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# sar -S 5 3 | ||
+ | Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc) | ||
+ | |||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | Average: | ||
+ | </ | ||
+ | |||
+ | ===Statistiques des E/S=== | ||
+ | |||
+ | Utilisez | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# sar -b 5 3 | ||
+ | Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc) | ||
+ | |||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | Average: | ||
+ | </ | ||
+ | |||
+ | ===Statistiques des E/S par Disque=== | ||
+ | |||
+ | Utilisez | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# sar -d 5 3 | ||
+ | Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc) | ||
+ | |||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | |||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | |||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | 09: | ||
+ | |||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | </ | ||
+ | |||
+ | La colonne **DEV** indentifie les disques par leurs majeurs et mineurs. Pour voir les informations avec les noms des disques, ajoutez | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# sar -p -d 5 3 | ||
+ | Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc) | ||
+ | |||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | |||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | |||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | 07: | ||
+ | |||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | Average: | ||
+ | </ | ||
+ | |||
+ | Les options de la commande sar sont : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# sar --help | ||
+ | Usage: sar [ options ] [ < | ||
+ | Main options and reports (report name between square brackets): | ||
+ | -B Paging statistics [A_PAGE] | ||
+ | -b I/O and transfer rate statistics [A_IO] | ||
+ | -d Block devices statistics [A_DISK] | ||
+ | -F [ MOUNT ] | ||
+ | Filesystems statistics [A_FS] | ||
+ | -H Hugepages utilization statistics [A_HUGE] | ||
+ | -I { < | ||
+ | | ||
+ | -m { < | ||
+ | Power management statistics [A_PWR_...] | ||
+ | Keywords are: | ||
+ | CPU CPU instantaneous clock frequency | ||
+ | FAN Fans speed | ||
+ | FREQ CPU average clock frequency | ||
+ | IN Voltage inputs | ||
+ | TEMP Devices temperature | ||
+ | USB USB devices plugged into the system | ||
+ | -n { < | ||
+ | Network statistics [A_NET_...] | ||
+ | Keywords are: | ||
+ | DEV | ||
+ | EDEV Network interfaces (errors) | ||
+ | NFS NFS client | ||
+ | NFSD NFS server | ||
+ | SOCK Sockets (v4) | ||
+ | IP IP traffic | ||
+ | EIP IP traffic | ||
+ | ICMP ICMP traffic | ||
+ | EICMP ICMP traffic | ||
+ | TCP TCP traffic | ||
+ | ETCP TCP traffic | ||
+ | UDP UDP traffic | ||
+ | SOCK6 | ||
+ | IP6 IP traffic | ||
+ | EIP6 IP traffic | ||
+ | ICMP6 ICMP traffic | ||
+ | EICMP6 | ||
+ | UDP6 UDP traffic | ||
+ | FC Fibre channel HBAs | ||
+ | SOFT Software-based network processing | ||
+ | -q Queue length and load average statistics [A_QUEUE] | ||
+ | -r [ ALL ] | ||
+ | Memory utilization statistics [A_MEMORY] | ||
+ | -S Swap space utilization statistics [A_MEMORY] | ||
+ | -u [ ALL ] | ||
+ | CPU utilization statistics [A_CPU] | ||
+ | -v Kernel tables statistics [A_KTABLES] | ||
+ | -W Swapping statistics [A_SWAP] | ||
+ | -w Task creation and system switching statistics [A_PCSW] | ||
+ | -y TTY devices statistics [A_SERIAL] | ||
+ | </ | ||
+ | |||
+ | =====Modules usb===== | ||
+ | |||
+ | L'**USB** (// | ||
+ | |||
+ | ^ Version USB ^ Module ^ Nom Complet ^ | ||
+ | | | ||
+ | | ::: | **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 ^ | ||
+ | | | ||
+ | | **usbhid** | ||
+ | | **snd-usb-audio** | ||
+ | | **usbvidéo** | ||
+ | | | ||
+ | | **usbnet** | ||
+ | |||
+ | Les modules peuvent être chargés par un des moyens suivants : | ||
+ | |||
+ | * INITrd, | ||
+ | * Le processus init (systemd), | ||
+ | * kmod, d'une manière dynamique et transparente lors du branchement du périphérique, | ||
+ | * udev, | ||
+ | * manuellement. | ||
+ | |||
+ | =====udev===== | ||
+ | |||
+ | Depuis le noyau Linux 2.6 Linux est capable de détecter des périphériques branchés à chaud. Cette technologie s' | ||
+ | |||
+ | * Udev, | ||
+ | * HAL, | ||
+ | * Dbus. | ||
+ | |||
+ | 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 | ||
+ | * 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 **/ | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cat / | ||
+ | # see udev.conf(5) for details | ||
+ | # | ||
+ | # udevd is also started in the initrd. | ||
+ | # also want to rebuild the initrd, so that it will include the modified configuration. | ||
+ | |||
+ | # | ||
+ | </ | ||
+ | |||
+ | Les fichiers de règles se trouvent dans **/ | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# ls / | ||
+ | 01-md-raid-creating.rules | ||
+ | 10-dm.rules | ||
+ | 11-dm-lvm.rules | ||
+ | 11-dm-mpath.rules | ||
+ | 11-dm-parts.rules | ||
+ | 13-dm-disk.rules | ||
+ | 39-usbmuxd.rules | ||
+ | 40-elevator.rules | ||
+ | 40-libgphoto2.rules | ||
+ | 40-redhat.rules | ||
+ | 40-usb-blacklist.rules | ||
+ | 40-usb_modeswitch.rules | ||
+ | 50-udev-default.rules | ||
+ | 60-alias-kmsg.rules | ||
+ | 60-block.rules | ||
+ | 60-cdrom_id.rules | ||
+ | 60-drm.rules | ||
+ | 60-evdev.rules | ||
+ | 60-fido-id.rules | ||
+ | 60-input-id.rules | ||
+ | 60-libfprint-2-autosuspend.rules | ||
+ | 60-net.rules | ||
+ | 60-persistent-alsa.rules | ||
+ | 60-persistent-input.rules | ||
+ | 60-persistent-storage.rules | ||
+ | 60-persistent-storage-tape.rules | ||
+ | 60-persistent-v4l.rules | ||
+ | 60-raw.rules | ||
+ | 60-rdma-ndd.rules | ||
+ | 60-rdma-persistent-naming.rules | ||
+ | 60-sensor.rules | ||
+ | 60-serial.rules | ||
+ | 60-tpm-udev.rules | ||
+ | 61-gdm.rules | ||
+ | 61-gnome-bluetooth-rfkill.rules | ||
+ | 61-gnome-settings-daemon-rfkill.rules | ||
+ | 61-scsi-sg3_id.rules | ||
+ | 62-multipath.rules | ||
+ | 63-fc-wwpn-id.rules | ||
+ | 63-md-raid-arrays.rules | ||
+ | 63-scsi-sg3_symlink.rules | ||
+ | 64-btrfs.rules | ||
+ | 64-md-raid-assembly.rules | ||
+ | 65-libwacom.rules | ||
+ | 65-md-incremental.rules | ||
+ | 65-sane-backends.rules | ||
+ | 66-kpartx.rules | ||
+ | 68-del-part-nodes.rules | ||
+ | 69-btattach-bcm.rules | ||
+ | 69-cd-sensors.rules | ||
+ | 69-dm-lvm-metad.rules | ||
+ | 69-libmtp.rules | ||
+ | 69-md-clustered-confirm-device.rules | ||
+ | 70-hypervfcopy.rules | ||
+ | 70-hypervkvp.rules | ||
+ | 70-hypervvss.rules | ||
+ | 70-joystick.rules | ||
+ | 70-mouse.rules | ||
+ | 70-nvmf-autoconnect.rules | ||
+ | 70-power-switch.rules | ||
+ | 70-printers.rules | ||
+ | 70-spice-vdagentd.rules | ||
+ | 70-touchpad.rules | ||
+ | </ | ||
- | <WRAP center round important> | + | <WRAP center round important |
- | **Important** : Le fichier | + | **Important** : Il vous est possible d' |
</ | </ | ||
- | ===La Section Files=== | + | Comme indique le nom de chaque fichier, le contenu est composé de règles à l' |
- | Cette section regroupe les informations concernant les fichiers de configuration supplémentaires. | + | < |
+ | [root@centos8 ~]# cat / | ||
+ | # do not edit this file, it will be overwritten on update | ||
- | Un exemple de cette section est : | + | # run a command on remove events |
+ | ACTION==" | ||
+ | ACTION==" | ||
- | < | + | SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+=" |
- | Section | + | |
- | RgbPath | + | |
- | FontPath | + | |
- | EndSection | + | |
- | </ | + | |
- | Les directives les plus courantes dans cette section sont : | + | # select " |
+ | SUBSYSTEM==" | ||
+ | SUBSYSTEM==" | ||
- | ^ Directive | + | SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", |
- | | "RgbPath" | + | ENV{MODALIAS}!="", |
- | | "FontPath" | + | |
- | | "ModulePath" | + | |
- | Voici le fichier | + | ACTION!=" |
+ | |||
+ | SUBSYSTEM==" | ||
+ | SUBSYSTEM==" | ||
+ | SUBSYSTEM==" | ||
+ | SUBSYSTEM==" | ||
+ | SUBSYSTEM==" | ||
+ | SUBSYSTEM==" | ||
+ | SUBSYSTEM==" | ||
+ | KERNEL==" | ||
+ | |||
+ | SUBSYSTEM==" | ||
+ | |||
+ | SUBSYSTEM==" | ||
+ | SUBSYSTEM==" | ||
+ | |||
+ | SUBSYSTEM==" | ||
+ | SUBSYSTEM==" | ||
+ | SUBSYSTEM==" | ||
+ | SUBSYSTEM==" | ||
+ | SUBSYSTEM==" | ||
+ | SUBSYSTEM==" | ||
+ | |||
+ | SUBSYSTEM==" | ||
+ | SUBSYSTEM==" | ||
+ | |||
+ | SUBSYSTEM==" | ||
+ | OPTIONS+=" | ||
+ | --More-- | ||
+ | </code> | ||
+ | |||
+ | 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' | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | 255 250 250 snow | + | P: /devices/pci0000:00/0000:00:07.0/ |
- | 248 248 255 ghost white | + | N: sda |
- | 248 248 255 GhostWhite | + | S: disk/ |
- | 245 245 245 white smoke | + | S: disk/ |
- | 245 245 245 WhiteSmoke | + | S: disk/ |
- | 220 220 220 gainsboro | + | S: disk/ |
- | 255 250 240 floral white | + | S: disk/ |
- | 255 250 240 FloralWhite | + | E: DEVLINKS=/ |
- | 253 245 230 old lace | + | E: DEVNAME=/ |
- | 253 245 230 OldLace | + | E: DEVPATH=/ |
- | 250 240 230 linen | + | E: DEVTYPE=disk |
- | 250 235 215 antique white | + | E: ID_ATA=1 |
- | 250 235 215 AntiqueWhite | + | E: ID_ATA_FEATURE_SET_SMART=1 |
- | 255 239 213 papaya whip | + | E: ID_ATA_FEATURE_SET_SMART_ENABLED=1 |
- | 255 239 213 PapayaWhip | + | E: ID_ATA_SATA=1 |
- | 255 235 205 blanched almond | + | E: ID_ATA_WRITE_CACHE=1 |
- | 255 235 205 BlanchedAlmond | + | E: ID_ATA_WRITE_CACHE_ENABLED=1 |
- | 255 228 196 bisque | + | E: ID_BUS=ata |
- | 255 218 185 peach puff | + | E: ID_MODEL=QEMU_HARDDISK |
- | 255 218 185 PeachPuff | + | E: ID_MODEL_ENC=QEMU\x20HARDDISK\x20\x20\x20 |
- | 255 222 173 navajo white | + | E: ID_PART_TABLE_TYPE=dos |
- | 255 222 173 NavajoWhite | + | E: ID_PART_TABLE_UUID=b39ec5c8 |
- | 255 228 181 moccasin | + | E: ID_PATH=pci-0000: |
- | 255 248 220 cornsilk | + | E: ID_PATH_TAG=pci-0000_00_07_0-ata-1 |
- | 255 255 240 ivory | + | E: ID_REVISION=2.5+ |
- | 255 250 205 lemon chiffon | + | E: ID_SCSI=1 |
- | 255 250 205 LemonChiffon | + | E: ID_SCSI_INQUIRY=1 |
- | 255 245 238 seashell | + | E: ID_SERIAL=QEMU_HARDDISK_QM00005 |
- | 240 255 240 honeydew | + | E: ID_SERIAL_SHORT=QM00005 |
- | --More--(3%) | + | E: ID_TYPE=disk |
+ | E: ID_VENDOR=ATA | ||
+ | E: ID_VENDOR_ENC=ATA\x20\x20\x20\x20\x20 | ||
+ | E: MAJOR=8 | ||
+ | E: MINOR=0 | ||
+ | E: SCSI_IDENT_LUN_ATA=QEMU_HARDDISK_QM00005 | ||
+ | E: SCSI_IDENT_LUN_T10=ATA_QEMU_HARDDISK_QM00005 | ||
+ | E: SCSI_IDENT_LUN_VENDOR=QM00005 | ||
+ | E: SCSI_IDENT_SERIAL=QM00005 | ||
+ | E: SCSI_MODEL=QEMU_HARDDISK | ||
+ | E: SCSI_MODEL_ENC=QEMU\x20HARDDISK\x20\x20\x20 | ||
+ | E: SCSI_REVISION=2.5+ | ||
+ | E: SCSI_TPGS=0 | ||
+ | E: SCSI_TYPE=disk | ||
+ | E: SCSI_VENDOR=ATA | ||
+ | E: SCSI_VENDOR_ENC=ATA\x20\x20\x20\x20\x20 | ||
+ | E: SUBSYSTEM=block | ||
+ | E: TAGS=: | ||
+ | E: USEC_INITIALIZED=8735808 | ||
</ | </ | ||
- | ===La Section Modules=== | + | ===Les options de la commande=== |
- | Par défaut le serveur X charge ses modules à partir du répertoire **/ | + | Les options de la commande udevadm sont : |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | drivers | + | udevadm [--help] [--version] [--debug] COMMAND [COMMAND OPTIONS] |
- | extensions | + | |
+ | Send control commands or test the device manager. | ||
+ | |||
+ | Commands: | ||
+ | info Query sysfs or the udev database | ||
+ | trigger | ||
+ | settle | ||
+ | | ||
+ | monitor | ||
+ | test Test an event run | ||
+ | test-builtin | ||
+ | |||
+ | [root@centos8 ~]# udevadm info --help | ||
+ | udevadm info [OPTIONS] [DEVPATH|FILE] | ||
+ | |||
+ | Query sysfs or the udev database. | ||
+ | |||
+ | -h --help | ||
+ | -V --version | ||
+ | -q --query=TYPE | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | -p --path=SYSPATH | ||
+ | -n --name=NAME | ||
+ | -r --root | ||
+ | -a --attribute-walk | ||
+ | of parent devices | ||
+ | -d --device-id-of-file=FILE Print major:minor of device containing this file | ||
+ | -x --export | ||
+ | -P --export-prefix | ||
+ | -e --export-db | ||
+ | -c --cleanup-db | ||
</ | </ | ||
+ | |||
+ | =====Système de fichiers /sys===== | ||
+ | |||
+ | Le système de fichiers virtuel **/sys** a été introduit avec le noyau Linux **2.6**. Son rôle est de décrire le matériel pour udev. | ||
+ | |||
+ | Saisissez la commande suivante : | ||
< | < | ||
- | root@debian8:~# ls /usr/ | + | [root@centos8 |
- | drivers | + | total 0 |
- | extensions | + | drwxr-xr-x. 2 root root 0 Jul 12 08:15 block |
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. 4 root root 0 Jul 12 08:15 dev | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. 6 root root 0 Jul 12 08:15 firmware | ||
+ | drwxr-xr-x. 9 root root 0 Jul 12 08:15 fs | ||
+ | drwxr-xr-x. 2 root root 0 Jul 12 08:15 hypervisor | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. 153 root root 0 Jul 12 08:15 module | ||
+ | drwxr-xr-x. | ||
</ | </ | ||
- | <WRAP center round important> | + | Chaque répertoire contient des informations : |
- | **Important** : Le chemin | + | |
+ | * **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 : | ||
+ | |||
+ | <code> | ||
+ | [root@centos8 ~]# cat / | ||
+ | 2097152 | ||
+ | </ | ||
+ | |||
+ | Ce chiffre correspond aux nombre de secteurs. | ||
+ | |||
+ | =====LAB #4 - Limitation des ressources===== | ||
+ | |||
+ | ====4.1 - 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 //soft// est la limite imposée à l' | ||
+ | |||
+ | L' | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# 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 60%> | ||
+ | **Important** : La valeur de la limite peut être un **nombre** ou le mot **unlimited**. | ||
</ | </ | ||
- | Un exemple | + | Par exemple, si root inscrit les deux ligne suivantes dans le fichier / |
< | < | ||
- | Section " | + | ... |
- | Load " | + | trainee |
- | EndSection | + | trainee |
+ | ... | ||
</ | </ | ||
- | <WRAP center round important> | + | la limite du nombre de fichiers ouverts simultanément |
- | **Attention** : Dans l' | + | |
- | </ | + | |
- | ===La Section InputDevice=== | + | < |
+ | $ ulimit -n 4096 | ||
+ | </ | ||
- | 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 | + | Pour consulter la liste des limites actuelles, il convient d'utiliser la commande ulimit avec l'option |
- | Un exemple de cette section est : | + | < |
+ | [root@centos8 ~]# ulimit -a | ||
+ | core file size (blocks, -c) unlimited | ||
+ | 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==== |
- | Section " | + | |
- | Identifier | + | |
- | Driver | + | |
- | Option | + | |
- | Option | + | |
- | EndSection | + | |
- | </ | + | |
- | Les directives les plus courantes dans cette section | + | Les options de **ulimit** |
- | ^ Directive | + | < |
- | | " | + | [root@centos8 ~]# help ulimit |
- | | " | + | ulimit: ulimit [-SHabcdefiklmnpqrstuvxPT] [limit] |
- | | " | + | Modify shell resource limits. |
+ | |||
+ | Provides control over the resources available to the shell and processes | ||
+ | it creates, on systems that allow such control. | ||
+ | |||
+ | Options: | ||
+ | -S use the `soft' resource limit | ||
+ | -H use the `hard' resource limit | ||
+ | -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 | ||
+ | -k the maximum number of kqueues allocated for this process | ||
+ | -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 | ||
+ | -P the maximum number of pseudoterminals | ||
+ | -T the maximum number of threads | ||
+ | |||
+ | Not all options are available on all platforms. | ||
+ | |||
+ | 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 | ||
+ | |||
+ | Values are in 1024-byte increments, except for -t, which is in seconds, | ||
+ | -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. | ||
+ | </ | ||
- | Quand la section décrit une souris, on trouve typiquement les options suivantes : | + | ====4.2 - Groupes de Contrôle==== |
- | ^ Option | + | Les **Groupes de Contrôles** (//Control Groups//) aussi appelés |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | ===La Section Monitor=== | + | Les groupes de contrôle sont organisés de manière hiérarchique, |
- | Cette section décrit l' | + | Ces hiérarchies multiples et séparés |
- | <WRAP center round important> | + | * **blkio** - utilisé pour établir des limites sur l' |
- | **Attention** : Il est important | + | * **cpu** - utilisé pour fournir aux tâches des groupes de contrôle accès au CPU grâce au planificateur, |
+ | * **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 | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# lssubsys -am | ||
+ | bash: lssubsys: command not found... | ||
+ | Install package ' | ||
+ | |||
+ | |||
+ | * Waiting in queue... | ||
+ | The following packages have to be installed: | ||
+ | | ||
+ | | ||
+ | Proceed with changes? [N/y] y | ||
+ | |||
+ | |||
+ | * Waiting in queue... | ||
+ | * Waiting for authentication... | ||
+ | * Waiting in queue... | ||
+ | * Downloading packages... | ||
+ | * Requesting data... | ||
+ | * Testing changes... | ||
+ | * Installing packages... | ||
+ | cpuset / | ||
+ | cpu,cpuacct / | ||
+ | blkio / | ||
+ | memory / | ||
+ | devices / | ||
+ | freezer / | ||
+ | net_cls, | ||
+ | perf_event / | ||
+ | hugetlb / | ||
+ | pids / | ||
+ | rdma / | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# lssubsys -am | ||
+ | cpuset / | ||
+ | cpu,cpuacct / | ||
+ | blkio / | ||
+ | memory / | ||
+ | devices / | ||
+ | freezer / | ||
+ | net_cls, | ||
+ | perf_event / | ||
+ | hugetlb / | ||
+ | pids / | ||
+ | rdma / | ||
+ | </ | ||
+ | |||
+ | Sous RHEL/CentOS 8, **Systemd** organise | ||
+ | |||
+ | En haut de l' | ||
+ | |||
+ | * le **system.slice** - l' | ||
+ | * le **user.slice** - l' | ||
+ | * 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 suivante : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# systemctl list-units --type=slice | ||
+ | UNIT LOAD | ||
+ | -.slice | ||
+ | machine.slice | ||
+ | system-getty.slice | ||
+ | system-lvm2\x2dpvscan.slice | ||
+ | system-sshd\x2dkeygen.slice | ||
+ | system-systemd\x2dfsck.slice | ||
+ | system-systemd\x2dhibernate\x2dresume.slice loaded active active system-systemd\x2dhibernate\x2dresume.slice | ||
+ | system-user\x2druntime\x2ddir.slice | ||
+ | system-vncserver.slice | ||
+ | system.slice | ||
+ | user-1000.slice | ||
+ | user-42.slice | ||
+ | user.slice | ||
+ | |||
+ | LOAD = Reflects whether the unit definition was properly loaded. | ||
+ | ACTIVE = The high-level unit activation state, i.e. generalization of SUB. | ||
+ | SUB = The low-level unit activation state, values depend on unit type. | ||
+ | |||
+ | 13 loaded units listed. Pass --all to see loaded but inactive units, too. | ||
+ | To show all installed unit files use ' | ||
+ | </ | ||
+ | |||
+ | L' | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# systemd-cgls | ||
+ | Control group /: | ||
+ | -.slice | ||
+ | ├─user.slice | ||
+ | │ ├─user-42.slice | ||
+ | │ │ ├─session-c1.scope | ||
+ | │ │ │ ├─1317 gdm-session-worker [pam/ | ||
+ | │ │ │ ├─1459 / | ||
+ | │ │ │ ├─1856 / | ||
+ | │ │ │ ├─1882 / | ||
+ | │ │ │ ├─2059 / | ||
+ | │ │ │ ├─2132 ibus-daemon --xim --panel disable | ||
+ | │ │ │ ├─2135 / | ||
+ | │ │ │ ├─2138 / | ||
+ | │ │ │ ├─2251 / | ||
+ | │ │ │ ├─2261 / | ||
+ | │ │ │ ├─2268 / | ||
+ | │ │ │ ├─2271 / | ||
+ | │ │ │ ├─2272 / | ||
+ | │ │ │ ├─2273 / | ||
+ | │ │ │ ├─2274 / | ||
+ | │ │ │ ├─2275 / | ||
+ | │ │ │ ├─2280 / | ||
+ | │ │ │ ├─2281 / | ||
+ | │ │ │ ├─2283 / | ||
+ | │ │ │ ├─2284 / | ||
+ | │ │ │ ├─2285 / | ||
+ | │ │ │ ├─2290 / | ||
+ | │ │ │ ├─2321 / | ||
+ | │ │ │ ├─2328 / | ||
+ | │ │ │ ├─2333 / | ||
+ | │ │ │ └─2432 / | ||
+ | │ │ └─user@42.service | ||
+ | │ │ | ||
+ | │ │ │ └─2170 / | ||
+ | │ │ | ||
+ | │ │ │ └─1455 / | ||
+ | │ │ | ||
+ | │ │ │ ├─1357 / | ||
+ | │ │ │ └─1377 (sd-pam) | ||
+ | │ │ | ||
+ | │ │ │ ├─2090 / | ||
+ | │ │ │ ├─2095 / | ||
+ | │ │ │ └─2098 / | ||
+ | │ │ | ||
+ | │ │ | ||
+ | │ │ | ||
+ | │ └─user-1000.slice | ||
+ | │ | ||
+ | │ │ ├─gvfs-goa-volume-monitor.service | ||
+ | │ │ │ └─2369 / | ||
+ | │ │ ├─xdg-permission-store.service | ||
+ | │ │ │ └─2191 / | ||
+ | │ │ ├─tracker-store.service | ||
+ | │ │ │ └─2653 / | ||
+ | │ │ ├─evolution-calendar-factory.service | ||
+ | │ │ │ ├─2605 / | ||
+ | │ │ │ └─2706 / | ||
+ | │ │ ├─pulseaudio.service | ||
+ | │ │ │ └─1456 / | ||
+ | │ │ ├─gvfs-daemon.service | ||
+ | │ │ │ ├─1896 / | ||
+ | │ │ │ └─1901 / | ||
+ | │ │ ├─evolution-source-registry.service | ||
+ | │ │ │ └─2206 / | ||
+ | │ │ ├─gvfs-udisks2-volume-monitor.service | ||
+ | │ │ │ └─2243 / | ||
+ | │ │ ├─init.scope | ||
+ | │ │ │ ├─1239 / | ||
+ | │ │ │ └─1318 (sd-pam) | ||
+ | │ │ ├─gvfs-gphoto2-volume-monitor.service | ||
+ | │ │ │ └─2269 / | ||
+ | │ │ ├─at-spi-dbus-bus.service | ||
+ | │ │ │ ├─1964 / | ||
+ | │ │ │ ├─1969 / | ||
+ | │ │ │ └─1972 / | ||
+ | │ │ ├─dbus.service | ||
+ | │ │ │ ├─1786 / | ||
+ | │ │ │ ├─2183 / | ||
+ | │ │ │ ├─2201 / | ||
+ | │ │ │ ├─2225 / | ||
+ | │ │ │ ├─2397 / | ||
+ | │ │ │ └─2721 / | ||
+ | │ │ ├─evolution-addressbook-factory.service | ||
+ | │ │ │ ├─2727 / | ||
+ | │ │ │ └─2771 / | ||
+ | │ │ ├─gvfs-mtp-volume-monitor.service | ||
+ | lines 44-86 | ||
+ | </ | ||
+ | |||
+ | En utilisant Systemd, plusieurs ressources peuvent être limitées : | ||
+ | |||
+ | * **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 60%> | ||
+ | **Important** : Consultez le manuel systemd.resource-control(5) pour voir les paramètres CGroup qui peuvent être passés à systemctl. | ||
</ | </ | ||
- | Un exemple | + | ===Limitation |
- | < | + | Commencez par créer le script **hello-world.sh** qui servira à générer un processus pour travailler avec les CGroups : |
- | Section " | + | |
- | Identifier | + | |
- | VendorName | + | |
- | ModelName | + | |
- | DisplaySize | + | |
- | HorizSync | + | |
- | VertRefresh | + | |
- | EndSection | + | |
- | </ | + | |
- | Les directives les plus courantes dans cette section sont : | + | < |
+ | [root@centos8 ~]# vi hello-world.sh | ||
+ | [root@centos8 ~]# cat hello-world.sh | ||
+ | # | ||
+ | while [ 1 ]; do | ||
+ | echo "hello world" | ||
+ | sleep 360 | ||
+ | done | ||
+ | </ | ||
- | ^ Directive | + | Rendez |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | | " | + | |
+ | < | ||
+ | [root@centos8 ~]# chmod u+x hello-world.sh | ||
+ | [root@centos8 ~]# ./ | ||
+ | hello world | ||
+ | ^C | ||
+ | </ | ||
- | ===La Section Device=== | + | Créez maintenant un CGroup dans le sous-système **memory** appelé **helloworld** : |
- | Cette section décrit une carte vidéo. Il y a une section Device pour chaque carte vidéo présente dans la machine. | + | < |
+ | [root@centos8 ~]# mkdir / | ||
+ | </ | ||
- | Un exemple | + | Par défaut, ce CGroup héritera |
- | <file> | + | <code> |
- | Section " | + | [root@centos8 ~]# echo 40000000 > / |
- | Identifier | + | [root@centos8 ~]# cat / |
- | Driver | + | 39997440 |
- | VendorName | + | </code> |
- | BoardName | + | |
- | VideoRam | + | |
- | Option | + | |
- | EndSection | + | |
- | </file> | + | |
- | Les directives | + | <WRAP center round important 60%> |
+ | **Important** - Notez que les 40 000 000 demandés | ||
+ | </ | ||
- | ^ Directive | + | Lancez maintenant |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | ===La Section Screen=== | + | < |
+ | [root@centos8 ~]# ./ | ||
+ | [1] 35148 | ||
- | Cette section associe une carte vidéo décrite par une section **Device** avec un moniteur décrit par une section **Monitor** : | + | [root@centos8 ~]# hello world |
+ | [Entrée] | ||
- | Un exemple de cette section est : | + | [root@centos8 ~]# ps aux | grep hello-world |
+ | root | ||
+ | root | ||
+ | </ | ||
- | < | + | Notez qu'il n'y a pas de limite de la mémoire, ce qui implique l' |
- | Section " | + | |
- | Identifier " | + | |
- | Device | + | |
- | Monitor | + | |
- | DefaultDepth | + | |
- | SubSection " | + | |
- | Depth | + | |
- | Modes | + | |
- | EndSubSection | + | |
- | SubSection " | + | |
- | Depth | + | |
- | Modes | + | |
- | EndSubSection | + | |
- | EndSection | + | |
- | </ | + | |
- | Les directives les plus courantes dans cette section sont : | + | < |
+ | [root@centos8 ~]# ps -ww -o cgroup 35148 | ||
+ | CGROUP | ||
+ | 12:memory:/ | ||
+ | </ | ||
- | ^ Directive | + | Insérer le PID de notre script dans le CGroup **helloworld** : |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | | " | + | |
- | ====La Commande xwininfo==== | + | < |
+ | [root@centos8 ~]# echo 35148 > / | ||
+ | </ | ||
- | La commande xwininfo permet d'obtenir | + | Notez maintenant l'héritage |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
+ | CGROUP | ||
+ | 12: | ||
+ | </ | ||
- | xwininfo: Please select the window about which you | + | Constatez ensuite l' |
- | would like information by clicking the | + | |
- | mouse in that window. | + | |
- | xwininfo: Window id: 0x2800025 " | + | < |
+ | [root@centos8 | ||
+ | 274432 | ||
+ | </ | ||
- | Absolute upper-left X: 0 | + | Tuez le script **hello-world.sh** |
- | | + | |
- | | + | < |
- | | + | [root@centos8 ~]# kill 35148 |
- | | + | [root@centos8 ~]# ps aux | grep hello-world |
- | Height: 574 | + | root |
- | Depth: 24 | + | [1]+ |
- | Visual: 0x21 | + | |
- | Visual Class: TrueColor | + | |
- | Border width: 0 | + | |
- | Class: InputOutput | + | |
- | Colormap: 0x20 (installed) | + | |
- | Bit Gravity State: NorthWestGravity | + | |
- | Window Gravity State: NorthWestGravity | + | |
- | Backing Store State: NotUseful | + | |
- | Save Under State: no | + | |
- | Map State: IsViewable | + | |
- | Override Redirect State: no | + | |
- | Corners: | + | |
- | -geometry 1366x574+0+28 | + | |
</ | </ | ||
- | Les options de la commande xwininfo sont : | + | Créez un second CGroup beaucoup plus restrictif |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | usage: | + | [root@centos8 ~]# echo 6000 > / |
+ | [root@centos8 ~]# cat / | ||
+ | 4096 | ||
+ | </ | ||
+ | |||
+ | Relancez le script **hello-world.sh** et insérez-le dans le nouveau CGroup | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# ./hello-world.sh & | ||
+ | [1] 35389 | ||
+ | |||
+ | [root@centos8 ~]# hello world | ||
+ | [Entrée] | ||
- | where options include: | + | [root@centos8 ~]# echo 35389 > / |
- | -help print this message | + | |
- | -display host: | + | |
- | -root use the root window | + | |
- | -id windowid | + | |
- | -name windowname | + | |
- | -int print window id in decimal | + | |
- | -children | + | |
- | -tree print children identifiers recursively | + | |
- | -stats | + | |
- | -bits print window pixel information | + | |
- | -events | + | |
- | -size print size hints | + | |
- | -wm print window manager hints | + | |
- | -shape | + | |
- | -frame | + | |
- | -english | + | |
- | -metric | + | |
- | -all | + | |
</ | </ | ||
- | ====La Commande xdpyinfo==== | + | Attendez la prochaine sortie de **hello world** sur le canal standard puis constatez que le script s' |
- | Xdpyinfo est un utilitaire utilisé pour afficher des informations concernant le serveur X : | + | < |
+ | [root@centos8 ~]# hello world | ||
+ | [Entrée] | ||
+ | [1]+ Killed | ||
+ | </ | ||
+ | |||
+ | ===La Commande cgcreate=== | ||
+ | |||
+ | Cette commande permet la création d'un CGroup | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | name of display: | + | [root@centos8 ~]# ls -l / |
- | version number: 11.0 | + | total 0 |
- | vendor string: The X.Org Foundation | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 cgroup.clone_children |
- | vendor release number: | + | --w--w----. 1 root root 0 Jul 13 10:39 cgroup.event_control |
- | X.Org version: 1.15.0 | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 cgroup.procs |
- | maximum request size: | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.failcnt |
- | motion buffer size: 256 | + | --w--w----. 1 root root 0 Jul 13 10:39 memory.force_empty |
- | bitmap unit, bit order, padding: 32, LSBFirst, 32 | + | -rw-rw-r--. |
- | image byte order: | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.limit_in_bytes |
- | number of supported pixmap formats: 7 | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.max_usage_in_bytes |
- | supported pixmap formats: | + | -r--r--r--. 1 root root 0 Jul 13 10:39 memory.kmem.slabinfo |
- | | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.tcp.failcnt |
- | depth 4, bits_per_pixel 8, scanline_pad 32 | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.tcp.limit_in_bytes |
- | depth 8, bits_per_pixel 8, scanline_pad 32 | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.tcp.max_usage_in_bytes |
- | depth 15, bits_per_pixel 16, scanline_pad 32 | + | -r--r--r--. 1 root root 0 Jul 13 10:39 memory.kmem.tcp.usage_in_bytes |
- | depth 16, bits_per_pixel 16, scanline_pad 32 | + | -r--r--r--. |
- | depth 24, bits_per_pixel 32, scanline_pad 32 | + | -rw-rw-r--. |
- | depth 32, bits_per_pixel 32, scanline_pad 32 | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.max_usage_in_bytes |
- | keycode range: | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.memsw.failcnt |
- | focus: | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.memsw.limit_in_bytes |
- | number of extensions: 27 | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.memsw.max_usage_in_bytes |
- | BIG-REQUESTS | + | -r--r--r--. 1 root root 0 Jul 13 10:39 memory.memsw.usage_in_bytes |
- | Composite | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.move_charge_at_immigrate |
- | DAMAGE | + | -r--r--r--. 1 root root 0 Jul 13 10:39 memory.numa_stat |
- | DOUBLE-BUFFER | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.oom_control |
- | | + | ----------. 1 root root 0 Jul 13 10:39 memory.pressure_level |
- | DRI2 | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.soft_limit_in_bytes |
- | GLX | + | -r--r--r--. 1 root root 0 Jul 13 10:39 memory.stat |
- | | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.swappiness |
- | MIT-SCREEN-SAVER | + | -r--r--r--. 1 root root 0 Jul 13 10:39 memory.usage_in_bytes |
- | MIT-SHM | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.use_hierarchy |
- | | + | -rw-rw-r--. 1 root root 0 Jul 13 10:39 notify_on_release |
- | RANDR | + | -rw-rw-r--. |
- | RECORD | + | </ |
- | RENDER | + | |
- | SGI-GLX | + | |
- | SHAPE | + | |
- | | + | |
- | X-Resource | + | |
- | XC-MISC | + | |
- | | + | |
- | XFree86-DGA | + | |
- | | + | |
- | XINERAMA | + | |
- | | + | |
- | XKEYBOARD | + | |
- | XTEST | + | |
- | XVideo | + | |
- | default screen number: 0 | + | |
- | number of screens: 1 | + | |
- | screen #0: | + | Il n' |
- | | + | |
- | | + | < |
- | | + | [root@centos8 ~]# echo 40000000 > / |
- | | + | |
- | depth of root window: | + | |
- | 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: | + | |
- | ... | + | |
</ | </ | ||
- | Les options de la commande | + | ==La Commande cgexec== |
+ | |||
+ | Cette commande | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | usage: | + | [1] 37670 |
- | -display displayname server to query | + | |
- | -version print program version and exit | + | [root@centos8 ~]# hello world |
- | -queryExtensions print info returned by XQueryExtension | + | [Entrée] |
- | -ext all print detailed info for all supported extensions | + | |
- | -ext extension-name print detailed info for extension-name if one of: | + | [root@centos8 ~]# |
- | | + | |
- | | + | |
- | | + | |
</ | </ | ||
- | =====L' | + | ==La Commande cgdelete== |
- | L' | + | Une fois le script terminé, cette commande permet de supprimer le cgroup : |
- | ====Le Clavier et la Souris==== | + | < |
+ | [root@centos8 ~]# ps aux | grep *.sh | ||
+ | root | ||
+ | root | ||
- | Historiquement, | + | [root@centos8 ~]# kill 37670 |
- | ^ Paramètre ^ Description ^ | + | root@centos8 ~]# ps aux | grep *.sh |
- | | Sticky Keys | Permet de maintenir les touches < | + | root |
- | | Mouse Keys | Permet d' | + | [1]+ Terminated |
- | | 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@centos8 ~]# cgdelete memory: |
- | Un clavier visuel ou //Onscreen Keyboard// est un clavier qui est afficher à l'écran. Les touches sont activées en utilisant la souris. | + | [root@centos8 ~]# ls -l /sys/fs/cgroup/memory/ |
+ | ls: cannot access | ||
+ | </ | ||
- | Un exemple connu du clavier visuel est **[[http://library.gnome.org/ | + | ==Le Fichier |
- | ====L'Ecran==== | + | Afin de les rendre persistants, |
- | En ce qui concerne la visibilité de l' | + | < |
+ | [root@centos8 ~]# vi / | ||
+ | [root@centos8 ~]# cat / | ||
+ | # | ||
+ | # Copyright IBM Corporation. 2007 | ||
+ | # | ||
+ | # Authors: | ||
+ | # This program is free software; you can redistribute it and/or modify it | ||
+ | # under the terms of version 2.1 of the GNU Lesser General Public License | ||
+ | # as published by the Free Software Foundation. | ||
+ | # | ||
+ | # This program is distributed in the hope that it would be useful, but | ||
+ | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
+ | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
+ | # | ||
+ | # | ||
+ | # By default, we expect systemd mounts everything on boot, | ||
+ | # so there is not much to do. | ||
+ | # See man cgconfig.conf for further details, how to create groups | ||
+ | # on system boot using this file. | ||
+ | group helloworld2 { | ||
+ | cpu { | ||
+ | cpu.shares = 100; | ||
+ | } | ||
+ | memory { | ||
+ | memory.limit_in_bytes = 40000; | ||
+ | } | ||
+ | } | ||
+ | </ | ||
- | Il existe aussi des loupes telles | + | <WRAP center round important 60%> |
+ | **Important** - Notez la création de **deux** limitations, | ||
+ | </ | ||
- | ====Autres Technologies==== | + | Créez donc les deux CGroups concernés : |
- | Il existe aussi des logiciels de synthèse vocal tels **[[http://live.gnome.org/Orca|Orca]]** et **[[http://emacspeak.sourceforge.net|Emacspeak]]** ainsi que des moniteurs Braille qui utilisent | + | < |
+ | [root@centos8 ~]# cgcreate -g memory:helloworld2 | ||
+ | [root@centos8 ~]# ls -l /sys/fs/ | ||
+ | total 0 | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 cgroup.clone_children | ||
+ | --w--w----. 1 root root 0 Jul 13 10:46 cgroup.event_control | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 cgroup.procs | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.failcnt | ||
+ | --w--w----. 1 root root 0 Jul 13 10:46 memory.force_empty | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.kmem.failcnt | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.kmem.limit_in_bytes | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.kmem.max_usage_in_bytes | ||
+ | -r--r--r--. 1 root root 0 Jul 13 10:46 memory.kmem.slabinfo | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.kmem.tcp.failcnt | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.kmem.tcp.limit_in_bytes | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.kmem.tcp.max_usage_in_bytes | ||
+ | -r--r--r--. 1 root root 0 Jul 13 10:46 memory.kmem.tcp.usage_in_bytes | ||
+ | -r--r--r--. 1 root root 0 Jul 13 10:46 memory.kmem.usage_in_bytes | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.limit_in_bytes | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.max_usage_in_bytes | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.memsw.failcnt | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.memsw.limit_in_bytes | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.memsw.max_usage_in_bytes | ||
+ | -r--r--r--. 1 root root 0 Jul 13 10:46 memory.memsw.usage_in_bytes | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.move_charge_at_immigrate | ||
+ | -r--r--r--. 1 root root 0 Jul 13 10:46 memory.numa_stat | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.oom_control | ||
+ | ----------. 1 root root 0 Jul 13 10:46 memory.pressure_level | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.soft_limit_in_bytes | ||
+ | -r--r--r--. 1 root root 0 Jul 13 10:46 memory.stat | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.swappiness | ||
+ | -r--r--r--. 1 root root 0 Jul 13 10:46 memory.usage_in_bytes | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.use_hierarchy | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 notify_on_release | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:46 tasks | ||
+ | </code> | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cgcreate -g cpu: | ||
+ | [root@centos8 ~]# ls -l / | ||
+ | total 0 | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:47 cgroup.clone_children | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:47 cgroup.procs | ||
+ | -r--r--r--. 1 root root 0 Jul 13 10:47 cpuacct.stat | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:47 cpuacct.usage | ||
+ | -r--r--r--. 1 root root 0 Jul 13 10:47 cpuacct.usage_all | ||
+ | -r--r--r--. 1 root root 0 Jul 13 10:47 cpuacct.usage_percpu | ||
+ | -r--r--r--. 1 root root 0 Jul 13 10:47 cpuacct.usage_percpu_sys | ||
+ | -r--r--r--. 1 root root 0 Jul 13 10:47 cpuacct.usage_percpu_user | ||
+ | -r--r--r--. 1 root root 0 Jul 13 10:47 cpuacct.usage_sys | ||
+ | -r--r--r--. 1 root root 0 Jul 13 10:47 cpuacct.usage_user | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:47 cpu.cfs_period_us | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:47 cpu.cfs_quota_us | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:47 cpu.rt_period_us | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:47 cpu.rt_runtime_us | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:47 cpu.shares | ||
+ | -r--r--r--. 1 root root 0 Jul 13 10:47 cpu.stat | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:47 notify_on_release | ||
+ | -rw-rw-r--. 1 root root 0 Jul 13 10:47 tasks | ||
+ | </ | ||
+ | |||
+ | ==La Commande cgconfigparser== | ||
+ | |||
+ | Appliquez le contenu du fichier | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cgconfigparser -l /etc/cgconfig.conf | ||
+ | [root@centos8 ~]# cat /sys/fs/ | ||
+ | 36864 | ||
+ | [root@centos8 ~]# cat / | ||
+ | 100 | ||
+ | </ | ||
----- | ----- | ||
- | < | + | Copyright © 2024 Hugh Norris. |
- | <div align=" | + | |
- | Copyright © 2020 Hugh Norris. | + | |
- | </ | + |