Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
elearning:workbooks:centos:8:avance:l112 [2024/10/01 07:43] – created adminelearning:workbooks:centos:8:avance:l112 [2024/10/01 08:07] (Version actuelle) admin
Ligne 5: Ligne 5:
 Dernière mise-à-jour : ~~LASTMOD~~ Dernière mise-à-jour : ~~LASTMOD~~
  
-======LCF604 - Gestion du Réseau======+======LCF604 - Gestion des Paramètres du matériel et les Ressources====== 
 + 
 +<code> 
 +[root@centos8 ~]# sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* 
 +[root@centos8 ~]# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* 
 +</code>
  
 =====Contenu du Module===== =====Contenu du Module=====
  
-  * **LCF604 - Gestion du Réseau**+  * **LCF604 - Gestion des Paramètres et les Ressources du Matériel**
     * Contenu du Module     * Contenu du Module
-    * Présentation +    * Présentation des Fichiers Spéciaux  
-      * La Commande nmcli +    * LAB #1 - Découvrir le Matériel 
-    * LAB #1 - Configuration du Réseau +      * 1.1 - La Commande lspci 
-      * 1.1 - Connections et Profils +      * 1.2 - La Commande lsusb 
-      * 1.2 - Résolution des Noms  +      * 1.3 - La Commande lsblk 
-      * 1.3 - Ajouter une Deuxième Adresse IP à un Profil +      * 1.4 - La Commande lsscsi 
-      * 1.4 - La Commande hostname +      * 1.5 - La Commande lscpu 
-      * 1.5 - La Commande ip +      * 1.6 - La Commande lshw 
-      * 1.6 - Activer/Désactiver une Interface Manuellement +      * 1.7 - La Commande dmidecode 
-      * 1.7 - Routage Statique +      1.8 - La Commande smartctl 
-        * La commande ip +      1.9 - Les Commandes accton et dump-acct 
-        Activer/désactiver le routage sur le serveur +      * 1.10 - La Commande lastcomm 
-    * LAB #2 - Diagnostique du Réseau +      * 1.11 - La Commande sa 
-      * 2.1 - ping +      * 1.12 - La Commande ac 
-      2.2 - netstat -i +    * LAB #2 - La Commande sysctl 
-      * 2.traceroute +      * 2.1 - Répertoire /proc 
-    * LAB #3 - Connexions à Distance +        Fichiers 
-      * 3.1 - Telnet +          * Processeur 
-      * 3.2 - wget +          * Interruptions système 
-      * 3.3 - ftp +          * Canaux DMA 
-      * 3.4 - SSH +          * Plages d'entrée/sortie 
-        Présentation +          * Périphériques 
-          SSH-1 +          * Modules 
-          SSH-2 +          * Statistiques de l'utilisation des disques 
-        Authentification par mot de passe +          * Partitions 
-        Authentification par clef asymétrique +          * Espaces de pagination 
-        Configuration du Serveur +          * Statistiques d'utilisation du processeur 
-        Configuration du Client +          * Statistiques d'utilisation de la mémoire 
-        Tunnels SSH +          * Version du noyau 
-      * 3.SCP +        * Répertoires 
-        * Présentation +          * ide/scsi 
-        * Utilisation +          * acpi 
-      3.6 - Mise en Place des Clefs Asymétriques +          * bus 
- +          * net 
-=====Présentation=====+          * sys 
 +      * 2.Utilisation de la Commande sysctl        
 +    * 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 udevadm 
 +    Système de fichiers /sys 
 +    LAB #4 - Limiter les Ressources 
 +      * 4.ulimit 
 +      * 4.2 - Groupes de Contrôle 
 +        * La Limitation de la Mémoire 
 +        * La Commande cgcreate 
 +        La Commande cgdelete 
 +        * Le Fichier /etc/cgconfig.conf 
 +        * La Commande cgconfigparser
  
-RHEL/CentOS 8 utilise **Network Manager** pour gérer le réseau. Network Manager est composé de deux éléments :+=====Présentation des Fichiers Spéciaux=====
  
-  * un service qui gère les connexions réseaux et rapporte leurs états, +Dans l'ordinateur les périphériques sont reliés à un **contrôleur** qui communique avec le processeur à l'aide d'un **bus**. Le contrôleur ainsi que les périphériques nécessitent des pilotes. Sous Linuxles pilotes sont généralement fournis sous la forme d'un **module**. Chaque périphérique est représenté par un **fichier spécial** dans le répertoire **/dev** et c'est dans ce fichier que le système trouve les informations nécessaires pour s'adresser au pilote.
-  des front-ends qui passent par un API de configuration du service.+
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** : Notez qu'avec cette version de NetworkManager, IPv6 est activée par défaut.+**Important** : Les périphériques qui nécessitent à ce que l'ordinateur soit éteint afin des les brancher/débrancher sont appelés communément **Cold Plug Devices**. Les périphériques qui peuvent être brancher/débrancher à chaud sont appelés des **Hot Plug Devices**.
 </WRAP> </WRAP>
  
-Le service NetworkManager doit toujours être lancé :+Consultez le contenu du répertoire /dev :
  
 <code> <code>
-[root@centos8 ~]# systemctl status NetworkManager.service +[root@centos8 ~]# ls -l /dev | more 
-● NetworkManager.service Network Manager +total 0 
-   Loadedloaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor pr+crw-r--r-- 1 root root     10, 235 Jun 28 02:04 autofs 
-   Activeactive (running) since Thu 2021-07-22 05:05:29 EDT; months 7 days ago +drwxr-xr-x 2 root root         180 Jun 28 02:04 block 
-     Docsman:NetworkManager(8) +drwxr-xr-x.  2 root root         100 Jun 28 02:04 bsg 
- Main PID1002 (NetworkManager) +drwxr-xr-x.  3 root root          60 Jun 28 02:04 bus 
-    Tasks: 3 (limit23535) +lrwxrwxrwx 1 root root           3 Jun 28 02:04 cdrom -sr0 
-   Memory6.8M +drwxr-xr-x.  2 root root        2940 Jun 28 02:04 char 
-   CGroup/system.slice/NetworkManager.service +drwxr-xr-x.  2 root root          80 Jun 28 02:04 cl_centos8 
-           └─1002 /usr/sbin/NetworkManager --no-daemon+crw-------.  1 root root      5,   1 Jun 28 02:04 console 
 +lrwxrwxrwx.  root root          11 Jun 28 02:04 core -> /proc/kcore 
 +drwxr-xr-x. 10 root root         200 Jun 28 02:04 cpu 
 +crw-------.  1 root root     10,  62 Jun 28 02:04 cpu_dma_latency 
 +drwxr-xr-x.  6 root root         120 Jun 28 02:04 disk 
 +brw-rw----.  1 root disk    253,   0 Jun 28 02:04 dm-0 
 +brw-rw----.  1 root disk    253,   1 Jun 28 02:04 dm-1 
 +drwxr-xr-x.  root root          80 Jun 28 02:04 dri 
 +crw-rw----.  1 root video    29,   0 Jun 28 02:04 fb0 
 +lrwxrwxrwx 1 root root          13 Jun 28 02:04 fd -> /proc/self/fd 
 +crw-rw-rw-.  1 root root      1,   7 Jun 28 02:04 full 
 +crw-rw-rw- 1 root root     10, 229 Jun 28 02:04 fuse 
 +crw------- 1 root root    245,   0 Jun 28 02:04 hidraw0 
 +crw-------.  1 root root     10, 228 Jun 28 02:04 hpet 
 +drwxr-xr-x.  3 root root           0 Jun 28 02:04 hugepages 
 +crw-------.  1 root root     10, 183 Jun 28 02:04 hwrng 
 +lrwxrwxrwx.  1 root root          12 Jun 28 02:04 initctl -> /run/initctl 
 +drwxr-xr-x.  4 root root         280 Jun 28 02:04 input 
 +crw-r--r--.  1 root root      1,  11 Jun 28 02:04 kmsg 
 +lrwxrwxrwx.  1 root root          28 Jun 28 02:04 log -> /run/systemd/journal/dev-log 
 +crw-rw----.  1 root disk     10, 237 Jun 28 02:04 loop-control 
 +crw-rw----.  1 root lp        6,   0 Jun 28 02:04 lp0 
 +crw-rw----.  1 root lp        6,   1 Jun 28 02:04 lp1 
 +crw-rw----.  1 root lp        6,   2 Jun 28 02:04 lp2 
 +crw-rw----.  1 root lp        6,   3 Jun 28 02:04 lp3 
 +drwxr-xr-x.  2 root root         100 Jun 28 02:04 mapper 
 +crw-------.  1 root root     10, 227 Jun 28 02:04 mcelog 
 +crw-r-----.  1 root kmem      1,   1 Jun 28 02:04 mem 
 +drwxrwxrwt.  2 root root          40 Jun 28 02:04 mqueue 
 +drwxr-xr-x.  2 root root          60 Jun 28 02:04 net 
 +crw-rw-rw-.  1 root root      1,   3 Jun 28 02:04 null 
 +--More-- 
 +</code>
  
-Warning: Journal has been rotated since unit was startedLog output is incomplete or+On peut noter dans la sortie de la commande que certains fichiers sont de type **bloc** (**b**), tandis que d'autre sont de type **caractère** (**c**) 
-lines 1-11/11 (END) + 
-[^q]+<code
 +... 
 +brw-rw----.  root disk      8,   1 Jun 28 02:04 sda1 
 +... 
 +crw-rw-rw-.  1 root tty       5,   0 Jun 28 02:04 tty 
 +...
 </code> </code>
  
-===La Commande nmcli===+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'échange de données se fait octet par octet sans utiliser des tampons.
  
-La commande **nmcli** (Network Manager Command Line Interface) est utilisée pour configurer NetworkManager.+Les deux informations clefs du fichier spécial sont situées à la place de la taille d'un fichier normal et se nomment le **majeur** et le **mineur** :
  
-Les options et les sous-commandes peuvent être consultées en utilisant les commandes suivantes :+  * le **majeur** identifie le pilote du périphérique et donc son contrôleur, 
 +  * le **mineur** identifie le périphérique ou une particularité du périphérique telle une partition d'un disque.
  
-<code> +=====LAB #1 - Découvrir le Matériel=====
-[root@centos8 ~]nmcli help +
-Usage: nmcli [OPTIONS] OBJECT { COMMAND | help }+
  
-OPTIONS +====1.La Commande lspci====
-  -a, --ask                                ask for missing parameters +
-  -c, --colors auto|yes|no                 whether to use colors in output +
-  -e, --escape yes|no                      escape columns separators in values +
-  -f, --fields <field,...>|all|common      specify fields to output +
-  -g, --get-values <field,...>|all|common  shortcut for -m tabular -t -f +
-  -h, --help                               print this help +
-  -m, --mode tabular|multiline             output mode +
-  -o, --overview                           overview mode +
-  -p, --pretty                             pretty output +
-  -s, --show-secrets                       allow displaying passwords +
-  -t, --terse                              terse output +
-  -v, --version                            show program version +
-  -w, --wait <seconds>                     set timeout waiting for finishing operations+
  
-OBJECT +Cette commande vous renseigne sur les adaptateurs reliés aux bus PCI, AGP et PCI express : 
-  g[eneral      NetworkManager's general status and operations + 
-  n[etworking   overall networking control +<code> 
-  r[adio        NetworkManager radio switches +[root@centos8 ~]# lspci 
-  c[onnection   NetworkManager's connections +00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma(rev 02) 
-  d[evice       devices managed by NetworkManager +00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II
-  a[gent        NetworkManager secret agent or polkit agent +00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II
-  m[onitor      monitor NetworkManager changes+00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II(rev 01) 
 +00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03) 
 +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/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode(rev 02) 
 +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> </code>
  
-=====LAB #1 Configuration du Réseau=====+Pour obtenir de l'information sur un adaptateur spécifique, il convient d'utiliser la même commande avec l'option **-v** en spécifiant l'identifiant concerné :
  
-====1.Connections et Profils====+<code> 
 +[root@centos8 ~]# lspci -v -s 00:03.
 +00:03.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon 
 +        Subsystem: Red Hat, Inc. Device 0005 
 +        Physical Slot: 3 
 +        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: [84] Vendor Specific Information: VirtIO: <unknown> 
 +        Capabilities: [70] Vendor Specific Information: VirtIO: Notify 
 +        Capabilities: [60] Vendor Specific Information: VirtIO: DeviceCfg 
 +        Capabilities: [50] Vendor Specific Information: VirtIO: ISR 
 +        Capabilities: [40] Vendor Specific Information: VirtIO: CommonCfg 
 +        Kernel driver in use: virtio-pci 
 +</code>
  
-NetworkManager inclus la notion de **connections** ou **profils** permettant des configurations différentes en fonction de la localisation. Pour voir les connections actuelles, utilisez la commande **nmcli c** avec la sous-commande **show** :+ou :
  
 <code> <code>
-[root@centos8 ~]# nmcli c show +[root@centos8 ~]# lspci -vv -s 00:03.0 
-NAME    UUID                                  TYPE      DEVICE  +00:03.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon 
-ens18   fc4a4d23-b15e-47a7-bcfa-b2e08f49553e  ethernet  ens18   +        Subsystem: Red Hat, Inc. Device 0005 
-virbr0  03f6c432-2a09-47e7-9693-208431a572ee  bridge    virbr0 +        Physical Slot: 3 
 +        Control: I/O+ Mem+ BusMaster+ SpecCycleMemWINVVGASnoopParErr- Stepping- SERR+ FastB2B- DisINTx
 +        Status: Cap+ 66MHzUDFFastB2BParErr- 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: VirtIO: <unknown> 
 +                BAR=0 offset=00000000 size=00000000 
 +        Capabilities: [70] Vendor Specific Information: VirtIO: Notify 
 +                BAR=4 offset=00003000 size=00001000 multiplier=00000004 
 +        Capabilities: [60] Vendor Specific Information: VirtIO: DeviceCfg 
 +                BAR=4 offset=00002000 size=00001000 
 +        Capabilities: [50] Vendor Specific Information: VirtIO: ISR 
 +                BAR=4 offset=00001000 size=00001000 
 +        Capabilities: [40] Vendor Specific Information: VirtIO: CommonCfg 
 +                BAR=4 offset=00000000 size=00001000 
 +        Kernel driver in use: virtio-pci
 </code> </code>
  
-Créez donc un profil IP fixe rattaché au périphérique **ens18** :+===Options de la commande=== 
 + 
 +Les options de cette commande sont :
  
 <code> <code>
-[root@centos8 ~]# nmcli connection add con-name ip_fixe ifname ens18 type ethernet ip4 10.0.2.46/24 gw4 10.0.2.1 +[root@centos8 ~]# lspci --help 
-Connection 'ip_fixe' (0f48c74d-5d16-4c37-8220-24644507b589successfully added.+lspci: invalid option -- '-' 
 +Usage: lspci [<switches>
 + 
 +Basic display modes: 
 +-mm             Produce machine-readable output (single -m for an obsolete format) 
 +-t              Show bus tree 
 + 
 +Display options: 
 +-v              Be verbose (-vv or -vvv for higher verbosity) 
 +-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             Display bus path in addition to bus and device number 
 + 
 +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 
 + 
 +Selection of devices: 
 +-s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]]   Show only devices in selected slots 
 +-d [<vendor>]:[<device>][:<class>             Show only devices with specified ID's 
 + 
 +Other options: 
 +-i <file>       Use specified ID database instead of /usr/share/hwdata/pci.ids 
 +-p <file>       Look up kernel modules in a given file instead of default modules.pcimap 
 +-M              Enable `bus 
 </code> </code>
  
-Constatez sa présence :+====1.2 - La Commande lsusb==== 
 + 
 +Cette commande vous renseigne sur les adaptateurs reliés au bus usb :
  
 <code> <code>
-[root@centos8 ~]# nmcli c show +[root@centos8 ~]# lsusb 
-NAME     UUID                                  TYPE      DEVICE  +Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd  
-ens18    fc4a4d23-b15e-47a7-bcfa-b2e08f49553e  ethernet  ens18   +Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub 
-virbr0   03f6c432-2a09-47e7-9693-208431a572ee  bridge    virbr0  + 
-ip_fixe  0f48c74d-5d16-4c37-8220-24644507b589  ethernet  --   +[root@centos8 ~]# lsusb -vt 
 +/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M 
 +    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
 </code> </code>
  
-Notez que la sortie n'indique pas que le profil **ip_fixe** soit associé au periphérique **ens18** car le profil **ip_fixe** n'est pas activé :+===Options de la commande=== 
 + 
 +Les options de cette commande sont :
  
 <code> <code>
-[root@centos8 ~]# nmcli d show +[root@centos8 ~]# lsusb --help 
-GENERAL.DEVICE                        ens18 +Usagelsusb [options]... 
-GENERAL.TYPE:                           ethernet +List USB devices 
-GENERAL.HWADDR:                         4E:B1:31:BD:5D:B2 +  -v, --verbose 
-GENERAL.MTU:                            1500 +      Increase verbosity (show descriptors
-GENERAL.STATE:                          100 (connected+  -s [[bus]:][devnum] 
-GENERAL.CONNECTION                    ens18 +      Show only devices with specified device and/or 
-GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnect> +      bus numbers (in decimal) 
-WIRED-PROPERTIES.CARRIER              on +  -d vendor:[product
-IP4.ADDRESS[1]:                         10.0.2.45/24 +      Show only devices with the specified vendor and 
-IP4.GATEWAY:                            10.0.2.1 +      product ID numbers (in hexadecimal) 
-IP4.ROUTE[1]:                           dst = 10.0.2.0/24, nh = 0.0.0.0, mt = 100 + .LAB#
-IP4.ROUTE[2]:                           dst = 0.0.0.0/0, nh = 10.0.2.1, mt = 100 +  -D device 
-IP4.DNS[1]:                             8.8.8.8 +      Selects which device lsusb will examine 
-IP6.ADDRESS[1]:                         fe80::86b6:8d39:cab2:d84d/64 +  -t, --tree 
-IP6.GATEWAY:                            -- +      Dump the physical USB device hierarchy as a tree 
-IP6.ROUTE[1]:                           dst = fe80::/64nh = ::mt = 100 +  -V--version 
-IP6.ROUTE[2]:                           dst = ff00::/8, nh = ::, mt = 256, table=255+      Show version of program 
 +  -h--help 
 +      Show usage and help 
 +</code>
  
-GENERAL.DEVICE:                         virbr0 +====1.La Commande lsblk====
-GENERAL.TYPE:                           bridge +
-GENERAL.HWADDR:                         52:54:00:79:02:66 +
-GENERAL.MTU:                            1500 +
-GENERAL.STATE:                          100 (connected (externally)) +
-GENERAL.CONNECTION:                     virbr0 +
-GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnect> +
-IP4.ADDRESS[1]:                         192.168.122.1/24 +
-IP4.GATEWAY:                            -+
-IP4.ROUTE[1]:                           dst 192.168.122.0/24, nh 0.0.0.0, mt +
-IP6.GATEWAY:                            --+
  
-GENERAL.DEVICE                        lo +Cette commande vous rensigne sur les partitions des disques :
-GENERAL.TYPE:                           loopback +
-GENERAL.HWADDR:                         00:00:00:00:00:00 +
-GENERAL.MTU:                            65536 +
-GENERAL.STATE:                          10 (unmanaged) +
-GENERAL.CONNECTION:                     -- +
-GENERAL.CON-PATH:                       -- +
-IP4.ADDRESS[1]:                         127.0.0.1/+
-IP4.GATEWAY:                            -- +
-IP6.ADDRESS[1]:                         ::1/128 +
-IP6.GATEWAY:                            -- +
-IP6.ROUTE[1]:                           dst = ::1/128, nh = ::, mt = 256+
  
-GENERAL.DEVICE                        virbr0-nic +<code> 
-GENERAL.TYPE                          tun +[root@centos8 ~]# lsblk 
-GENERAL.HWADDR                        52:54:00:79:02:66 +NAME                MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT 
-GENERAL.MTU                           1500 +sda                   8:   0   32G  0 disk  
-GENERAL.STATE                         10 (unmanaged) +├─sda1                8:1    0    1G  0 part /boot 
-GENERAL.CONNECTION                    -- +└─sda2                8:2    0   31G  0 part  
-GENERAL.CON-PATH                      -- +  ├─cl_centos8-root 253:0    0 27.8G  0 lvm  / 
-lines 28-50/50 (END) +  └─cl_centos8-swap 253:1    0  3.2G  0 lvm  [SWAP] 
-[q]+sdb                   8:16      4G  0 disk  
 +sdc                   8:32     64G  0 disk  
 +└─sdc1                8:33     64G  0 part /home 
 +sdd                   8:48     32G  0 disk  
 +sr0                  11:0    1 1024M  0 rom  
 + 
 +[root@centos8 ~]# lsblk -l 
 +NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT 
 +sda               8:0    0   32G  0 disk  
 +sda1              8:1    0    1G  0 part /boot 
 +sda2              8:2    0   31G  0 part  
 +sdb               8:16      4G  0 disk  
 +sdc               8:32     64G  0 disk  
 +sdc1              8:33     64G  0 part /home 
 +sdd               8:48     32G  0 disk  
 +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]
 </code> </code>
  
-Pour activer le profil ip_fixe, utilisez la commande suivante :+===Options de la commande=== 
 + 
 +Les options de cette commande sont :
  
 <code> <code>
-[root@centos8 ~]# nmcli connection up ip_fixe+[root@centos8 ~]# lsblk --help
  
 +Usage:
 + lsblk [options] [<device> ...]
 +
 +List information about block devices.
 +
 +Options:
 + -a, --all            print all devices
 + -b, --bytes          print SIZE in bytes rather than in human readable format
 + -d, --nodeps         don't print slaves or holders
 + -D, --discard        print discard capabilities
 + -z, --zoned          print zone model
 + -e, --exclude <list> exclude devices by major number (default: RAM disks)
 + -f, --fs             output info about filesystems
 + -i, --ascii          use ascii characters only
 + -I, --include <list> show only devices with specified major numbers
 + -J, --json           use JSON output format
 + -l, --list           use list format output
 + -T, --tree           use tree format output
 + -m, --perms          output info about permissions
 + -n, --noheadings     don't print headings
 + -o, --output <list>  output columns
 + -O, --output-all     output all columns
 + -p, --paths          print complete device path
 + -P, --pairs          use key="value" output format
 + -r, --raw            use raw output format
 + -s, --inverse        inverse dependencies
 + -S, --scsi           output info about SCSI devices
 + -t, --topology       output info about topology
 + -x, --sort <column>  sort output by <column>
 +
 + -h, --help           display this help
 + -V, --version        display version
 +
 +Available output columns:
 +        NAME  device name
 +       KNAME  internal kernel device name
 +     MAJ:MIN  major:minor device number
 +      FSTYPE  filesystem type
 +  MOUNTPOINT  where the device is mounted
 +       LABEL  filesystem LABEL
 +        UUID  filesystem UUID
 +    PARTTYPE  partition type UUID
 +   PARTLABEL  partition LABEL
 +    PARTUUID  partition UUID
 +   PARTFLAGS  partition flags
 +          RA  read-ahead of the device
 +          RO  read-only device
 +          RM  removable device
 +     HOTPLUG  removable or hotplug device (usb, pcmcia, ...)
 +       MODEL  device identifier
 +      SERIAL  disk serial number
 +        SIZE  size of the device
 +       STATE  state of the device
 +       OWNER  user name
 +       GROUP  group name
 +        MODE  device node permissions
 +   ALIGNMENT  alignment offset
 +      MIN-IO  minimum I/O size
 +      OPT-IO  optimal I/O size
 +     PHY-SEC  physical sector size
 +     LOG-SEC  logical sector size
 +        ROTA  rotational device
 +       SCHED  I/O scheduler name
 +     RQ-SIZE  request queue size
 +        TYPE  device type
 +    DISC-ALN  discard alignment offset
 +   DISC-GRAN  discard granularity
 +    DISC-MAX  discard max bytes
 +   DISC-ZERO  discard zeroes data
 +       WSAME  write same max bytes
 +         WWN  unique storage identifier
 +        RAND  adds randomness
 +      PKNAME  internal parent kernel device name
 +        HCTL  Host:Channel:Target:Lun for SCSI
 +        TRAN  device transport type
 +  SUBSYSTEMS  de-duplicated chain of subsystems
 +         REV  device revision
 +      VENDOR  device vendor
 +       ZONED  zone model
 +
 +For more details see lsblk(8).
 </code> </code>
  
-Notez que votre terminal est bloqué à cause du changement de l'adresse IP+====1.4 - La Commande lsscsi====
  
-<WRAP center round todo 60%> +Cette commmande vous renseigne sur les périphériques SCSI et NVMe :
-**A faire** - Revenez à l'accueil du cloud IT Training et re-connectez-vous à la VM en tant que trainee en utilisant la connexion **CentOS8_SSH_10.0.2.46**. +
-</WRAP>+
  
-Le profil ip_fixe est maintenant activé tandis que le profil enp0s3 a été désactivé :+<code> 
 +[root@centos8 ~]# lsscsi 
 +[1:0:0:0]    cd/dvd  QEMU     QEMU DVD-ROM     2.5+  /dev/sr0  
 +[2:0:0:0]    disk    ATA      QEMU HARDDISK    2.5+  /dev/sda  
 +[3:0:0:0]    disk    ATA      QEMU HARDDISK    2.5+  /dev/sdb  
 +[4:0:0:0]    disk    ATA      QEMU HARDDISK    2.5+  /dev/sdc  
 +[5:0:0:0]    disk    ATA      QEMU HARDDISK    2.5+  /dev/sdd  
 +</code> 
 + 
 +===Options de la commande=== 
 + 
 +Les options de cette commande sont :
  
 <code> <code>
-[root@centos8 ~]# nmcli c show +[root@centos8 ~]# man lsscsi  
-NAME     UUID                                  TYPE      DEVICE  +[root@centos8 ~]# lsscsi --help 
-ip_fixe  0f48c74d-5d16-4c37-8220-24644507b589  ethernet  ens18   +Usage: lsscsi   [--brief] [--classic] [--controllers] [--device] [--generic] 
-virbr0   03f6c432-2a09-47e7-9693-208431a572ee  bridge    virbr0  +                [--help] [--hosts] [--kname] [--list] [--long] [--long-unit] 
-ens18    fc4a4d23-b15e-47a7-bcfa-b2e08f49553e  ethernet  --   +                [--lunhex] [--no-nvme] [--pdt] [--protection] [--prot-mode] 
-    +                [--scsi_id] [--size] [--sz-lbs] [--sysfsroot=PATH] [--transport
-[root@centos8 ~]# nmcli d show +                [--unit] [--verbose] [--version] [--wwn]  [<h:c:t:l>] 
-GENERAL.DEVICE                        ens18 +  where
-GENERAL.TYPE                          ethernet +    --brief|-b        tuple and device name only 
-GENERAL.HWADDR                        4E:B1:31:BD:5D:B2 +    --classic|-c      alternate output similar to 'cat /proc/scsi/scsi' 
-GENERAL.MTU                           1500 +    --controllers|-C   synonym for --hosts since NVMe controllers treated 
-GENERAL.STATE:                          100 (connected) +                       like SCSI hosts 
-GENERAL.CONNECTION:                     ip_fixe +    --device|-d       show device node's major + minor numbers 
-GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnect> +    --generic|-g      show scsi generic device name 
-WIRED-PROPERTIES.CARRIER:               on +    --help|-h         this usage information 
-IP4.ADDRESS[1]:                         10.0.2.46/24 +    --hosts|-H        lists scsi hosts rather than scsi devices 
-IP4.GATEWAY:                            10.0.2.1 +    --kname|-k        show kernel name instead of device node name 
-IP4.ROUTE[1]:                           dst = 10.0.2.0/24nh = 0.0.0.0, mt = 100 +    --list|-L         additional information output one 
-IP4.ROUTE[2]:                           dst 0.0.0.0/0nh = 10.0.2.1mt = 100 +                      attribute=value per line 
-IP6.ADDRESS[1]                        fe80::5223:aee1:998e:9f27/64 +    --long|-l         additional information output 
-IP6.GATEWAY                           -- +    --long-unit|-U    print LU name in full, use twice to prefix with 
-IP6.ROUTE[1]                          dst = fe80::/64, nh = ::, mt = 100 +                      '.naa', 'eui.', 'uuid.' or 't10.
-IP6.ROUTE[2]                          dst = ff00::/8, nh = ::, mt = 256, table=255+    --lunhex|-x       show LUN part of tuple as hex number in T10 format; 
 +                      use twice to get full 16 digit hexadecimal LUN 
 +    --no-nvme|-N      exclude NVMe devices from output 
 +    --pdt|-D          show the peripheral device type in hex 
 +    --protection|-p   show target and initiator protection information 
 +    --protmode|-P     show negotiated protection information mode 
 +    --scsi_id|-i      show udev derived /dev/disk/by-id/scsi* entry 
 +    --size|-s         show disk size, (once for decimal (e.g3 GB), 
 +                      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       show size as a number of logical blocks; if used twice 
 +                      adds comma followed by logical block size in bytes 
 +    --transport|-t    transport information for target orif '--hosts' 
 +                      givenfor initiator 
 +    --unit|-u         logical unit (LU) name (aka WWN for ATA/SATA) 
 +    --verbose|-v      output path names where data is found 
 +    --version|-V      output version string and exit 
 +    --wwn|-w          output WWN for disks (from /dev/disk/by-id/wwn*) 
 +    <h:c:t:l>         filter output list (def'*:*:*:*' (all))Meaning
 +                      <host_num:controller:target:lun> or for NVMe
 +                      <'N':ctl_num:cntlid:namespace_id>
  
-GENERAL.DEVICE:                         virbr0 +List SCSI devices or hosts, followed by NVMe namespaces or controllers
-GENERAL.TYPE:                           bridge +Many storage devices (e.gSATA disks and USB attached storage) use SCSI 
-GENERAL.HWADDR:                         52:54:00:79:02:66 +command sets and hence are also listed by this utilityHyphenated long 
-GENERAL.MTU:                            1500 +options can also take underscore (and vice versa). 
-GENERAL.STATE:                          100 (connected (externally)+</code>
-GENERAL.CONNECTION:                     virbr0 +
-GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnect> +
-IP4.ADDRESS[1]:                         192.168.122.1/24 +
-IP4.GATEWAY:                            -- +
-IP4.ROUTE[1]:                           dst = 192.168.122.0/24, nh = 0.0.0.0, mt = 0 +
-IP6.GATEWAY:                            --+
  
-GENERAL.DEVICE:                         lo +====1.La Commande lscpu====
-GENERAL.TYPE:                           loopback +
-GENERAL.HWADDR:                         00:00:00:00:00:00 +
-GENERAL.MTU:                            65536 +
-GENERAL.STATE:                          10 (unmanaged) +
-GENERAL.CONNECTION:                     -- +
-GENERAL.CON-PATH:                       -- +
-IP4.ADDRESS[1]:                         127.0.0.1/8 +
-IP4.GATEWAY:                            -+
-IP6.ADDRESS[1]:                         ::1/128 +
-IP6.GATEWAY:                            -- +
-IP6.ROUTE[1]:                           dst ::1/128, nh ::, mt 256+
  
-GENERAL.DEVICE                        virbr0-nic +Cett commande vous renseigne sur l'architecture des CPUs : 
-GENERAL.TYPE                          tun + 
-GENERAL.HWADDR                        52:54:00:79:02:66 +<code> 
-GENERAL.MTU                           1500 +[root@centos8 ~]# lscpu 
-GENERAL.STATE                         10 (unmanaged) +Architecture:        x86_64 
-GENERAL.CONNECTION                    -- +CPU op-mode(s):      32-bit, 64-bit 
-GENERAL.CON-PATH                      -- +Byte Order         Little Endian 
-lines 27-49/49 (END+CPU(s)             8 
-[q]+On-line CPU(s) list0-7 
 +Thread(s) per core 1 
 +Core(s) per socket 4 
 +Socket(s)          2 
 +NUMA node(s)       1 
 +Vendor ID          GenuineIntel 
 +BIOS Vendor ID     QEMU 
 +CPU family:          6 
 +Model:               158 
 +Model name:          Intel(RXeon(R) CPU E3-1270 v6 @ 3.80GHz 
 +BIOS Model name    pc-i440fx-7.0 
 +Stepping:            9 
 +CPU MHz:             3791.998 
 +BogoMIPS           7583.99 
 +Virtualization:      VT-
 +Hypervisor vendor:   KVM 
 +Virtualization type: full 
 +L1d cache:           32K 
 +L1i cache:           32K 
 +L2 cache:            4096K 
 +L3 cache:            16384K 
 +NUMA node0 CPU(s):   0-7 
 +Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves arat umip md_clear arch_capabilities
 </code> </code>
  
-Pour consulter les paramètres du profil **ens18**, utilisez la commande suivante :+===Options de la commande=== 
 + 
 +Les options de cette commande sont :
  
 <code> <code>
-[root@centos8 ~]# nmcli -p connection show ens18 +[root@centos8 ~]# lscpu --help 
-=============================================================================== + 
-                      Connection profile details (ens18) +Usage
-=============================================================================== + lscpu [options] 
-connection.id                         ens18 + 
-connection.uuid:                        fc4a4d23-b15e-47a7-bcfa-b2e08f49553e +Display information about the CPU architecture
-connection.stable-id:                   -- + 
-connection.type:                        802-3-ethernet +Options
-connection.interface-name:              ens18 + -a, --all               print both online and offline CPUs (default for -e
-connection.autoconnect                yes + -b, --online            print online CPUs only (default for -p
-connection.autoconnect-priority:        0 + -c, --offline           print offline CPUs only 
-connection.autoconnect-retries:         -(default+ -J, --json              use JSON for default or extended format 
-connection.multi-connect:               0 (default+ -e, --extended[=<list>] print out an extended readable format 
-connection.auth-retries:                -+ -p, --parse[=<list>   print out a parsable format 
-connection.timestamp:                   1630224060 + -s, --sysroot <dir>     use specified directory as system root 
-connection.read-only:                   no + -x, --hex               print hexadecimal masks rather than lists of CPUs 
-connection.permissions:                 -- + -y, --physical          print physical instead of logical IDs 
-connection.zone:                        -- + 
-connection.master:                      -- + -h, --help              display this help 
-connection.slave-type:                  -- + -V, --version           display version 
-connection.autoconnect-slaves:          -1 (default+ 
-connection.secondaries:                 -+Available output columns
-connection.gateway-ping-timeout:        0 +           CPU  logical CPU number 
-connection.metered:                     unknown +          CORE  logical core number 
-connection.lldp:                        default +        SOCKET  logical socket number 
-connection.mdns:                        -1 (default+       CLUSTER  logical cluster number 
-connection.llmnr:                       -1 (default) +          NODE  logical NUMA node number 
-connection.wait-device-timeout:         -1 +          BOOK  logical book number 
-------------------------------------------------------------------------------- +        DRAWER  logical drawer number 
-802-3-ethernet.port:                    -- +         CACHE  shows how caches are shared between CPUs 
-802-3-ethernet.speed:                   0 +  POLARIZATION  CPU dispatching mode on virtual hardware 
-802-3-ethernet.duplex:                  -- +       ADDRESS  physical address of a CPU 
-802-3-ethernet.auto-negotiate:          no +    CONFIGURED  shows if the hypervisor has allocated the CPU 
-802-3-ethernet.mac-address:             -- +        ONLINE  shows if Linux currently makes use of the CPU 
-802-3-ethernet.cloned-mac-address:      -- +        MAXMHZ  shows the maximum MHz of the CPU 
-802-3-ethernet.generate-mac-address-mask:-- +        MINMHZ  shows the minimum MHz of the CPU 
-802-3-ethernet.mac-address-blacklist:   -- + 
-802-3-ethernet.mtu:                     auto +For more details see lscpu(1).
-802-3-ethernet.s390-subchannels:        -- +
-802-3-ethernet.s390-nettype:            -- +
-802-3-ethernet.s390-options:            -- +
-802-3-ethernet.wake-on-lan:             default +
-802-3-ethernet.wake-on-lan-password:    -- +
-------------------------------------------------------------------------------- +
-ipv4.method:                            manual +
-ipv4.dns:                               8.8.8.8 +
-ipv4.dns-search:                        ittraining.loc +
-ipv4.dns-options:                       -+
-ipv4.dns-priority:                      0 +
-ipv4.addresses:                         10.0.2.45/24 +
-ipv4.gateway:                           10.0.2.1 +
-ipv4.routes:                            -- +
-ipv4.route-metric:                      -1 +
-ipv4.route-table:                       0 (unspec) +
-ipv4.routing-rules:                     -- +
-ipv4.ignore-auto-routes:                no +
-ipv4.ignore-auto-dns:                   no +
-ipv4.dhcp-client-id:                    -- +
-ipv4.dhcp-iaid:                         -- +
-ipv4.dhcp-timeout:                      0 (default) +
-ipv4.dhcp-send-hostname:                yes +
-ipv4.dhcp-hostname:                     -- +
-ipv4.dhcp-fqdn:                         -- +
-ipv4.dhcp-hostname-flags:               0x0 (none) +
-ipv4.never-default:                     no +
-ipv4.may-fail:                          yes +
-ipv4.dad-timeout:                       -1 (default) +
-ipv4.dhcp-vendor-class-identifier:      -- +
-ipv4.dhcp-reject-servers:               -- +
-------------------------------------------------------------------------------- +
-ipv6.method:                            auto +
-ipv6.dns                              -- +
-ipv6.dns-search:                        -- +
-ipv6.dns-options:                       -- +
-ipv6.dns-priority:                      0 +
-ipv6.addresses:                         -- +
-ipv6.gateway:                           -- +
-ipv6.routes:                            -- +
-ipv6.route-metric:                      -1 +
-ipv6.route-table:                       0 (unspec) +
-ipv6.routing-rules:                     -- +
-ipv6.ignore-auto-routes:                no +
-ipv6.ignore-auto-dns:                   no +
-ipv6.never-default:                     no +
-ipv6.may-fail:                          yes +
-ipv6.ip6-privacy:                       0 (disabled) +
-ipv6.addr-gen-mode:                     stable-privacy +
-ipv6.ra-timeout:                        0 (default) +
-ipv6.dhcp-duid:                         -- +
-ipv6.dhcp-iaid:                         -- +
-ipv6.dhcp-timeout:                      0 (default) +
-ipv6.dhcp-send-hostname:                yes +
-ipv6.dhcp-hostname:                     -- +
-ipv6.dhcp-hostname-flags:               0x0 (none) +
-ipv6.token:                             -- +
-------------------------------------------------------------------------------- +
-proxy.method:                           none +
-proxy.browser-only:                     no +
-proxy.pac-url:                          -- +
-proxy.pac-script:                       -- +
-------------------------------------------------------------------------------- +
-lines 56-100/100 (END) +
-[q]+
 </code> </code>
  
-De même, pour consulter les paramètres du profil **ip_fixe**, utilisez la commande suivante :+====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 :
  
 <code> <code>
-[root@centos8 ~]# nmcli -p connection show ip_fixe +[root@centos8 ~]# lshw -businfo 
-=============================================================================== +Bus info          Device      Class      Description 
-                     Connection profile details (ip_fixe+==================================================== 
-=============================================================================== +                              system     Standard PC (i440FX + PIIX, 1996
-connection.id:                          ip_fixe +                              bus        Motherboard 
-connection.uuid:                        0f48c74d-5d16-4c37-8220-24644507b589 +                              memory     96KiB BIOS 
-connection.stable-id:                   -- +cpu@                        processor  Intel(RXeon(RCPU E3-1270 v6 @ 3.80GHz 
-connection.type:                        802-3-ethernet +cpu@                        processor  Intel(RXeon(RCPU E3-1270 v6 @ 3.80GHz 
-connection.interface-name:              ens18 +                              memory     16GiB System Memory 
-connection.autoconnect:                 yes +                              memory     DIMM RAM [empty] 
-connection.autoconnect-priority:        0 +pci@0000:00:00.0              bridge     440FX 82441FX PMC [Natoma] 
-connection.autoconnect-retries:         -1 (default) +pci@0000:00:01.0              bridge     82371SB PIIX3 ISA [Natoma/Triton II] 
-connection.multi-connect:               0 (default) +                              input      PnP device PNP0303 
-connection.auth-retries:                -1 +                              input      PnP device PNP0f13 
-connection.timestamp:                   1630224329 +                              storage    PnP device PNP0700 
-connection.read-only:                   no +                              system     PnP device PNP0b00 
-connection.permissions:                 -- +pci@0000:00:01.1  scsi1       storage    82371SB PIIX3 IDE [Natoma/Triton II] 
-connection.zone:                        -- +scsi@1:0.0.0      /dev/cdrom  disk       QEMU DVD-ROM 
-connection.master:                      -- +pci@0000:00:01.2              bus        82371SB PIIX3 USB [Natoma/Triton II] 
-connection.slave-type:                  -- +usb@1             usb1        bus        UHCI Host Controller 
-connection.autoconnect-slaves:          -1 (default) +usb@1:1           input5      input      QEMU QEMU USB Tablet 
-connection.secondaries:                 -+pci@0000:00:01.3              bridge     82371AB/EB/MB PIIX4 ACPI 
-connection.gateway-ping-timeout:        0 +pci@0000:00:02.0  /dev/fb0    display    bochs-drmdrmfb 
-connection.metered:                     unknown +pci@0000:00:03.0              generic    Virtio memory balloon 
-connection.lldp:                        default +virtio@                     generic    Virtual I/O device 
-connection.mdns:                        -1 (default) +pci@0000:00:07.0  scsi2       storage    82801IR/IO/IH (ICH9R/DO/DH6 port SATA Contr 
-connection.llmnr:                       -1 (default) +scsi@2:0.0.0      /dev/sda    disk       34GB QEMU HARDDISK 
-connection.wait-device-timeout:         -1 +scsi@2:0.0.0,1    /dev/sda1   volume     1GiB EXT4 volume 
-------------------------------------------------------------------------------- +scsi@2:0.0.0,   /dev/sda2   volume     30GiB Linux LVM Physical Volume partition 
-802-3-ethernet.port:                    -- +scsi@3:0.0.0      /dev/sdb    disk       4294MB QEMU HARDDISK 
-802-3-ethernet.speed:                   0 +scsi@4:0.0.0      /dev/sdc    disk       68GB QEMU HARDDISK 
-802-3-ethernet.duplex:                  -- +scsi@4:0.0.0,1    /dev/sdc1   volume     63GiB EXT4 volume 
-802-3-ethernet.auto-negotiate         no +scsi@5:0.0.0      /dev/sdd    disk       34GB QEMU HARDDISK 
-802-3-ethernet.mac-address            -- +pci@0000:00:12.0              network    Virtio network device 
-802-3-ethernet.cloned-mac-address:      -+virtio@         ens18       network    Ethernet interface 
-802-3-ethernet.generate-mac-address-mask:-- +pci@0000:00:13.0              network    Virtio network device 
-802-3-ethernet.mac-address-blacklist  -- +virtio@2          ens19       network    Ethernet interface 
-802-3-ethernet.mtu:                     auto +pci@0000:00:1e.0              bridge     QEMU PCI-PCI bridge 
-802-3-ethernet.s390-subchannels:        -- +pci@0000:00:1f.0              bridge     QEMU PCI-PCI bridge 
-802-3-ethernet.s390-nettype:            -- +                  input0      input      Power Button 
-802-3-ethernet.s390-options:            -- +                  input1      input      AT Translated Set keyboard 
-802-3-ethernet.wake-on-lan:             default +                  input3      input      VirtualPS/2 VMware VMMouse 
-802-3-ethernet.wake-on-lan-password:    -- +                  input4      input      VirtualPS/2 VMware VMMouse 
-------------------------------------------------------------------------------- +                  input6      input      PC Speaker
-ipv4.method                           manual +
-ipv4.dns                              -- +
-ipv4.dns-search:                        -- +
-ipv4.dns-options:                       -- +
-ipv4.dns-priority:                      0 +
-ipv4.addresses:                         10.0.2.46/24 +
-ipv4.gateway                          10.0.2.1 +
-ipv4.routes:                            -- +
-ipv4.route-metric:                      -1 +
-ipv4.route-table:                       (unspec) +
-ipv4.routing-rules:                     -- +
-ipv4.ignore-auto-routes:                no +
-ipv4.ignore-auto-dns:                   no +
-ipv4.dhcp-client-id:                    -- +
-ipv4.dhcp-iaid:                         -- +
-ipv4.dhcp-timeout:                      (default) +
-ipv4.dhcp-send-hostname:                yes +
-ipv4.dhcp-hostname                    -- +
-ipv4.dhcp-fqdn                        -- +
-ipv4.dhcp-hostname-flags:               0x0 (none) +
-ipv4.never-default:                     no +
-ipv4.may-fail                         yes +
-ipv4.dad-timeout:                       -(default) +
-ipv4.dhcp-vendor-class-identifier:      -- +
-ipv4.dhcp-reject-servers              -- +
-------------------------------------------------------------------------------- +
-ipv6.method                           auto +
-ipv6.dns:                               -- +
-ipv6.dns-search                       -- +
-ipv6.dns-options                      -- +
-ipv6.dns-priority:                      0 +
-ipv6.addresses:                         -+
-ipv6.gateway                          -- +
-ipv6.routes                           -- +
-ipv6.route-metric:                      -1 +
-ipv6.route-table:                       (unspec) +
-ipv6.routing-rules                    -- +
-ipv6.ignore-auto-routes               no +
-ipv6.ignore-auto-dns:                   no +
-ipv6.never-default:                     no +
-ipv6.may-fail:                          yes +
-ipv6.ip6-privacy:                       -1 (unknown+
-ipv6.addr-gen-mode                    stable-privacy +
-ipv6.ra-timeout:                        (default) +
-ipv6.dhcp-duid:                         -- +
-ipv6.dhcp-iaid:                         -- +
-ipv6.dhcp-timeout:                      (default) +
-ipv6.dhcp-send-hostname:                yes +
-ipv6.dhcp-hostname:                     -- +
-ipv6.dhcp-hostname-flags:               0x0 (none) +
-ipv6.token:                             -- +
-------------------------------------------------------------------------------- +
-proxy.method:                           none +
-proxy.browser-only:                     no +
-proxy.pac-url:                          -- +
-proxy.pac-script:                       -- +
-------------------------------------------------------------------------------- +
-=============================================================================== +
-      Activate connection details (0f48c74d-5d16-4c37-8220-24644507b589) +
-=============================================================================== +
-GENERAL.NAME                          ip_fixe +
-GENERAL.UUID:                           0f48c74d-5d16-4c37-8220-24644507b589 +
-GENERAL.DEVICES:                        ens18 +
-GENERAL.IP-IFACE:                       ens18 +
-GENERAL.STATE:                          activated +
-GENERAL.DEFAULT:                        yes +
-GENERAL.DEFAULT6:                       no +
-GENERAL.SPEC-OBJECT:                    -- +
-GENERAL.VPN:                            no +
-GENERAL.DBUS-PATH:                      /org/freedesktop/NetworkManager/ActiveConnection/4 +
-GENERAL.CON-PATH                      /org/freedesktop/NetworkManager/Settings/+
-GENERAL.ZONE:                           -- +
-GENERAL.MASTER-PATH:                    -- +
-------------------------------------------------------------------------------- +
-IP4.ADDRESS[1]:                         10.0.2.46/24 +
-IP4.GATEWAY                           10.0.2.1 +
-IP4.ROUTE[1]                          dst = 10.0.2.0/24, nh = 0.0.0.0, mt = 100 +
-IP4.ROUTE[2]                          dst = 0.0.0.0/0, nh = 10.0.2.1, mt = 100 +
-------------------------------------------------------------------------------- +
-IP6.ADDRESS[1]                        fe80::5223:aee1:998e:9f27/64 +
-IP6.GATEWAY:                            -+
-IP6.ROUTE[1]                          dst = fe80::/64, nh = ::, mt = 100 +
-IP6.ROUTE[2]:                           dst = ff00::/8, nh = ::, mt = 256, table=255 +
-------------------------------------------------------------------------------- +
-lines 83-127/127 (END) +
-[q]+
 </code> </code>
  
-Pour consulter la liste profils associés à un périphérique, utilisez la commande suivante :+Consultez maintenant le matériel de la classe **system** :
  
 <code> <code>
-[root@centos8 ~]# nmcli -f CONNECTIONS device show ens18 +[root@centos8 ~]# lshw -c system 
-CONNECTIONS.AVAILABLE-CONNECTION-PATHS/org/freedesktop/NetworkManager/Settings/1,/org/freedesktop/NetworkManager/Settings/4 +centos8.ittraining.loc       
-CONNECTIONS.AVAILABLE-CONNECTIONS[1]  fc4a4d23-b15e-47a7-bcfa-b2e08f49553e | ens18 +    descriptionComputer 
-CONNECTIONS.AVAILABLE-CONNECTIONS[2]  0f48c74d-5d16-4c37-8220-24644507b589 | ip_fixe+    product: Standard PC (i440FX + PIIX1996) 
 +    vendor: QEMU 
 +    versionpc-i440fx-7.0 
 +    width: 64 bits 
 +    capabilities: smbios-2.8 dmi-2.8 smp vsyscall32 
 +    configurationboot=normal uuid=95bd69e3-4a74-44a7-b58c-b74fbfb86df2 
 +  *-pnp00:03 
 +       product: PnP device PNP0b00 
 +       physical id: 3 
 +       capabilities: pnp 
 +       configuration: driver=rtc_cmos
 </code> </code>
  
-Les fichiers de configuration pour le periphérique **ens18** se trouvent dans le répertoire **/etc/sysconfig/network-scripts/** :+Consultez maintenant le matériel des autres classes principales :
  
 <code> <code>
-[root@centos8 ~]# ls -/etc/sysconfig/network-scripts| grep ifcfg +[root@centos8 ~]# lshw -c memory 
--rw-r--r--. 1 root root 417 Jun 16 06:39 ifcfg-ens18 +  *-firmware                 
--rw-r--r--. 1 root root 326 Aug 29 03:58 ifcfg-ip_fixe+       description: BIOS 
 +       vendor: SeaBIOS 
 +       physical id: 0 
 +       version: rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 
 +       date: 04/01/2014 
 +       size: 96KiB 
 +  *-memory 
 +       description: System Memory 
 +       physical id: 1000 
 +       size: 16GiB 
 +       capabilities: ecc 
 +       configuration: errordetection=multi-bit-ecc 
 +     *-bank 
 +          description: DIMM RAM [empty] 
 +          vendor: QEMU 
 +          physical id: 0 
 +          slot: DIMM 0 
 + 
 +[root@centos8 ~]# lshw -c video 
 +  *-display                  
 +       description: VGA compatible controller 
 +       product: bochs-drmdrmfb 
 +       physical id: 2 
 +       bus info: pci@0000:00:02.0 
 +       logical name: /dev/fb0 
 +       version: 02 
 +       width: 32 bits 
 +       clock: 33MHz 
 +       capabilities: vga_controller rom fb 
 +       configuration: depth=32 driver=bochs-drm latency=0 resolution=1280,800 
 +       resources: irq:0 memory:fd000000-fdffffff memory:fea90000-fea90fff memory:c0000-dffff 
 + 
 + 
 +[root@centos8 ~]# lshw -c storage 
 +  *-pnp00:02                 
 +       product: PnP device PNP0700 
 +       physical id: 2 
 +       capabilities: pnp 
 +  *-ide 
 +       description: IDE interface 
 +       product: 82371SB PIIX3 IDE [Natoma/Triton II] 
 +       vendor: Intel Corporation 
 +       physical id: 1.1 
 +       bus info: pci@0000:00:01.1 
 +       logical name: scsi1 
 +       version: 00 
 +       width: 32 bits 
 +       clock: 33MHz 
 +       capabilities: ide isa_compat_mode bus_master emulated 
 +       configuration: driver=ata_piix latency=0 
 +       resources: irq:0 ioport:1f0(size=8) ioport:3f6 ioport:170(size=8) ioport:376 ioport:e0c0(size=16) 
 +  *-sata 
 +       description: SATA controller 
 +       product: 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] 
 +       vendor: Intel Corporation 
 +       physical id: 7 
 +       bus info: pci@0000:00:07.0 
 +       logical name: scsi2 
 +       logical name: scsi3 
 +       logical name: scsi4 
 +       logical name: scsi5 
 +       version: 02 
 +       width: 32 bits 
 +       clock: 33MHz 
 +       capabilities: sata msi ahci_1.0 bus_master cap_list emulated 
 +       configuration: driver=ahci latency=0 
 +       resources: irq:30 ioport:e060(size=32) memory:fea91000-fea91fff 
 + 
 + 
 +[root@centos8 ~]# lshw -c disk 
 +  *-cdrom                    
 +       description: DVD reader 
 +       product: QEMU DVD-ROM 
 +       vendor: QEMU 
 +       physical id: 0.0.0 
 +       bus info: scsi@1:0.0.0 
 +       logical name: /dev/cdrom 
 +       logical name: /dev/sr0 
 +       version: 2.5+ 
 +       capabilities: removable audio dvd 
 +       configuration: ansiversion=5 status=nodisc 
 +  *-disk:0 
 +       description: ATA Disk 
 +       product: QEMU HARDDISK 
 +       physical id: 0 
 +       bus info: scsi@2:0.0.0 
 +       logical name: /dev/sda 
 +       version: 2.5+ 
 +       serial: QM00005 
 +       size: 32GiB (34GB) 
 +       capabilities: partitioned partitioned:dos 
 +       configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 signature=b39ec5c8 
 +  *-disk:1 
 +       description: ATA Disk 
 +       product: QEMU HARDDISK 
 +       physical id: 1 
 +       bus info: scsi@3:0.0.0 
 +       logical name: /dev/sdb 
 +       version: 2.5+ 
 +       serial: QM00007 
 +       size: 4GiB (4294MB) 
 +       configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 
 +  *-disk:2 
 +       description: ATA Disk 
 +       product: QEMU HARDDISK 
 +       physical id: 2 
 +       bus info: scsi@4:0.0.0 
 +       logical name: /dev/sdc 
 +       version: 2.5+ 
 +       serial: QM00009 
 +       size: 64GiB (68GB) 
 +       capabilities: partitioned partitioned:dos 
 +       configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 signature=45352f44 
 +  *-disk:3 
 +       description: ATA Disk 
 +       product: QEMU HARDDISK 
 +       physical id: 3 
 +       bus info: scsi@5:0.0.0 
 +       logical name: /dev/sdd 
 +       version: 2.5+ 
 +       serial: QM00011 
 +       size: 32GiB (34GB) 
 +       configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 
 + 
 + 
 +[root@centos8 ~]# lshw -c volume 
 +  *-volume:0                 
 +       description: EXT4 volume 
 +       vendor: Linux 
 +       physical id: 1 
 +       bus info: scsi@2:0.0.0,
 +       logical name: /dev/sda1 
 +       logical name: /boot 
 +       version: 1.0 
 +       serial: 1c04981e-5317-4b73-9695-3ce25246835d 
 +       size: 1GiB 
 +       capacity: 1GiB 
 +       capabilities: primary bootable journaled extended_attributes large_files huge_files dir_nlink recover 64bit extents ext4 ext2 initialized 
 +       configuration: created=2021-06-16 12:21:27 filesystem=ext4 lastmountpoint=/boot modified=2022-11-10 07:12:41 mount.fstype=ext4 mount.options=rw,seclabel,relatime mounted=2022-11-10 07:12:41 state=mounted 
 +  *-volume:1 
 +       description: Linux LVM Physical Volume partition 
 +       physical id: 2 
 +       bus info: scsi@2:0.0.0,
 +       logical name: /dev/sda2 
 +       serial: kOJTuY-TbBA-JSvU-vhkb-rvpz-QoPt-bIKe2e 
 +       size: 30GiB 
 +       capacity: 30GiB 
 +       capabilities: primary multi lvm2 
 +  *-volume 
 +       description: EXT4 volume 
 +       vendor: Linux 
 +       physical id: 1 
 +       bus info: scsi@4:0.0.0,1 
 +       logical name: /dev/sdc1 
 +       logical name: /home 
 +       version: 1.0 
 +       serial: f76d6b66-985b-4a91-af9c-4987e8c1443c 
 +       size: 63GiB 
 +       capacity: 63GiB 
 +       capabilities: primary journaled extended_attributes large_files huge_files dir_nlink recover 64bit extents ext4 ext2 initialized 
 +       configuration: created=2021-07-19 18:02:13 filesystem=ext4 lastmountpoint=/home modified=2022-11-10 15:34:07 mount.fstype=ext4 mount.options=rw,seclabel,relatime mounted=2022-11-10 15:34:07 state=mounted 
 + 
 +[root@centos8 ~]# lshw -c network 
 +  *-network:0                
 +       description: Ethernet controller 
 +       product: Virtio network device 
 +       vendor: Red Hat, Inc. 
 +       physical id: 12 
 +       bus info: pci@0000:00:12.0 
 +       version: 00 
 +       width: 64 bits 
 +       clock: 33MHz 
 +       capabilities: msix bus_master cap_list rom 
 +       configuration: driver=virtio-pci latency=0 
 +       resources: irq:10 ioport:e080(size=32) memory:fea92000-fea92fff memory:fe404000-fe407fff memory:fea00000-fea3ffff 
 +     *-virtio1 
 +          description: Ethernet interface 
 +          physical id: 0 
 +          bus info: virtio@1 
 +          logical name: ens18 
 +          serial: 5e:3f:e8:43:d5:f9 
 +          capabilities: ethernet physical 
 +          configuration: autonegotiation=off broadcast=yes driver=virtio_net driverversion=1.0.0 ip=10.0.2.45 link=yes multicast=yes 
 +  *-network:
 +       description: Ethernet controller 
 +       product: Virtio network device 
 +       vendor: Red Hat, Inc. 
 +       physical id: 13 
 +       bus info: pci@0000:00:13.0 
 +       version: 00 
 +       width: 64 bits 
 +       clock: 33MHz 
 +       capabilities: msix bus_master cap_list rom 
 +       configuration: driver=virtio-pci latency=0 
 +       resources: irq:10 ioport:e0a0(size=32) memory:fea93000-fea93fff memory:fe408000-fe40bfff memory:fea40000-fea7ffff 
 +     *-virtio2 
 +          description: Ethernet interface 
 +          physical id: 0 
 +          bus info: virtio@2 
 +          logical name: ens19 
 +          serial: ea:c8:86:9e:73:a6 
 +          capabilities: ethernet physical 
 +          configuration: autonegotiation=off broadcast=yes driver=virtio_net driverversion=1.0.0 link=yes multicast=yes
 </code> </code>
  
-====1.2 - Résolution des Noms====+===Options de la commande===
  
-L'étude du fichier **/etc/sysconfig/network-scripts/ifcfg-ip_fixe** démontre l'abscence de directives concernant les DNS :+Les options de cette commande sont :
  
 <code> <code>
-[root@centos8 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ip_fixe +[root@centos8 ~]# lshw -h 
-TYPE=Ethernet +Hardware Lister (lshw) - B.02.19.2 
-PROXY_METHOD=none +usage: lshw [-format] [-options ...] 
-BROWSER_ONLY=no +       lshw -version 
-BOOTPROTO=none + 
-IPADDR=10.0.2.46 +        -version        print program version (B.02.19.2) 
-PREFIX=24 + 
-GATEWAY=10.0.2.1 +format can be 
-DEFROUTE=yes +        -html           output hardware tree as HTML 
-IPV4_FAILURE_FATAL=no +        -xml            output hardware tree as XML 
-IPV6INIT=yes +        -json           output hardware tree as a JSON object 
-IPV6_AUTOCONF=yes +        -short          output hardware paths 
-IPV6_DEFROUTE=yes +        -businfo        output bus information 
-IPV6_FAILURE_FATAL=no + 
-IPV6_ADDR_GEN_MODE=stable-privacy +options can be 
-NAME=ip_fixe +        -dump filename  displays output and dump collected information into a file (SQLite database) 
-UUID=0f48c74d-5d16-4c37-8220-24644507b589 +        -class CLASS    only show a certain class of hardware 
-DEVICE=ens18 +        -C CLASS        same as '-class CLASS' 
-ONBOOT=yes+        -c CLASS        same as '-class CLASS' 
 +        -disable TEST   disable a test (like pci, isapnp, cpuid, etc. ) 
 +        -enable TEST    enable a test (like pci, isapnp, cpuid, etc. ) 
 +        -quiet          don't display status 
 +        -sanitize       sanitize output (remove sensitive information like serial numbers, etc.) 
 +        -numeric        output numeric IDs (for PCI, USB, etc.) 
 +        -notime         exclude volatile attributes (timestamps) from output
 </code> </code>
  
-La résolution des noms est donc inactive :+====1.7 - La Commande dmidecode==== 
 + 
 +La commande **dmidecode** lit la table **DMI** (//Desktop Management Interface//) aussi appelée **SMBIOS** (//System Management BIOS//) et fourni les informations sur : 
 + 
 +  * l'état du matériel actuel, 
 +  * les extensions possibles.
  
 <code> <code>
-[root@centos8 ~]# ping www.free.fr +[root@centos8 ~]# dmidecode 
-pingwww.free.frName or service not known+# dmidecode 3.
 +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 
 +        VendorSeaBIOS 
 +        Version: rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 
 +        Release Date04/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: QEMU 
 +        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: QEMU 
 +        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: 0x00000000 
 +        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: CPU 0 
 +        Type: Central Processor 
 +        Family: Other 
 +        Manufacturer: QEMU 
 +        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: None 
 + 
 +Handle 0x0401, DMI type 4, 42 bytes 
 +Processor Information 
 +        Socket Designation: CPU 1 
 +        Type: Central Processor 
 +        Family: Other 
 +        Manufacturer: QEMU 
 +        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: None 
 + 
 +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: QEMU 
 +        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
 </code> </code>
  
-Modifiez donc la configuration du profil **ip_fixe** :+===Options de la commande=== 
 + 
 +Les options de cette commande sont :
  
 <code> <code>
-[root@centos8 ~]# nmcli connection mod ip_fixe ipv4.dns 8.8.8.8+[root@centos7 ~]# dmidecode --help 
 +Usage: dmidecode [OPTIONS] 
 +Options are: 
 + -d, --dev-mem FILE     Read memory from device FILE (default: /dev/mem) 
 + -h, --help             Display this help text and exit 
 + -q, --quiet            Less verbose output 
 + -s, --string KEYWORD   Only display the value of the given DMI string 
 + -t, --type TYPE        Only display the entries of given type 
 + -u, --dump             Do not decode the entries 
 +     --dump-bin FILE    Dump the DMI data to a binary file 
 +     --from-dump FILE   Read the DMI data from a binary file 
 + -V, --version          Display the version and exit
 </code> </code>
  
-L'étude du fichier **/etc/sysconfig/network-scripts/ifcfg-ip_fixe** démontre que la directive concernant le serveur DNS a été ajoutée :+====1.8 - La Commande smartctl==== 
 + 
 +**smartctl** contrôle le système SMART (Self-Monitoring, Analysis and Reporting Technology) intégré à la plupart des disques durs et disques SSD ATA/SATA et SCSI/SAS :
  
 <code> <code>
-[root@centos8 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ip_fixe +[root@centos8 ~]# smartctl --smart=on --saveauto=on --offlineauto=on /dev/sdb 
-TYPE=Ethernet + 
-PROXY_METHOD=none +[root@centos8 ~]# smartctl -/dev/sdb 
-BROWSER_ONLY=no +smartctl 7.1 2020-04-05 r5049 [x86_64-linux-4.18.0-305.7.1.el8_4.x86_64] (local build) 
-BOOTPROTO=none +Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org 
-IPADDR=10.0.2.46 + 
-PREFIX=24 +=== START OF INFORMATION SECTION === 
-GATEWAY=10.0.2.1 +Device Model:     QEMU HARDDISK 
-DEFROUTE=yes +Serial Number:    QM00007 
-IPV4_FAILURE_FATAL=no +Firmware Version: 2.5+ 
-IPV6INIT=yes +User Capacity:    4,294,967,296 bytes [4.29 GB] 
-IPV6_AUTOCONF=yes +Sector Size:      512 bytes logical/physical 
-IPV6_DEFROUTE=yes +Device is:        Not in smartctl database [for details use: -P showall] 
-IPV6_FAILURE_FATAL=no +ATA Version is:   ATA/ATAPI-7, ATA/ATAPI-5 published, ANSI NCITS 340-2000 
-IPV6_ADDR_GEN_MODE=stable-privacy +Local Time is:    Sun Nov 13 09:12:18 2022 CET 
-NAME=ip_fixe +SMART support is: Available - device has SMART capability
-UUID=0f48c74d-5d16-4c37-8220-24644507b589 +SMART support is: Enabled 
-DEVICE=ens18 + 
-ONBOOT=yes +=== START OF READ SMART DATA SECTION === 
-DNS1=8.8.8.8+SMART overall-health self-assessment test result: PASSED 
 + 
 +General SMART Values: 
 +Offline data collection status:  (0x02) Offline data collection activity 
 +                                        was completed without error. 
 +                                        Auto Offline Data Collection: Disabled. 
 +Self-test execution status:      (   0) The previous self-test routine completed 
 +                                        without error or no self-test has ever  
 +                                        been run. 
 +Total time to complete Offline  
 +data collection:                (  288) seconds. 
 +Offline data collection 
 +capabilities:                    (0x19) SMART execute Offline immediate. 
 +                                        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:            (0x0003) Saves SMART data before entering 
 +                                        power-saving mode. 
 +                                        Supports SMART auto save timer. 
 +Error logging capability:        (0x01) Error logging supported. 
 +                                        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          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE 
 +  1 Raw_Read_Error_Rate     0x0003   100   100   006    Pre-fail  Always             0 
 +  3 Spin_Up_Time            0x0003   100   100   000    Pre-fail  Always             16 
 +  4 Start_Stop_Count        0x0002   100   100   020    Old_age   Always             100 
 +  5 Reallocated_Sector_Ct   0x0003   100   100   036    Pre-fail  Always             0 
 +  9 Power_On_Hours          0x0003   100   100   000    Pre-fail  Always             1 
 + 12 Power_Cycle_Count       0x0003   100   100   000    Pre-fail  Always             0 
 +190 Airflow_Temperature_Cel 0x0003   069   069   050    Pre-fail  Always             31 (Min/Max 31/31) 
 + 
 +SMART Error Log Version: 1 
 +No Errors Logged 
 + 
 +SMART Self-test log structure revision number 1 
 +No self-tests have been logged [To run self-tests, use: smartctl -t] 
 + 
 +Selective Self-tests/Logging not supported
 </code> </code>
  
-Afin que la modification du serveur DNS soit prise en compte, re-démarrez le service NetworkManager :+===Options de la commande=== 
 + 
 +Les options de cette commande sont :
  
 <code> <code>
-root@centos8 ~]# systemctl restart NetworkManager.service +[root@centos8 ~]# smartctl --help 
-[root@centos8 ~]# systemctl status NetworkManager.service +smartctl 7.1 2020-04-05 r5049 [x86_64-linux-4.18.0-305.7.1.el8_4.x86_64] (local build
-● NetworkManager.service Network Manager +Copyright (C2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
-   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled+
-   Active: active (runningsince Sun 2021-08-29 04:15:11 EDT; 8s ago +
-     Docs: man:NetworkManager(8) +
- Main PID: 973390 (NetworkManager) +
-    Tasks: 4 (limit: 23535) +
-   Memory: 4.6M +
-   CGroup: /system.slice/NetworkManager.service +
-           └─973390 /usr/sbin/NetworkManager --no-daemon+
  
-Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info [1630224912.2235device (ens18): state change: ip-check -> secondaries (reas> +Usagesmartctl [optionsdevice 
-Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.2237device (virbr0): state change: secondaries -> activated (re> + 
-Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.2241manager: NetworkManager state is now CONNECTED_LOCAL +============================================ SHOW INFORMATION OPTIONS ===== 
-Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.2251policyset 'ip_fixe' (ens18as default for IPv4 routing a> + 
-Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.3090device (virbr0): Activation: successful, device activated. +  -h, --help, --usage 
-Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.3098] device (ens18): state change: secondaries -> activated (rea> +         Display this help and exit 
-Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.3102managerNetworkManager state is now CONNECTED_SITE + 
-Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.3111] device (ens18): Activation: successful, device activated. +  -V, --version, --copyright, --license 
-Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.3116] managerNetworkManager state is now CONNECTED_GLOBAL +         Print license, copyright, and version information and exit 
-Aug 29 04:15:12 centos8.ittraining.loc NetworkManager[973390]: <info>  [1630224912.3121managerstartup complete + 
-lines 1-20/20 (END+  -i, --info 
-[q]+         Show identity information for device 
 + 
 +  --identify[=[w][nvb]] 
 +         Show words and bits from IDENTIFY DEVICE data                (ATA) 
 + 
 +  -g NAME, --get=NAME 
 +        Get device settingall, 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                                           (ATA) 
 +         Set smartctl quiet mode to one oferrorsonly, silent, noserial 
 + 
 +  -d TYPE, --device=TYPE 
 +         Specify device type to one of: 
 +         ata, scsi[+TYPE], nvme[,NSID], sat[,auto][,N][+TYPE], usbcypress[,X], usbjmicron[,p][,x][,N], usbprolific, usbsunplus, sntjmicron[,NSID], intelliprop,N[+TYPE], jmb39x,N[,sLBA][,force][+TYPE], marvell, areca,N/E, 3ware,N, hpt,L/M/N, megaraid,N, aacraid,H,L,ID, cciss,N, auto, test 
 + 
 +  -T TYPE, --tolerance=TYPE                                           (ATA) 
 +         Tolerancenormal, conservative, permissive, verypermissive 
 + 
 +  -b TYPE, --badsum=TYPE                                              (ATA
 +         Set action on bad checksum to one ofwarn, exit, ignore 
 + 
 +  -r TYPE, --report=TYPE 
 +         Report transactions (see man page) 
 + 
 +  -n MODE[,STATUS], --nocheck=MODE[,STATUS                          (ATA) 
 +         No check ifneversleep, standby, idle (see man page) 
 + 
 +============================== DEVICE FEATURE ENABLE/DISABLE COMMANDS ===== 
 + 
 +  -s VALUE, --smart=VALUE 
 +        Enable/disable SMART on device (on/off) 
 + 
 +  -o VALUE, --offlineauto=VALUE                                       (ATA) 
 +        Enable/disable automatic offline testing on device (on/off) 
 + 
 +  -S VALUE, --saveauto=VALUE                                          (ATA) 
 +        Enable/disable Attribute autosave on device (on/off) 
 + 
 +  -s NAME[,VALUE], --set=NAME[,VALUE] 
 +        Enable/disable/change device settingaam,[N|off], apm,[N|off], 
 +        dsn,[on|off], lookahead,[on|off], security-freeze, 
 +        standby,[N|off|now], wcache,[on|off], rcache,[on|off], 
 +        wcreorder,[on|off[,p]], wcache-sct,[ata|on|off[,p]
 + 
 +======================================= READ AND DISPLAY DATA OPTIONS ===== 
 + 
 +  -H, --health 
 +        Show device SMART health status 
 + 
 +  -c, --capabilities                                            (ATA, NVMe) 
 +        Show device SMART capabilities 
 + 
 +  -A--attributes 
 +        Show device SMART vendor-specific Attributes and values 
 + 
 +  -f FORMAT, --format=FORMAT                                          (ATA) 
 +        Set output format for attributesold, brief, hex[,id|val] 
 + 
 +  -l TYPE, --log=TYPE 
 +        Show device logTYPEerror, selftest, selective, directory[,g|s], 
 +        xerror[,N][,error], xselftest[,N][,selftest], background, 
 +        sasphy[,reset], sataphy[,reset], scttemp[sts,hist], 
 +        scttempint,N[,p], scterc[,N,M], devstat[,N], defects[,N], ssd, 
 +        gplog,N[,RANGE], smartlog,N[,RANGE], nvmelog,N,SIZE 
 + 
 +  -v N,OPTION , --vendorattribute=N,OPTION                            (ATA) 
 +        Set display OPTION for vendor Attribute N (see man page) 
 + 
 +  -F TYPE, --firmwarebug=TYPE                                         (ATA) 
 +        Use firmware bug workaround: 
 +        none, nologdir, samsung, samsung2, samsung3, xerrorlba, swapid 
 + 
 +  -P TYPE, --presets=TYPE                                             (ATA) 
 +        Drive-specific presets: use, ignore, show, showall 
 + 
 +  -B [+]FILE, --drivedb=[+]FILE                                       (ATA) 
 +        Read and replace [add] drive database from FILE 
 +        [default is +/etc/smartmontools/smart_drivedb.
 +         and then    /usr/share/smartmontools/drivedb.h] 
 + 
 +============================================ DEVICE SELF-TEST OPTIONS ===== 
 + 
 +  -t TEST, --test=TEST 
 +        Run test. TESToffline, short, long, conveyance, force, vendor,N, 
 +                        select,M-N, pending,N, afterselect,[on|off] 
 + 
 +  -C, --captive 
 +        Do test in captive mode (along with -t) 
 + 
 +  -X, --abort 
 +        Abort any non-captive test on device 
 + 
 +=================================================== SMARTCTL EXAMPLES ===== 
 + 
 +  smartctl --all /dev/sda                    (Prints all SMART information
 + 
 +  smartctl --smart=on --offlineauto=on --saveauto=on /dev/sda 
 +                                              (Enables SMART on first disk) 
 + 
 +  smartctl --test=long /dev/sda          (Executes extended disk self-test) 
 + 
 +  smartctl --attributes --log=selftest --quietmode=errorsonly /dev/sda 
 +                                      (Prints Self-Test & Attribute errors) 
 +  smartctl --all --device=3ware,2 /dev/sda 
 +  smartctl --all --device=3ware,2 /dev/twe0 
 +  smartctl --all --device=3ware,2 /dev/twa0 
 +  smartctl --all --device=3ware,2 /dev/twl0 
 +          (Prints all SMART info for 3rd ATA disk on 3ware RAID controller) 
 +  smartctl --all --device=hpt,1/1/3 /dev/sda 
 +          (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,3/1 /dev/sg2 
 +          (Prints all SMART info for 3rd ATA disk of the 1st enclosure 
 +           on Areca RAID controller)
 </code> </code>
  
-Vérifiez que le fichier **/etc/resolv.conf** ait été modifié par NetworkManager :+====1.9 - Les Commandes accton et dump-acct==== 
 + 
 +Cette commande permet d'activer ou désactiver la comptabilisation des processus :
  
 <code> <code>
-[root@centos8 ~]# cat /etc/resolv.conf +[root@centos8 ~]# accton on 
-Generated by NetworkManager +Turning on process accounting, file set to the default '/var/account/pacct'
-search ittraining.loc +[root@centos8 ~]# systemctl status psacct 
-nameserver 8.8.8.8+● psacct.service - Kernel process accounting 
 +   Loaded: loaded (/usr/lib/systemd/system/psacct.service; disabled; vendor preset: d> 
 +   Active: inactive (dead) 
 +...skipping... 
 +● psacct.service - Kernel process accounting 
 +   Loaded: loaded (/usr/lib/systemd/system/psacct.service; disabled; vendor preset: d> 
 +   Active: inactive (dead) 
 + 
 +[root@centos8 ~]# systemctl enable psacct 
 +Created symlink /etc/systemd/system/multi-user.target.wants/psacct.service → /usr/lib/systemd/system/psacct.service
 + 
 +[root@centos8 ~]systemctl start psacct 
 + 
 +[root@centos8 ~]# systemctl status psacct 
 +● psacct.service - Kernel process accounting 
 +   Loaded: loaded (/usr/lib/systemd/system/psacct.service; enabled; vendor preset: di> 
 +   Active: active (exited) since Sun 2022-11-13 09:35:16 CET; 4s ago 
 +  Process: 39765 ExecStart=/usr/sbin/accton /var/account/pacct (code=exited, status=0> 
 +  Process: 39763 ExecStartPre=/usr/libexec/psacct/accton-create (code=exited, status=> 
 + Main PID: 39765 (code=exited, status=0/SUCCESS) 
 + 
 +Nov 13 09:35:16 centos8.ittraining.loc systemd[1]: Starting Kernel process accounting> 
 +Nov 13 09:35:16 centos8.ittraining.loc accton[39765]: Turning on process accounting, > 
 +Nov 13 09:35:16 centos8.ittraining.loc systemd[1]: Started Kernel process accounting.
 </code> </code>
  
-Dernièrement vérifiez la resolution des noms :+Par contre le fichier **/var/account/pacct** ne peut pas être lu avec les utilitaires de consultation de fichiers texte :
  
 <code> <code>
-[root@centos8 ~]# ping www.free.fr +[root@centos8 ~]# cat /var/account/pacct 
-PING www.free.fr (212.27.48.1056(84) bytes of data. +#pcKaccton pcEusleep%$pcu,awk$pc-iksmtuned('pc6pgrep'&pc-`ksmtuned)&pc,Eksmtuned*&pcd,awk&pc-ksmtuned/.'pc`D$less.'pcDEsystemctl+pcEssleep107pcu,awk07pc-jksmtuned437pc6pgrep327pc-bksmtuned527pc,Gksmtuned627pcd,awk27pc-ksmtuned?9;pc2rpc-pipefs-gene=9;pc2nfs-server-geneA9;pcEsystemd-cryptseI9;pcEsystemd-system-G9;pcEsystemd-hibernaC9;pcEsystemd-fstab-gE:;pc(^readlinkM;;pc$dgrepJ<;pc?lvmconfigN@;pc&`selinuxenabled;9;pc?s+Hkdump-dep-gener<9;pc?k0lvm2-activation:9;pc?B+anaconda-generaH9;pc?Esystemd-rc-loca>9;pc?SIostree-system-gO@;pc$agrep@9;pc?B+selinux-autorelB9;pc?Esystemd-debug-gK9;pc?Esystemd-sysv-geL9;pc?Esystemd-veritysD9;pc?Esystemd-getty-gF9;pc?Esystemd-gpt-aut9;pc@OC(sd-executor)8;pc`AEsystemctlSDpc?,accton-createUDpcacctonUDpacctonRQDpc@Esystemd-tty-askQDpc@@EsystemctlTDpcEsystemd-cgroupsVDpcEsystemd-cgroupsZYIpc`C$lessYIpcaCE%systemctlǘpcGkworker/dying77pcEssleepdcspcu,awkcspc-iksmtunedgfspc6pgrepfespc-_ksmtunedhespc,Fksmtunediespcd,awkespc?-ksmtuned[root@centos8 ~]#
-64 bytes from www.free.fr (212.27.48.10): icmp_seq=1 ttl=47 time=29.3 ms +
-64 bytes from www.free.fr (212.27.48.10)icmp_seq=2 ttl=47 time=29.4 ms +
-64 bytes from www.free.fr (212.27.48.10)icmp_seq=3 ttl=47 time=29.4 ms +
-64 bytes from www.free.fr (212.27.48.10): icmp_seq=4 ttl=47 time=29.4 ms +
-^C +
---- www.free.fr ping statistics --- +
-4 packets transmitted4 received0% packet loss, time 3005ms +
-rtt min/avg/max/mdev = 29.266/29.377/29.428/0.183 ms+
 </code> </code>
  
-<WRAP center round important 60%> +La commande **dump-acct** permet de voir son contenu mais pas de l'exploiter :
-**Important** : Notez qu'il existe un front-end graphique en mode texte, **nmtui**, pour configurer NetworkManager. +
-</WRAP>+
  
-====1.3 - Ajouter une Deuxième Adresse IP à un Profil====+<code> 
 +[root@centos8 ~]# dump-acct /var/account/pacct 
 +accton          |v3|     0.00|     0.00|     1.00|     0|     0|  4360.00|     0.00|   39715|   37763|S    |       0|pts/  |Sun Nov 13 09:33:52 2022 
 +sleep           |v3|     0.00|     0.00|  6000.00|     0|     0|  7308.00|     0.00|   39712|    1022|           0|__      |Sun Nov 13 09:33:03 2022 
 +awk             |v3|     0.00|     0.00|     0.00|     0|     0| 25512.00|     0.00|   39717|   39716|           0|__      |Sun Nov 13 09:34:03 2022 
 +ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26632.00|     0.00|   39716|    1022| F         0|__      |Sun Nov 13 09:34:03 2022 
 +pgrep           |v3|     0.00|     0.00|     0.00|     0|     0| 45104.00|     0.00|   39720|   39719|           1|__      |Sun Nov 13 09:34:03 2022 
 +ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26632.00|     0.00|   39719|   39718| F         1|__      |Sun Nov 13 09:34:03 2022 
 +ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26112.00|     0.00|   39721|   39718| F         0|__      |Sun Nov 13 09:34:03 2022 
 +awk             |v3|     0.00|     0.00|     0.00|     0|     0| 25376.00|     0.00|   39722|   39718|           0|__      |Sun Nov 13 09:34:03 2022 
 +ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26632.00|     0.00|   39718|    1022| F         0|__      |Sun Nov 13 09:34:03 2022 
 +less            |v3|     0.00|     0.00|  1187.00|     0|     0|  9704.00|     0.00|   39727|   39726|S    |       0|pts/  |Sun Nov 13 09:34:47 2022 
 +systemctl       |v3|     0.00|     0.00|  1188.00|     0|     0| 93504.00|     0.00|   39726|   37763|S    |       3|pts/  |Sun Nov 13 09:34:47 2022 
 +sleep           |v3|     0.00|     0.00|  6000.00|     0|     0|  7308.00|     0.00|   39723|    1022|           0|__      |Sun Nov 13 09:34:03 2022 
 +awk             |v3|     0.00|     0.00|     0.00|     0|     0| 25512.00|     0.00|   39729|   39728|           0|__      |Sun Nov 13 09:35:03 2022 
 +ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26632.00|     0.00|   39728|    1022| F         0|__      |Sun Nov 13 09:35:03 2022 
 +pgrep           |v3|     0.00|     0.00|     0.00|     0|     0| 45104.00|     0.00|   39732|   39731|           1|__      |Sun Nov 13 09:35:03 2022 
 +ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26632.00|     0.00|   39731|   39730| F         1|__      |Sun Nov 13 09:35:03 2022 
 +ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26112.00|     0.00|   39733|   39730| F         0|__      |Sun Nov 13 09:35:03 2022 
 +awk             |v3|     0.00|     0.00|     0.00|     0|     0| 25376.00|     0.00|   39734|   39730|           0|__      |Sun Nov 13 09:35:03 2022 
 +ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26632.00|     0.00|   39730|    1022| F         0|__      |Sun Nov 13 09:35:03 2022 
 +rpc-pipefs-gene |v3|     0.00|     0.00|     0.00|     0|     0| 38752.00|     0.00|   39743|   39737|S    |       0|__      |Sun Nov 13 09:35:07 2022 
 +nfs-server-gene |v3|     0.00|     0.00|     0.00|     0|     0| 38880.00|     0.00|   39741|   39737|S    |       0|__      |Sun Nov 13 09:35:07 2022 
 +systemd-cryptse |v3|     0.00|     0.00|     0.00|     0|     0| 90368.00|     0.00|   39745|   39737|S    |       0|__      |Sun Nov 13 09:35:07 2022 
 +systemd-system- |v3|     0.00|     0.00|     0.00|     0|     0| 90368.00|     0.00|   39753|   39737|S    |       0|__      |Sun Nov 13 09:35:07 2022 
 +systemd-hiberna |v3|     0.00|     0.00|     0.00|     0|     0| 90368.00|     0.00|   39751|   39737|S    |       0|__      |Sun Nov 13 09:35:07 2022 
 +... 
 +</code>
  
-Pour ajouter une deuxième adresse IP à un profil sous RHEL/CentOS 8, il convient d'utiliser la commande suivante :+===Options de la commande=== 
 + 
 +Les options de cette commande sont :
  
 <code> <code>
-[root@centos8 ~]# nmcli connection mod ip_fixe +ipv4.addresses 192.168.1.2/24+[root@centos8 ~]# dump-acct --help 
 +Usage: dump-acct [-hrR] [-n <recs>] <files> 
 +          [--num <recs>] [--raw] [--reverse] [--help] 
 +          [--format <version>] [--byteswap] 
 +          [--ahz <freq>
 + 
 +The system's default process accounting file is /var/account/pacct.
 </code> </code>
  
-Rechargez la configuration du profil :+====1.10 - La Commande lastcomm==== 
 + 
 +Cette commande vous renseigne sur l'historique et les statistiques des commandes par utilisateur :
  
 <code> <code>
-[root@centos8 ~]# nmcli con up ip_fixe+[root@centos8 ~]# lastcomm 
 +bash              F    root     pts/     0.00 secs Sun Nov 13 09:41 
 +gdbus                X root     pts/     0.00 secs Sun Nov 13 09:41 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:41 
 +awk                    root     __         0.00 secs Sun Nov 13 09:41 
 +kworker/dying        root     __         0.00 secs Sun Nov 13 09:30 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:41 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:41 
 +pgrep                  root     __         0.00 secs Sun Nov 13 09:41 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:41 
 +awk                    root     __         0.00 secs Sun Nov 13 09:41 
 +sleep                  root     __         0.00 secs Sun Nov 13 09:40 
 +kworker/dying        root     __         0.00 secs Sun Nov 13 09:07 
 +kworker/dying        root     __         0.00 secs Sun Nov 13 09:35 
 +kworker/dying        root     __         0.00 secs Sun Nov 13 09:07 
 +dump-acct              root     pts/     0.00 secs Sun Nov 13 09:40 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:40 
 +awk                    root     __         0.00 secs Sun Nov 13 09:40 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:40 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:40 
 +pgrep                  root     __         0.00 secs Sun Nov 13 09:40 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:40 
 +awk                    root     __         0.00 secs Sun Nov 13 09:40 
 +sleep                  root     __         0.00 secs Sun Nov 13 09:39 
 +dump-acct              root     pts/     0.00 secs Sun Nov 13 09:39 
 +man                    root     pts/     0.01 secs Sun Nov 13 09:38 
 +less                   root     pts/     0.00 secs Sun Nov 13 09:38 
 +kworker/dying        root     __         0.00 secs Sat Nov 12 19:37 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:39 
 +awk                    root     __         0.00 secs Sun Nov 13 09:39 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:39 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:39 
 +pgrep                  root     __         0.00 secs Sun Nov 13 09:39 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:39 
 +awk                    root     __         0.00 secs Sun Nov 13 09:39 
 +sleep                  root     __         0.00 secs Sun Nov 13 09:38 
 +man                  root     pts/     0.00 secs Sun Nov 13 09:38 
 +nroff                  root     pts/     0.00 secs Sun Nov 13 09:38 
 +groff                  root     pts/     0.00 secs Sun Nov 13 09:38 
 +grotty                 root     pts/     0.00 secs Sun Nov 13 09:38 
 +troff                  root     pts/     0.00 secs Sun Nov 13 09:38 
 +nroff                root     pts/     0.00 secs Sun Nov 13 09:38 
 +locale                 root     pts/     0.00 secs Sun Nov 13 09:38 
 +tbl                    root     pts/     0.00 secs Sun Nov 13 09:38 
 +preconv                root     pts/     0.00 secs Sun Nov 13 09:38 
 +man                  root     pts/     0.00 secs Sun Nov 13 09:38 
 +man                  root     pts/     0.00 secs Sun Nov 13 09:38 
 +man                  root     pts/     0.00 secs Sun Nov 13 09:38 
 +man                  root     pts/     0.00 secs Sun Nov 13 09:38 
 +man                  root     pts/     0.00 secs Sun Nov 13 09:38 
 +man                  root     pts/     0.00 secs Sun Nov 13 09:38 
 +man                  root     pts/     0.00 secs Sun Nov 13 09:38 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:38 
 +awk                    root     __         0.00 secs Sun Nov 13 09:38 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:38 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:38 
 +pgrep                  root     __         0.00 secs Sun Nov 13 09:38 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:38 
 +awk                    root     __         0.00 secs Sun Nov 13 09:38 
 +sleep                  root     __         0.00 secs Sun Nov 13 09:37 
 +dump-acct              root     pts/     0.00 secs Sun Nov 13 09:37 
 +kworker/dying        root     __         0.00 secs Sun Nov 13 09:05 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:37 
 +awk                    root     __         0.00 secs Sun Nov 13 09:37 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:37 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:37 
 +pgrep                  root     __         0.00 secs Sun Nov 13 09:37 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:37 
 +awk                    root     __         0.00 secs Sun Nov 13 09:37 
 +sleep                  root     __         0.00 secs Sun Nov 13 09:36 
 +cat                    root     pts/     0.00 secs Sun Nov 13 09:36 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:36 
 +awk                    root     __         0.00 secs Sun Nov 13 09:36 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:36 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:36 
 +pgrep                  root     __         0.00 secs Sun Nov 13 09:36 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:36 
 +awk                    root     __         0.00 secs Sun Nov 13 09:36 
 +sleep                  root     __         0.00 secs Sun Nov 13 09:35 
 +kworker/dying        root     __         0.00 secs Sun Nov 13 09:19 
 +systemctl        S     root     pts/     0.00 secs Sun Nov 13 09:35 
 +less                 root     pts/     0.00 secs Sun Nov 13 09:35 
 +systemd-cgroups        root     __         0.00 secs Sun Nov 13 09:35 
 +systemd-cgroups        root     __         0.00 secs Sun Nov 13 09:35 
 +systemctl        S     root     pts/     0.00 secs Sun Nov 13 09:35 
 +systemd-tty-ask  S     root     pts/     0.00 secs Sun Nov 13 09:35 
 +accton               root     __         0.00 secs Sun Nov 13 09:35 
 +accton                 root     __         0.00 secs Sun Nov 13 09:35 
 +accton-create    S     root     __         0.00 secs Sun Nov 13 09:35 
 +systemctl        S     root     pts/     0.00 secs Sun Nov 13 09:35 
 +(sd-executor)    SF    root     __         0.00 secs Sun Nov 13 09:35 
 +systemd-gpt-aut  S     root     __         0.00 secs Sun Nov 13 09:35 
 +systemd-getty-g  S     root     __         0.00 secs Sun Nov 13 09:35 
 +systemd-veritys  S     root     __         0.00 secs Sun Nov 13 09:35 
 +systemd-sysv-ge  S     root     __         0.00 secs Sun Nov 13 09:35 
 +systemd-debug-g  S     root     __         0.00 secs Sun Nov 13 09:35 
 +selinux-autorel  S     root     __         0.00 secs Sun Nov 13 09:35 
 +grep                   root     __         0.00 secs Sun Nov 13 09:35 
 +ostree-system-g  S     root     __         0.01 secs Sun Nov 13 09:35 
 +systemd-rc-loca  S     root     __         0.00 secs Sun Nov 13 09:35 
 +anaconda-genera  S     root     __         0.00 secs Sun Nov 13 09:35 
 +lvm2-activation  S     root     __         0.00 secs Sun Nov 13 09:35 
 +kdump-dep-gener  S     root     __         0.00 secs Sun Nov 13 09:35 
 +selinuxenabled         root     __         0.00 secs Sun Nov 13 09:35 
 +lvmconfig              root     __         0.00 secs Sun Nov 13 09:35 
 +grep                   root     __         0.00 secs Sun Nov 13 09:35 
 +readlink               root     __         0.00 secs Sun Nov 13 09:35 
 +systemd-fstab-g  S     root     __         0.00 secs Sun Nov 13 09:35 
 +systemd-hiberna  S     root     __         0.00 secs Sun Nov 13 09:35 
 +systemd-system-  S     root     __         0.00 secs Sun Nov 13 09:35 
 +systemd-cryptse  S     root     __         0.00 secs Sun Nov 13 09:35 
 +nfs-server-gene  S     root     __         0.00 secs Sun Nov 13 09:35 
 +rpc-pipefs-gene  S     root     __         0.00 secs Sun Nov 13 09:35 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:35 
 +awk                    root     __         0.00 secs Sun Nov 13 09:35 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:35 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:35 
 +pgrep                  root     __         0.00 secs Sun Nov 13 09:35 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:35 
 +awk                    root     __         0.00 secs Sun Nov 13 09:35 
 +sleep                  root     __         0.00 secs Sun Nov 13 09:34 
 +systemctl        S     root     pts/     0.00 secs Sun Nov 13 09:34 
 +less                 root     pts/     0.00 secs Sun Nov 13 09:34 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:34 
 +awk                    root     __         0.00 secs Sun Nov 13 09:34 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:34 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:34 
 +pgrep                  root     __         0.00 secs Sun Nov 13 09:34 
 +ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:34 
 +awk                    root     __         0.00 secs Sun Nov 13 09:34 
 +sleep                  root     __         0.00 secs Sun Nov 13 09:33 
 +accton               root     pts/     0.00 secs Sun Nov 13 09:33 
 + 
 +[root@centos8 ~]# lastcomm grep 
 +grep                   root     pts/     0.00 secs Sun Nov 13 09:46 
 +grep                   root     pts/     0.00 secs Sun Nov 13 09:45 
 +grep                   root     __         0.00 secs Sun Nov 13 09:35 
 +grep                   root     __         0.00 secs Sun Nov 13 09:35
 </code> </code>
  
-Saisissez ensuite la commande suivante :+===Options de la commande=== 
 + 
 +Les options de cette commande sont :
  
 <code> <code>
-[root@centos8 ~]# nmcli connection show ip_fixe +[root@centos8 ~]# lastcomm --help 
-connection.id:                          ip_fixe +Usagelastcomm [-hpV] [-f file] [command] ... [user] ... [terminal] ... 
-connection.uuid:                        0f48c74d-5d16-4c37-8220-24644507b589 +       [--forwards] [--file <file>] [--strict-match] [--print-controls] 
-connection.stable-id                  -- +       [--user <name>] [--tty <name>] [--command <name>] [--debug] 
-connection.type:                        802-3-ethernet +       [--show-paging] [--pid] [--ahz <freq>] [--version] [--help] 
-connection.interface-name:              ens18 + 
-connection.autoconnect:                 yes +The system'default process accounting file is /var/account/pacct.
-connection.autoconnect-priority:        0 +
-connection.autoconnect-retries:         -1 (default) +
-connection.multi-connect:               0 (default) +
-connection.auth-retries:                -1 +
-connection.timestamp:                   1630225792 +
-connection.read-only:                   no +
-connection.permissions:                 -- +
-connection.zone:                        -- +
-connection.master:                      -- +
-connection.slave-type:                  -- +
-connection.autoconnect-slaves:          -1 (default) +
-connection.secondaries:                 -- +
-connection.gateway-ping-timeout:        0 +
-connection.metered:                     unknown +
-connection.lldp:                        default +
-connection.mdns:                        -1 (default) +
-connection.llmnr:                       -1 (default) +
-connection.wait-device-timeout:         -1 +
-802-3-ethernet.port:                    -- +
-802-3-ethernet.speed:                   0 +
-802-3-ethernet.duplex:                  -- +
-802-3-ethernet.auto-negotiate:          no +
-802-3-ethernet.mac-address:             -- +
-802-3-ethernet.cloned-mac-address:      -- +
-802-3-ethernet.generate-mac-address-mask:-- +
-802-3-ethernet.mac-address-blacklist:   -- +
-802-3-ethernet.mtu:                     auto +
-802-3-ethernet.s390-subchannels:        -- +
-802-3-ethernet.s390-nettype:            -- +
-802-3-ethernet.s390-options:            -- +
-802-3-ethernet.wake-on-lan:             default +
-802-3-ethernet.wake-on-lan-password:    -- +
-ipv4.method:                            manual +
-ipv4.dns:                               8.8.8.8 +
-ipv4.dns-search:                        -- +
-ipv4.dns-options:                       -- +
-ipv4.dns-priority:                      0 +
-ipv4.addresses:                         10.0.2.46/24, 192.168.1.2/24 +
-ipv4.gateway:                           10.0.2.1 +
-ipv4.routes:                            -- +
-ipv4.route-metric:                      -1 +
-ipv4.route-table:                       0 (unspec) +
-ipv4.routing-rules:                     -- +
-ipv4.ignore-auto-routes:                no +
-ipv4.ignore-auto-dns:                   no +
-ipv4.dhcp-client-id:                    -- +
-ipv4.dhcp-iaid:                         -- +
-ipv4.dhcp-timeout:                      0 (default) +
-ipv4.dhcp-send-hostname:                yes +
-ipv4.dhcp-hostname:                     -- +
-ipv4.dhcp-fqdn:                         -- +
-ipv4.dhcp-hostname-flags:               0x0 (none) +
-ipv4.never-default:                     no +
-ipv4.may-fail:                          yes +
-ipv4.dad-timeout:                       -1 (default) +
-ipv4.dhcp-vendor-class-identifier:      -- +
-ipv4.dhcp-reject-servers:               -- +
-ipv6.method:                            auto +
-ipv6.dns:                               -- +
-ipv6.dns-search:                        -- +
-ipv6.dns-options:                       -- +
-ipv6.dns-priority:                      0 +
-ipv6.addresses:                         -- +
-ipv6.gateway:                           -- +
-ipv6.routes:                            -- +
-ipv6.route-metric:                      -1 +
-ipv6.route-table:                       0 (unspec) +
-ipv6.routing-rules:                     -- +
-ipv6.ignore-auto-routes:                no +
-ipv6.ignore-auto-dns:                   no +
-ipv6.never-default:                     no +
-ipv6.may-fail:                          yes +
-ipv6.ip6-privacy:                       -1 (unknown) +
-ipv6.addr-gen-mode:                     stable-privacy +
-ipv6.ra-timeout:                        0 (default) +
-ipv6.dhcp-duid:                         -- +
-ipv6.dhcp-iaid:                         -- +
-ipv6.dhcp-timeout:                      0 (default) +
-ipv6.dhcp-send-hostname:                yes +
-ipv6.dhcp-hostname:                     -- +
-ipv6.dhcp-hostname-flags:               0x0 (none) +
-ipv6.token:                             -- +
-proxy.method:                           none +
-proxy.browser-only:                     no +
-proxy.pac-url:                          -- +
-proxy.pac-script:                       -- +
-GENERAL.NAME:                           ip_fixe +
-GENERAL.UUID:                           0f48c74d-5d16-4c37-8220-24644507b589 +
-GENERAL.DEVICES:                        ens18 +
-GENERAL.IP-IFACE:                       ens18 +
-GENERAL.STATE:                          activated +
-GENERAL.DEFAULT:                        yes +
-GENERAL.DEFAULT6:                       no +
-GENERAL.SPEC-OBJECT:                    -- +
-GENERAL.VPN:                            no +
-GENERAL.DBUS-PATH:                      /org/freedesktop/NetworkManager/ActiveConnection/+
-GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/Settings/+
-GENERAL.ZONE:                           -- +
-GENERAL.MASTER-PATH:                    -- +
-IP4.ADDRESS[1]:                         10.0.2.46/24 +
-IP4.ADDRESS[2]:                         192.168.1.2/24 +
-IP4.GATEWAY:                            10.0.2.1 +
-IP4.ROUTE[1]:                           dst = 10.0.2.0/24, nh = 0.0.0.0, mt = 100 +
-IP4.ROUTE[2]:                           dst = 192.168.1.0/24, nh = 0.0.0.0, mt = 100 +
-IP4.ROUTE[3]:                           dst = 0.0.0.0/0, nh = 10.0.2.1, mt = 100 +
-IP4.DNS[1]:                             8.8.8.8 +
-IP6.ADDRESS[1]:                         fe80::5223:aee1:998e:9f27/64 +
-IP6.GATEWAY:                            -- +
-IP6.ROUTE[1]:                           dst = fe80::/64, nh = ::, mt = 100 +
-IP6.ROUTE[2]:                           dst = ff00::/8, nh = ::, mt = 256, table=255 +
-lines 72-116/116 (END) +
-[q]+
 </code> </code>
  
-<WRAP center round important 60%> +====1.11 - La Commande sa====
-**Important** : Notez l'ajout de l'adresse secondaire à la ligne **ipv4.addresses: ** ainsi que l'ajout de la ligne **IP4.ADDRESS[2]:**. +
-</WRAP>+
  
-Consultez maintenant le contenu du fichier **/etc/sysconfig/network-scripts/ifcfg-ip_fixe** :+Cette commande vous renseigne sur les statistiques sur les processus lancés et leurs ressources systèmes:
  
 <code> <code>
-[root@centos8 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ip_fixe +[root@centos8 ~]# sa -u | egrep "root" 
-TYPE=Ethernet +root       0.00 cpu     1090k mem      0 io accton           
-PROXY_METHOD=none +root       0.00 cpu     1827k mem      0 io sleep            
-BROWSER_ONLY=no +root       0.00 cpu     6378k mem      0 io awk              
-BOOTPROTO=none +root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-IPADDR=10.0.2.46 +root       0.00 cpu    11276k mem      0 io pgrep            
-PREFIX=24 +root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-GATEWAY=10.0.2.1 +root       0.00 cpu     6528k mem      0 io ksmtuned        * 
-DEFROUTE=yes +root       0.00 cpu     6344k mem      0 io awk              
-IPV4_FAILURE_FATAL=no +root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-IPV6INIT=yes +root       0.00 cpu     2426k mem      0 io less             
-IPV6_AUTOCONF=yes +root       0.00 cpu    23376k mem      0 io systemctl        
-IPV6_DEFROUTE=yes +root       0.00 cpu     1827k mem      0 io sleep            
-IPV6_FAILURE_FATAL=no +root       0.00 cpu     6378k mem      0 io awk              
-IPV6_ADDR_GEN_MODE=stable-privacy +root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-NAME=ip_fixe +root       0.00 cpu    11276k mem      0 io pgrep            
-UUID=0f48c74d-5d16-4c37-8220-24644507b589 +root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-DEVICE=ens18 +root       0.00 cpu     6528k mem      0 io ksmtuned        * 
-ONBOOT=yes +root       0.00 cpu     6344k mem      0 io awk              
-DNS1=8.8.8.8 +root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-IPADDR1=192.168.1.2 +root       0.00 cpu     9688k mem      0 io rpc-pipefs-gene  
-PREFIX1=24+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/dying   * 
 +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/dying   * 
 +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/dying   * 
 +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/dying   * 
 +root       0.00 cpu        0k mem      0 io kworker/dying   * 
 +root       0.00 cpu        0k mem      0 io kworker/dying   * 
 +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/dying   * 
 +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/dying   * 
 +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/dying   *
 </code> </code>
  
-<WRAP center round important 60%> +===Options de la commande===
-**Important** : Notez l'ajout de la ligne **IPADDR1=192.168.1.2**. +
-</WRAP>+
  
-====1.4 - La Commande hostname====+Les options de cette commande sont :
  
-La procédure de la modification du hostname est simplifiée et sa prise en compte est immédiate :+<code> 
 +[root@centos8 ~]# sa --help 
 + 
 +                Usage: sa [ options ] [ file ] 
 +                 
 +                options: [-abcdfiljkmnprstuDKP] [-v <num>] [--version] [--help] 
 +                [--other-acct-file <name>] [--other-usracct-file <name>
 +                [--print-seconds] [--dont-read-summary-files] [--debug] 
 +                 [--separate-times] [--other-savacct-file <name>] [--percentages] 
 +                 [--print-ratio] [--print-users] [--merge] [--user-summary] [--group-summary] 
 +                [--list-all-names] [--not-interactive] [--threshold <num>
 +                 [--sort-ksec] [--sort-tio] [--sort-sys-user-div-calls] [--sort-avio] 
 +                 [--sort-cpu-avmem] [--sort-num-calls] [--sort-real-time] [--ahz hz] 
 +       [--show-paging] [--show-paging-avg] 
 + 
 +The system's default process accounting files are: 
 + 
 +  raw process accounting data: /var/account/pacct 
 +      summary by command name: /var/account/savacct 
 +          summary by username: /var/account/usracct 
 +</code> 
 + 
 +====1.12 - La Commande ac==== 
 + 
 +Cette commande vous renseigne sur les statistiques des temps de connexion des utilisateurs :
  
 <code> <code>
-[root@centos8 ~]# hostname +[root@centos8 ~]# ac -p 
-centos8.ittraining.loc+        trainee                            247.51 
 +        total      247.51
  
-[root@centos8 ~]# nmcli general hostname centos.ittraining.loc+[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   total        9.23 
 +</code>
  
-[root@centos8 ~]# cat /etc/hostname +===Options de la commande===
-centos.ittraining.loc+
  
-[root@centos8 ~]# hostname +Les options de cette commande sont : 
-centos.ittraining.loc+ 
 +<code> 
 +[root@centos8 ~]# ac --help
  
-[root@centos8 ~]# nmcli general hostname centos8.ittraining.loc+Usage: ac [OPTION] ...
  
-[root@centos8 ~]# cat /etc/hostname +OPTIONS: 
-centos8.ittraining.loc+  -d, --daily-totals        Print totals for each day 
 +  -p, --individual-totals   Print time totals for each user 
 +  -f, --file <file>         Read from <file> 
 +  --complain                Print errors for whatever problem 
 +  --reboots                 Count the time between login and reboot 
 +  --supplants               Count the time between logins on the terminal 
 +  --timewarps               Count the time between login and time warp 
 +  --compatibility           Shortcut for --reboots --supplants --timewarps 
 +  -a, --all-days            Do not skip days without login activity 
 +  --tw-leniency <value>     Set the time warp leniency <value> in seconds 
 +  --tw-suspicious <value>   Set the time warp suspicious <value> in seconds 
 +  --print-year              Print year when displaying dates 
 +  --print-zeros             Don't suppress zeros in category totals 
 +  --debug                   Print verbose internal information 
 +  -V, --version             Show version and exit 
 +  -h, --help                Show help and exit
  
-[root@centos8 ~]# hostname +The system's default login accounting file is /var/log/wtmp.
-centos8.ittraining.loc+
 </code> </code>
  
-====1.5 - La Commande ip====+=====LAB #2 - La commande sysctl=====
  
-Sous RHEL/CentOS 8 la commande **ip** est préférée par rapport à la commande ifconfig :+====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.
  
 <code> <code>
-[root@centos8 ~]# ip address +[root@centos8 ~]# ls /proc 
-1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 +     16391  19    2212  2427  2622  431   59    84    999          mdstat 
-    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 +10     16476  1931  2215  2428  2659  432       842   acpi         meminfo 
-    inet 127.0.0.1/8 scope host lo +1007   16534  1956  2222  2431  2667  433   60    8465  buddyinfo    misc 
-       valid_lft forever preferred_lft forever +11     16576  1960  2226  2432  2686  434   61    866   bus          modules 
-    inet6 ::1/128 scope host  +11805  16593      2230  2435  27    435   63    867   cgroups      mounts 
-       valid_lft forever preferred_lft forever +12     16598  20    2237  2439  28    436   64    868   cmdline      mtrr 
-2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 +1219   16600  2007  2238  244   29    437   65    869   consoles     net 
-    link/ether 4e:b1:31:bd:5d:b2 brd ff:ff:ff:ff:ff:ff +1228   16613  2029  2241  2443  3     44    6568  87    cpuinfo      pagetypeinfo 
-    inet 10.0.2.46/24 brd 10.0.2.255 scope global noprefixroute ens18 +1232   16646  203   2244  2445  31    446   66    870   crypto       partitions 
-       valid_lft forever preferred_lft forever +1234   16673  2034  2247  2449  32    45    67    871   devices      sched_debug 
-    inet 192.168.1.2/24 brd 192.168.1.255 scope global noprefixroute ens18 +1235   16677  2037  2260  2451  33    46    674   872   diskstats    schedstat 
-       valid_lft forever preferred_lft forever +1247   16711  2054  2262  2465  34    47    68    874   dma          scsi 
-    inet6 fe80::5223:aee1:998e:9f27/64 scope link noprefixroute  +13     16712  2062  2267  2472  35    4790  69    875   driver       self 
-       valid_lft forever preferred_lft forever +1307   16729  21    2268  2473  37    49    70    878   execdomains  slabinfo 
-3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000 +1339   16742  210   2274  2474  38    50    701   879   fb           softirqs 
-    link/ether 52:54:00:79:02:66 brd ff:ff:ff:ff:ff:ff +1356   17     2118  2275  2475  39    5076  71    880   filesystems  stat 
-    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0 +14     1764   2121  2280  2476  4     51    714   884   fs           swaps 
-       valid_lft forever preferred_lft forever +1441   180    2124  2287  2478  40    52    72    887   interrupts   sys 
-4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000 +1443   181    2126  2292  2481  402   53    73    9     iomem        sysrq-trigger 
-    link/ether 52:54:00:79:02:66 brd ff:ff:ff:ff:ff:ff+1444   1817   2156  23    2484  41    532   74    901   ioports      sysvipc 
 +1446   182    2160  2302  25    419   539   75    903   irq          thread-self 
 +14977  1828   2164  2307  2536  420   55    76    9144  kallsyms     timer_list 
 +15     1829   2165  2310  2539  421   568       916   kcore        tty 
 +15067  183    2167  2330  2571  422   569   808   918   keys         uptime 
 +1536   1845   2169  2332  2578  423   570   809   919   key-users    version 
 +1553   185    2177  2349  2579  425   571   81    921   kmsg         vmallocinfo 
 +15594  186    2187  2358  259   426   572   833   969   kpagecgroup  vmstat 
 +15735  187    2190  2373  2593  427   573   835   986   kpagecount   zoneinfo 
 +16     1880   2194  2384  26    428   574   837   989   kpageflags 
 +16165  1883   22    239   2602  43    575   838   990   loadavg 
 +16167  1888   2204  241   2608  430   576   839   993   locks
 </code> </code>
  
-===Options de la Commande ip===+===Fichiers===
  
-Les options de cette commande sont :+==Processeur==
  
 <code> <code>
-[root@centos8 ~]# ip --help +[root@centos8 ~]# cat /proc/cpuinfo 
-Usageip [ OPTIONS ] OBJECT { COMMAND | help } +processor       0 
-       ip [ -force ] -batch filename +vendor_id       : GenuineIntel 
-where  OBJECT := { link | address | addrlabel | route | rule | neigh | ntable | +cpu family      15 
-                   tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm | +model           : 6 
-                   netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila | +model name      : Common KVM processor 
-                   vrf | sr | nexthop | mptcp } +stepping        : 1 
-       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] | +microcode       : 0x1 
-                    -h[uman-readable] | -iec | -j[son] | -p[retty] | +cpu MHz         : 1999.987 
-                    -f[amily] { inet | inet6 | mpls | bridge | link } | +cache size      : 16384 KB 
-                    -| -6 | -I | -D | -M | -B | -| +physical id     : 0 
-                    -l[oops] { maximum-addr-flush-attempts } | -br[ief] | +siblings        : 4 
-                    -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] | +core id         : 
-                    -rc[vbuf] [size] | -n[etns] name | -N[umeric] | -a[ll] | +cpu cores       : 4 
-                    -c[olor]}+apicid          : 0 
 +initial apicid  : 0 
 +fpu             : yes 
 +fpu_exception   : yes 
 +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        : 3999.97 
 +clflush size    : 64 
 +cache_alignment : 128 
 +address sizes   : 40 bits physical, 48 bits virtual 
 +power management:
  
-</code>+processor       : 1 
 +vendor_id       : GenuineIntel 
 +cpu family      : 15 
 +model           : 6 
 +model name      : Common KVM processor 
 +stepping        : 1 
 +microcode       : 0x1 
 +cpu MHz         : 1999.987 
 +cache size      : 16384 KB 
 +physical id     : 0 
 +siblings        : 4 
 +core id         : 1 
 +cpu cores       : 4 
 +apicid          : 1 
 +initial apicid  : 1 
 +fpu             : yes 
 +fpu_exception   : yes 
 +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        : 3999.97 
 +clflush size    : 64 
 +cache_alignment : 128 
 +address sizes   : 40 bits physical, 48 bits virtual 
 +power management:
  
-====1.6 - Activer/Désactiver une Interface Manuellement====+processor       : 2 
 +vendor_id       : GenuineIntel 
 +cpu family      : 15 
 +model           : 6 
 +model name      : Common KVM processor 
 +stepping        : 1 
 +microcode       : 0x1 
 +cpu MHz         : 1999.987 
 +cache size      : 16384 KB 
 +physical id     : 0 
 +siblings        : 4 
 +core id         : 2 
 +cpu cores       : 4 
 +apicid          : 2 
 +initial apicid  : 2 
 +fpu             : yes 
 +fpu_exception   : yes 
 +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        : 3999.97 
 +clflush size    : 64 
 +cache_alignment : 128 
 +address sizes   : 40 bits physical, 48 bits virtual 
 +power management:
  
-Deux commandes existent pour désactiver et activer manuellement une interface réseau :+processor       
 +vendor_id       : GenuineIntel 
 +cpu family      : 15 
 +model           : 6 
 +model name      : Common KVM processor 
 +stepping        : 1 
 +microcode       : 0x1 
 +cpu MHz         : 1999.987 
 +cache size      : 16384 KB 
 +physical id     : 0 
 +siblings        : 4 
 +core id         : 3 
 +cpu cores       : 4 
 +apicid          : 3 
 +initial apicid  : 3 
 +fpu             : yes 
 +fpu_exception   : yes 
 +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        : 3999.97 
 +clflush size    : 64 
 +cache_alignment : 128 
 +address sizes   : 40 bits physical, 48 bits virtual 
 +power management: 
 + 
 +processor       : 4 
 +vendor_id       : GenuineIntel 
 +cpu family      : 15 
 +model           : 6 
 +model name      : Common KVM processor 
 +stepping        : 1 
 +microcode       : 0x1 
 +cpu MHz         : 1999.987 
 +cache size      : 16384 KB 
 +physical id     : 1 
 +siblings        : 4 
 +core id         : 0 
 +cpu cores       : 4 
 +apicid          : 4 
 +initial apicid  : 4 
 +fpu             : yes 
 +fpu_exception   : yes 
 +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        : 3999.97 
 +clflush size    : 64 
 +cache_alignment : 128 
 +address sizes   : 40 bits physical, 48 bits virtual 
 +power management: 
 + 
 +processor       : 5 
 +vendor_id       : GenuineIntel 
 +cpu family      : 15 
 +model           : 6 
 +model name      : Common KVM processor 
 +stepping        : 1 
 +microcode       : 0x1 
 +cpu MHz         : 1999.987 
 +cache size      : 16384 KB 
 +physical id     : 1 
 +siblings        : 4 
 +core id         : 1 
 +cpu cores       : 4 
 +apicid          : 5 
 +initial apicid  : 5 
 +fpu             : yes 
 +fpu_exception   : yes 
 +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        : 3999.97 
 +clflush size    : 64 
 +cache_alignment : 128 
 +address sizes   : 40 bits physical, 48 bits virtual 
 +power management: 
 + 
 +processor       : 6 
 +vendor_id       : GenuineIntel 
 +cpu family      : 15 
 +model           : 6 
 +model name      : Common KVM processor 
 +stepping        : 1 
 +microcode       : 0x1 
 +cpu MHz         : 1999.987 
 +cache size      : 16384 KB 
 +physical id     : 1 
 +siblings        : 4 
 +core id         : 2 
 +cpu cores       : 4 
 +apicid          : 6 
 +initial apicid  : 6 
 +fpu             : yes 
 +fpu_exception   : yes 
 +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        : 3999.97 
 +clflush size    : 64 
 +cache_alignment : 128 
 +address sizes   : 40 bits physical, 48 bits virtual 
 +power management: 
 + 
 +processor       : 7 
 +vendor_id       : GenuineIntel 
 +cpu family      : 15 
 +model           : 6 
 +model name      : Common KVM processor 
 +stepping        : 1 
 +microcode       : 0x1 
 +cpu MHz         : 1999.987 
 +cache size      : 16384 KB 
 +physical id     : 1 
 +siblings        : 4 
 +core id         : 3 
 +cpu cores       : 4 
 +apicid          : 7 
 +initial apicid  : 7 
 +fpu             : yes 
 +fpu_exception   : yes 
 +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        : 3999.97 
 +clflush size    : 64 
 +cache_alignment : 128 
 +address sizes   : 40 bits physical, 48 bits virtual 
 +power management: 
 +</code> 
 + 
 +==Interruptions système==
  
 <code> <code>
-nmcli device disconnect enp0s3 +[root@centos8 ~]cat /proc/interrupts 
-# nmcli device connect enp0s3+           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       CPU6       CPU7        
 +  0:        109          0          0          0          0          0          0          0   IO-APIC   2-edge      timer 
 +  1:          0          0          0          0          9          0          0          0   IO-APIC   1-edge      i8042 
 +  8:          0          0          0          0          0          1          0          0   IO-APIC   8-edge      rtc0 
 +  9:          0          0          0          0          0          0          0          0   IO-APIC   9-fasteoi   acpi 
 + 10:          0          0          0          0      47098          0          0          0   IO-APIC  10-fasteoi   virtio0 
 + 11:          0          0         31          0          0          0          0          0   IO-APIC  11-fasteoi   uhci_hcd:usb1 
 + 12:          0          0          0         15          0          0          0          0   IO-APIC  12-edge      i8042 
 + 14:          0          0          0          0          0          0          0          0   IO-APIC  14-edge      ata_piix 
 + 15:       7376          0        144          0          0          0          0      84588   IO-APIC  15-edge      ata_piix 
 + 24:          0          0          0          0          0          0          0          0   PCI-MSI 294912-edge      virtio1-config 
 + 25:          0          0          0          0          0       5640          0         16   PCI-MSI 294913-edge      virtio1-input.0 
 + 26:         36          0          0       5058          0          0          0          0   PCI-MSI 294914-edge      virtio1-output.0 
 + 27:          0      16008          0       9431          0          0          0          0   PCI-MSI 114688-edge      ahci[0000:00:07.0] 
 +NMI:          0          0          0          0          0          0          0          0   Non-maskable interrupts 
 +LOC:     870537     771900    1117711     288839     833717     502365     758229     405110   Local timer interrupts 
 +SPU:          0          0          0          0          0          0          0          0   Spurious interrupts 
 +PMI:          0          0          0          0          0          0          0          0   Performance monitoring interrupts 
 +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:     178171      67749      43116      65994      71361     118585      54139      53452   Rescheduling interrupts 
 +CAL:      11095      11007      10841      10343      14679       9998      12165      12443   Function call interrupts 
 +TLB:       2295       2297       2000       1728       2330       2338       1991       1861   TLB shootdowns 
 +TRM:          0          0          0          0          0          0          0          0   Thermal event interrupts 
 +THR:          0          0          0          0          0          0          0          0   Threshold APIC interrupts 
 +DFR:          0          0          0          0          0          0          0          0   Deferred Error APIC interrupts 
 +MCE:          0          0          0          0          0          0          0          0   Machine check exceptions 
 +MCP:        288        288        288        288        288        288        288        288   Machine check polls 
 +HYP:          0          0          0          0          0          0          0          0   Hypervisor callback interrupts 
 +HRE:          0          0          0          0          0          0          0          0   Hyper-V reenlightenment interrupts 
 +HVS:          0          0          0          0          0          0          0          0   Hyper-V stimer0 interrupts 
 +ERR:          0 
 +MIS:          0 
 +PIN:          0          0          0          0          0          0          0          0   Posted-interrupt notification event 
 +NPI:          0          0          0          0          0          0          0          0   Nested posted-interrupt event 
 +PIW:          0          0          0          0          0          0          0          0   Posted-interrupt wakeup event
 </code> </code>
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** : Veuillez ne **PAS** exécuter ces deux commandes+**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'attribution d'un IRQ à un périphérique doit être exclusive. Dans le cas où deux périphériques demandent un service en même temps, c'est le périphérique ayant l'IRQ le plus bas qui est prioritaire
-</WRAP>+</WRAP> 
  
-====1.7 - Routage Statique====+==Canaux DMA==
  
-===La commande ip===+<code> 
 +[root@centos8 ~]# cat /proc/dma 
 + 4: cascade 
 +</code>
  
-Sous RHEL/CentOS 8, pour supprimer la route vers le réseau 192.168.1.0 il convient d'utiliser la commande ip et non pas la commande route :+==Plages d'entrée/sortie==
  
 <code> <code>
-[root@centos8 ~]# ip route +root@centos8 ~]# cat /proc/ioports | more 
-default via 10.0.2.1 dev ens18 proto static metric 100  +0000-0cf7 : PCI Bus 0000:00 
-10.0.2.0/24 dev ens18 proto kernel scope link src 10.0.2.46 metric 100  +  0000-001f : dma1 
-192.168.1.0/24 dev ens18 proto kernel scope link src 192.168.1.2 metric 100  +  0020-0021 : pic1 
-192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown+  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:00:01.
 +    0170-0177 : ata_piix 
 +  01f0-01f7 : 0000:00:01.
 +    01f0-01f7 : ata_piix 
 +  0376-0376 : 0000:00:01.1 
 +    0376-0376 : ata_piix 
 +  03c0-03df : vga+ 
 +  03f6-03f6 : 0000:00:01.
 +    03f6-03f6 : ata_piix 
 +--More-- 
 +</code> 
 + 
 +<WRAP center round alert 60%> 
 +**Important** - Si deux périphériques ont le même port, les **deux** périphériques seront inutilisables. 
 +</WRAP> 
 + 
 +==Périphériques== 
 + 
 +<code> 
 +[root@centos8 ~]# cat /proc/devices 
 +Character devices: 
 +  mem 
 +  4 /dev/vc/0 
 +  4 tty 
 +  4 ttyS 
 +  5 /dev/tty 
 +  /dev/console 
 +  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
  
-root@centos8 ~]# ip route del 192.168.1.0/24 via 0.0.0.0 +Block devices: 
-[root@centos8 ~]# ip route +  8 sd 
-default via 10.0.2.1 dev ens18 proto static metric 100  +  9 md 
-10.0.2.0/24 dev ens18 proto kernel scope link src 10.0.2.46 metric 100  + 11 sr 
-192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown + 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
 </code> </code>
  
-Pour ajouter la route vers le réseau 192.168.1.0 :+==Modules==
  
 <code> <code>
-[root@centos8 ~]# ip route add 192.168.1.0/24 via 10.0.2.+[root@centos8 ~]# cat /proc/modules | more 
-[root@centos8 ~]# ip route +xt_CHECKSUM 16384 - Live 0xffffffffc09a8000 
-default via 10.0.2.dev ens18 proto static metric 100  +ipt_MASQUERADE 16384 3 - Live 0xffffffffc09a3000 
-10.0.2.0/24 dev ens18 proto kernel scope link src 10.0.2.46 metric 100  +xt_conntrack 16384 - Live 0xffffffffc099e000 
-192.168.1.0/24 via 10.0.2.dev ens18  +ipt_REJECT 16384 - Live 0xffffffffc0999000 
-192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.linkdown +nft_compat 20480 16 - Live 0xffffffffc0993000 
 +nf_nat_tftp 16384 - Live 0xffffffffc098b000 
 +nft_objref 16384 1 - Live 0xffffffffc0986000 
 +nf_conntrack_tftp 16384 3 nf_nat_tftp, Live 0xffffffffc0981000 
 +nft_counter 16384 33 - Live 0xffffffffc097c000 
 +tun 53248 1 - Live 0xffffffffc096e000 
 +bridge 192512 - Live 0xffffffffc093e000 
 +stp 16384 1 bridge, Live 0xffffffffc0939000 
 +llc 16384 bridge,stp, Live 0xffffffffc0930000 
 +nft_fib_inet 16384 - Live 0xffffffffc08f5000 
 +nft_fib_ipv4 16384 1 nft_fib_inet, Live 0xffffffffc08ed000 
 +nft_fib_ipv6 16384 1 nft_fib_inet, Live 0xffffffffc08e8000 
 +nft_fib 16384 3 nft_fib_inet,nft_fib_ipv4,nft_fib_ipv6, Live 0xffffffffc08e3000 
 +nft_reject_inet 16384 5 - Live 0xffffffffc08de000 
 +nf_reject_ipv4 16384 ipt_REJECT,nft_reject_inet, Live 0xffffffffc08d9000 
 +nf_reject_ipv6 16384 nft_reject_inet, Live 0xffffffffc08d4000 
 +nft_reject 16384 nft_reject_inet, Live 0xffffffffc08cf000 
 +--More--
 </code> </code>
  
-<WRAP center round important 60%> +==Statistiques de l'utilisation  des disques==
-**Important** - La commande utilisée pour ajouter une passerelle par défaut prend la forme suivante **ip route add default via //adresse ip//**. +
-</WRAP>+
  
-===Désactiver/Activer le routage sur le serveur===+<code> 
 +[root@centos8 ~]# cat /proc/diskstats 
 +         0 sda 15481 112 1445637 154103 10272 2377 277530 890611 0 237219 1044714 0 0 0 0 
 +         1 sda1 402 3 66754 13349 31 18 392 4632 0 2824 17981 0 0 0 0 
 +         2 sda2 14915 109 1375516 140528 8450 2359 277138 869788 0 225416 1010316 0 0 0 0 
 +        16 sdb 230 0 5991 36 0 0 0 0 0 110 36 0 0 0 0 
 +  11       0 sr0 10 0 4 2 0 0 0 0 0 9 2 0 0 0 0 
 + 253       0 dm-0 11651 0 1364532 72138 12121 0 288727 1208138 0 227630 1280276 0 0 0 0 
 + 253       1 dm-1 104 0 4440 79 0 0 0 0 0 71 79 0 0 0 0 
 +</code>
  
-Pour désactiver le routage sur le serveur, il convient de désactiver la retransmission des paquets.+==Partitions== 
 + 
 +<code> 
 +[root@centos8 ~]# cat /proc/partitions 
 +major minor  #blocks  name 
 + 
 +          0   33554432 sda 
 +          1    1048576 sda1 
 +          2   32504832 sda2 
 +         16    4194304 sdb 
 +  11        0    1048575 sr0 
 + 253        0   29143040 dm-0 
 + 253        1    3358720 dm-1 
 +</code>
  
-Pour IPv4 :+==Espaces de pagination==
  
 <code> <code>
-[root@centos8 ~]# cat /proc/sys/net/ipv4/ip_forward +[root@centos8 ~]# cat /proc/swaps 
-1 +Filename                                Type            Size    Used    Priority 
-[root@centos8 ~]# echo 0 > /proc/sys/net/ipv4/ip_forward +/dev/dm-1                               partition       3358716       -2
-[root@centos8 ~]# cat /proc/sys/net/ipv4/ip_forward +
 </code> </code>
  
-Pour activer le routage sur le serveur, il convient d'activer la retransmission des paquets:+==Statistiques d'utilisation du processeur==
  
 <code> <code>
-[root@centos8 ~]# echo 1 > /proc/sys/net/ipv4/ip_forward +[root@centos8 ~]# cat /proc/loadavg 
-[root@centos8 ~]# cat /proc/sys/net/ipv4/ip_forward +0.00 0.00 0.00 1/697 16936
-1+
 </code> </code>
  
-Pour IPv6 :+==Statistiques d'utilisation de la mémoire==
  
 <code> <code>
-[root@centos8 ~]# cat /proc/sys/net/ipv6/conf/all/forwarding +[root@centos8 ~]# cat /proc/meminfo 
-1 +MemTotal:        3825032 kB 
-[root@centos8 ~]# echo "0" > /proc/sys/net/ipv6/conf/all/forwarding +MemFree:         1862116 kB 
-[root@centos8 ~]# cat /proc/sys/net/ipv6/conf/all/forwarding +MemAvailable:    2420560 kB 
 +Buffers:            3300 kB 
 +Cached:           750496 kB 
 +SwapCached:            kB 
 +Active:           315572 kB 
 +Inactive:        1400260 kB 
 +Active(anon):       1856 kB 
 +Inactive(anon):   974728 kB 
 +Active(file):     313716 kB 
 +Inactive(file):   425532 kB 
 +Unevictable:           kB 
 +Mlocked:               0 kB 
 +SwapTotal:       3358716 kB 
 +SwapFree:        3358716 kB 
 +Dirty:                 0 kB 
 +Writeback:             0 kB 
 +AnonPages:        962004 kB 
 +Mapped:           261084 kB 
 +Shmem:             14552 kB 
 +KReclaimable:      46980 kB 
 +Slab:             118396 kB 
 +SReclaimable:      46980 kB 
 +SUnreclaim:        71416 kB 
 +KernelStack:       11280 kB 
 +PageTables:        46532 kB 
 +NFS_Unstable:          0 kB 
 +Bounce:                0 kB 
 +WritebackTmp:          0 kB 
 +CommitLimit:     5271232 kB 
 +Committed_AS:    5072744 kB 
 +VmallocTotal:   34359738367 kB 
 +VmallocUsed:           0 kB 
 +VmallocChunk:          0 kB 
 +Percpu:             5920 kB 
 +HardwareCorrupted:     0 kB 
 +AnonHugePages:    546816 kB 
 +ShmemHugePages:        0 kB 
 +ShmemPmdMapped:        0 kB 
 +FileHugePages:         0 kB 
 +FilePmdMapped:         0 kB 
 +HugePages_Total:       0 
 +HugePages_Free:        0 
 +HugePages_Rsvd:        0 
 +HugePages_Surp:        0 
 +Hugepagesize:       2048 kB 
 +Hugetlb:               0 kB 
 +DirectMap4k:      173944 kB 
 +DirectMap2M:     4020224 kB
 </code> </code>
  
-Pour activer le routage sur le serveur, il convient d'activer la retransmission des paquets:+==Version du noyau==
  
 <code> <code>
-[root@centos8 ~]# echo "1"/proc/sys/net/ipv6/conf/all/forwarding +[root@centos8 ~]# cat /proc/version 
-[root@centos8 ~]cat /proc/sys/net/ipv6/conf/all/forwarding +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
-1+
 </code> </code>
  
-=====LAB #2 - Diagnostique du Réseau=====+===Répertoires===
  
-====2.1 - ping====+==ide/scsi==
  
-Pour tester l'accessibilité d'une machinevous devez utiliser la commande **ping** :+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'énérgie, les températures, les vitesses de ventilateursla charge des batteries. 
 + 
 +==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 > /proc/sys/net/ipv4/icmp_echo_ignore_all [Entrée] 
 + 
 +Cette commande a pour résultat d'ignorer les reqûetes ping. 
 + 
 +====2.2 - Utilisation de la Commande sysctl==== 
 + 
 +Les fichiers dans le répertoire **/proc/sys** peuvent être administrés par la commande **sysctl** en temps réel.  
 + 
 +La commande **sysctl** applique les règles consignés dans le fichier **/etc/sysctl.conf** au démarrage de la machine. 
 + 
 +Saisissez la commande :
  
 <code> <code>
-[root@centos8 ~]# ping -c4 10.0.2.1 +[root@centos8 ~]# cat /etc/sysctl.conf 
-PING 10.0.2.1 (10.0.2.1) 56(84) bytes of data+# sysctl settings are defined through files in 
-64 bytes from 10.0.2.1: icmp_seq=1 ttl=64 time=0.104 ms +# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/
-64 bytes from 10.0.2.1: icmp_seq=2 ttl=64 time=0.325 ms +
-64 bytes from 10.0.2.1: icmp_seq=3 ttl=64 time=0.250 ms +# Vendors settings live in /usr/lib/sysctl.d/
-64 bytes from 10.0.2.1: icmp_seq=4 ttl=64 time=0.123 ms+# To override a whole file, create a new file with the same in 
 +# /etc/sysctl.d/ and put new settings thereTo override 
 +# only specific settings, add a file with a lexically later 
 +# name in /etc/sysctl.d/ and put new settings there
 +
 +# For more information, see sysctl.conf(5) and sysctl.d(5).
  
---- 10.0.2.1 ping statistics --- +[root@centos8 ~]# ls -l /etc/sysctl.d/ 
-4 packets transmitted4 received, 0% packet losstime 3083ms +total 0 
-rtt min/avg/max/mdev 0.104/0.200/0.325/0.092 ms+lrwxrwxrwx. 1 root root 14 Mar 16 15:42 99-sysctl.conf -> ../sysctl.conf 
 +[root@centos8 ~]# ls -l /usr/lib/sysctl.d/ 
 +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 /usr/lib/sysctl.d/50-default.conf  
 +#  This file is part of systemd. 
 +
 +#  systemd is free software; you can redistribute it and/or modify it 
 +#  under the terms of the GNU Lesser General Public License as published by 
 +#  the Free Software Foundation; either version 2.1 of the Licenseor 
 +#  (at your option) any later version. 
 + 
 +# See sysctl.d(5) and core(5) for documentation. 
 + 
 +# To override settings in this filecreate a local file in /etc 
 +# (e.g. /etc/sysctl.d/90-override.conf), and put any assignments 
 +# there. 
 + 
 +# System Request functionality of the kernel (SYNC) 
 +
 +# Use kernel.sysrq 1 to allow all keys. 
 +# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html for a list 
 +# of values and keys. 
 +kernel.sysrq = 16 
 + 
 +# Append the PID to the core filename 
 +kernel.core_uses_pid = 1 
 + 
 +# https://bugzilla.redhat.com/show_bug.cgi?id=1689346 
 +kernel.kptr_restrict = 1 
 + 
 +# Source route verification 
 +net.ipv4.conf.all.rp_filter = 1 
 + 
 +# Do not accept source routing 
 +net.ipv4.conf.all.accept_source_route = 0 
 + 
 +# Promote secondary addresses when the primary address is removed 
 +net.ipv4.conf.all.promote_secondaries = 1 
 + 
 +# Fair Queue CoDel packet scheduler to fight bufferbloat 
 +net.core.default_qdisc = fq_codel 
 + 
 +# Enable hard and soft link protection 
 +fs.protected_hardlinks = 1 
 +fs.protected_symlinks = 1
 </code> </code>
  
-===Options de la commande ping===+Les options de la commande **sysctl** sont : 
 + 
 +<code> 
 +[root@centos8 ~]# sysctl --help 
 + 
 +Usage: 
 + sysctl [options] [variable[=value] ...] 
 + 
 +Options
 +  -a, --all            display all variables 
 +  -A                   alias of -a 
 +  -X                   alias of -a 
 +      --deprecated     include deprecated parameters to listing 
 +  -b, --binary         print value without new line 
 +  -e, --ignore         ignore unknown variables errors 
 +  -N, --names          print variable names without values 
 +  -n, --values         print only values of the given variable(s) 
 +  -p, --load[=<file> read values from file 
 +  -f                   alias of -p 
 +      --system         read values from all system directories 
 +  -r, --pattern <expression> 
 +                       select setting that match expression 
 +  -q, --quiet          do not echo variable set 
 +  -w, --write          enable writing a value to variable 
 +  -o                   does nothing 
 +  -x                   does nothing 
 +  -d                   alias of -h 
 + 
 + -h, --help     display this help and exit 
 + -V, --version  output version information and exit 
 + 
 +For more details see sysctl(8). 
 +</code> 
 + 
 +<WRAP center round important 60%> 
 +**Important** : Consultez la page de la traduction du manuel de **sysctl** **[[http://www.delafond.org/traducmanfr/man/man8/sysctl.8.html|ici]]** pour comprendre la commande
 +</WRAP> 
 + 
 +=====LAB#3 - Interprétation des informations dans /proc===== 
 + 
 +Les informations brutes stockées dans /proc peuvent être interprétées grâce à l'utilisation des commandes dites de //gestion des performances//
 + 
 +  * free, 
 +  * uptime et w, 
 +  * iostat, 
 +  * hdparm, 
 +  * vmstat, 
 +  * mpstat, 
 +  * sar. 
 + 
 +====3.1 - La Commande free==== 
 + 
 +La commande **free** permet de donner l’état de la mémoire totale, libre, partagée, swap et bufferisée. Saisissez donc la commande suivante : 
 + 
 +<code> 
 +[root@centos8 ~]# free -m 
 +              total        used        free      shared  buff/cache   available 
 +Mem:           3735        1135        1818          14         782        2363 
 +Swap:          3279                  3279 
 +</code> 
 + 
 +Dans le cas de cet exemple, nous pouvons constater que l’affichage montre : 
 + 
 +  * 3735 Mo de mémoire physique totale, 
 +  * 1135 Mo de mémoire physique utilisée et 1818 Mo de mémoire physique libre, 
 +  * 3279 Mo de mémoire swap totale et 0 Mo de swap utilisé
  
 Les options de cette commande sont : Les options de cette commande sont :
  
 <code> <code>
-[root@centos8 ~]# ping --help +[root@centos8 ~]# free --help 
-pinginvalid option -- '-' + 
-Usage: ping [-aAbBdDfhLnOqrRUvV64] [-c count] [-i interval] [-I interface] +Usage: 
-            [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos] + free [options] 
-            [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option] + 
-            [-w deadline] [-W timeout] [hop1 ...] destination +Options: 
-Usage: ping -6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface] + -b, --bytes         show output in bytes 
-             [-l preload] [-m mark] [-M pmtudisc_option] +     --kilo          show output in kilobytes 
-             [-N nodeinfo_option] [-p pattern] [-Q tclass] [-s packetsize] +     --mega          show output in megabytes 
-             [-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline] +     --giga          show output in gigabytes 
-             [-W timeout] destination+     --tera          show output in terabytes 
 +     --peta          show output in petabytes 
 + -k, --kibi          show output in kibibytes 
 + -m, --mebi          show output in mebibytes 
 + -g, --gibi          show output in gibibytes 
 +     --tebi          show output in tebibytes 
 +     --pebi          show output in pebibytes 
 + -h, --human         show human-readable output 
 +     --si            use powers of 1000 not 1024 
 + -l--lohi          show detailed low and high memory statistics 
 + -t, --total         show total for RAM + swap 
 + -s N, --seconds N   repeat printing every N seconds 
 + -c N, --count N     repeat printing N times, then exit 
 + -w, --wide          wide output 
 + 
 +     --help     display this help and exit 
 + -V, --version  output version information and exit 
 + 
 +For more details see free(1).
 </code> </code>
  
-====2.2 - netstat -i====+====3.2 - Les Commandes uptime et w====
  
-Pour visualiser les statistiques réseaux, vous disposez de la commande **netstat** :+Chacune des ces commandes indique la charge moyenne du ou des processeurs depuis 1 minute, 5 minutes et 15 minutes :
  
 <code> <code>
-[root@centos8 ~]# netstat -i +[root@centos8 ~]# uptime 
-Kernel Interface table + 04:39:03 up 1 day,  2:34,  1 user,  load average: 0.00, 0.00, 0.00 
-Iface             MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg +  
-ens18            1500   476056           0 0        363562                BMRU +[root@centos8 ~]# w 
-lo              65536    10936      0      0 0         10936                0 LRU + 04:39:04 up 1 day,  2:34,  1 user,  load average: 0.00, 0.00, 0.00 
-virbr0           1500        0      0      0 0                  0      0      BMU+USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT 
 +trainee  pts/   10.0.2.1         03:58    0.00s  0.11s  0.02s sshd: trainee [priv]
 </code> </code>
  
-===Options de la commande netstat===+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 options de cette commande sont :+Par exemple si les valeurs sur un système muni d'un seul processeur étaient **3,48  4,00  3,85** ceci indiquerait que le processeur a du mal à traiter les processus mettant en moyenne : 
 + 
 +  * 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. 
 + 
 +Les options de ces commandes sont :
  
 <code> <code>
-[root@centos8 ~]# netstat --help +[root@centos8 ~]# uptime --help
-usage: netstat [-vWeenNcCF] [<Af>] -r         netstat {-V|--version|-h|--help} +
-       netstat [-vWnNcaeol] [<Socket> ...] +
-       netstat { [-vWeenNac] -I[<Iface>] | [-veenNac] -i | [-cnNe] -M | -s [-6tuw] } [delay]+
  
-        -r, --route              display routing table +Usage: 
-        -I, --interfaces=<Iface> display interface table for <Iface> + uptime [options]
-        -i, --interfaces         display interface table +
-        -g, --groups             display multicast group memberships +
-        -s, --statistics         display networking statistics (like SNMP) +
-        -M, --masquerade         display masqueraded connections+
  
-        -v, --verbose            be verbose +Options: 
-        -W, --wide               don't truncate IP addresses + -p, --pretty   show uptime in pretty format 
-        -n, --numeric            don't resolve names + -h, --help     display this help and exit 
-        --numeric-hosts          don't resolve host names + -s, --since    system up since 
-        --numeric-ports          don't resolve port names + -V, --version  output version information and exit 
-        --numeric-users          don't resolve user names + 
-        -N, --symbolic           resolve hardware names +For more details see uptime(1). 
-        -e, --extend             display other/more information + 
-        -p, --programs           display PID/Program name for sockets +[root@centos8 ~]# w --help 
-        -o, --timers             display timers + 
-        -c, --continuous         continuous listing+Usage: 
 + w [options] 
 + 
 +Options: 
 + -h, --no-header     do not print header 
 + -u, --no-current    ignore current process username 
 + -s, --short         short format 
 + -f, --from          show remote hostname field 
 + -o, --old-style     old style output 
 + -i, --ip-addr       display IP address instead of hostname (if possible)
  
-        -l, --listening          display listening server sockets +     --help     display this help and exit 
-        -a, --all                display all sockets (default: connected) + -V, --version  output version information and exit
-        -F, --fib                display Forwarding Information Base (default) +
-        -C, --cache              display routing cache instead of FIB +
-        -Z, --context            display SELinux security context for sockets+
  
-  <Socket>={-t|--tcp} {-u|--udp} {-U|--udplite} {-S|--sctp} {-w|--raw} +For more details see w(1).
-           {-x|--unix} --ax25 --ipx --netrom +
-  <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: inet +
-  List of possible address families (which support routing)+
-    inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25)  +
-    netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP)  +
-    x25 (CCITT X.25)+
 </code> </code>
  
-====2.3 - traceroute====+====3.3 - La Commande iostat====
  
-La commande ping est à la base de la commande **traceroute**. Cette commande sert à découvrir la route empruntée pour accéder à un site donné :+La commande **iostat** affiche des statistiques sur l'utilisation des disques, des terminaux et des lecteurs de cartouche :
  
 <code> <code>
-[root@centos8 ~]# traceroute www.ittraining.network +[root@centos8 ~]# iostat 
-bash: traceroute: command not found... +bash: iostat: command not found... 
-Install package 'traceroute' to provide command 'traceroute'? [N/y] y+Install package 'sysstat' to provide command 'iostat'? [N/y] y
  
  
  * Waiting in queue...   * Waiting in queue... 
 The following packages have to be installed: The following packages have to be installed:
- traceroute-3:2.1.0-6.el8.x86_64        Traces the route taken by packets over an IPv4/IPv6 network+ lm_sensors-libs-3.4.0-22.20180522git70f7e08.el8.x86_64 Lm_sensors core libraries 
 + sysstat-11.7.3-5.el8.x86_64    Collection of performance monitoring tools for Linux
 Proceed with changes? [N/y] y Proceed with changes? [N/y] y
  
Ligne 1109: Ligne 2666:
  * Testing changes...   * Testing changes... 
  * Installing packages...   * Installing packages... 
-traceroute to www.ittraining.network (109.228.56.52), 30 hops max, 60 byte packets +Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc       29/06/21        _x86_64_(8 CPU) 
-  _gateway (10.0.2.1)  0.132 ms  0.101 ms  0.078 ms + 
-  79.137.68.252 (79.137.68.252 0.542 ms  0.656 ms  0.809 ms +avg-cpu:  %user   %nice %system %iowait  %steal   %idle 
-  10.50.24.61 (10.50.24.61)  0.238 ms  0.219 ms 10.50.24.60 (10.50.24.60)  0.239 ms +           0.03    0.00    0.03    0.01    0.00   99.93 
- 4  10.50.0.16 (10.50.0.16)  0.172 ms 10.50.0.22 (10.50.0.22)  0.194 ms  0.173 ms + 
- 5  10.73.248.192 (10.73.248.192)  0.766 ms 10.73.248.194 (10.73.248.194)  0.730 ms 10.73.248.192 (10.73.248.192)  0.757 ms +Device             tps    kB_read/   kB_wrtn/   kB_read    kB_wrtn 
-  waw-wa2-sbb1-nc5.pl.eu (91.121.131.150)  1.102 ms  1.396 ms  1.099 ms +sda               0.28         7.67         1.49     735338     142510 
- 7  fra-fr5-sbb1-nc5.de.eu (213.251.128.113)  18.309 ms fra-fr5-sbb2-nc5.de.eu (54.36.50.116)  21.881 ms fra-fr5-sbb1-nc5.de.eu (213.251.128.113)  16.764 ms +sdb               0.00         0.03         0.00       2995          0 
-  10.200.0.6 (10.200.0.6)  20.922 ms 10.200.0.0 (10.200.0.0)  16.959 ms 10.200.0.4 (10.200.0.4)  21.143 ms +scd0              0.00         0.00         0.00                   0 
- 9  decix.bb-a.fra3.fra.de.oneandone.net (80.81.192.123)  18.789 ms decix.bb-c.act.fra.de.oneandone.net (80.81.193.123)  20.310 ms decix.bb-a.fra3.fra.de.oneandone.net (80.81.192.123)  18.693 ms +dm-0              0.26         7.25         1.55     694786     148837 
-10  ae-14.bb-b.fr7.fra.de.oneandone.net (212.227.120.149)  22.222 ms  22.206 ms  22.257 ms +dm-1              0.00         0.02         0.00       2220          0
-11  port-channel-3.gw-ngcs-1.dc1.con.glo.gb.oneandone.net (88.208.255.131)  39.660 ms  39.679 ms ae-19.bb-b.thn.lon.gb.oneandone.net (212.227.120.33)  33.973 ms +
-12  109.228.63.209 (109.228.63.209)  37.363 ms port-channel-3.gw-ngcs-1.dc1.con.glo.gb.oneandone.net (88.208.255.131)  39.534 ms 109.228.63.209 (109.228.63.209)  37.901 ms +
-13  * 109.228.63.209 (109.228.63.209)  38.014 ms  37.991 ms +
-14  * * * +
-15  * * * +
-16  * * * +
-17  * * * +
-18  * * * +
-19  * * * +
-20  * * * +
-21  * * * +
-22  * * * +
-23  * * * +
-24  * * * +
-25  * * * +
-26  * * * +
-27  * * * +
-28  * * * +
-29  * * *^C+
 </code> </code>
  
-===Options de la commande traceroute===+Au-dessous de la première ligne indiquant la version du noyau du système et son nom d'hôte ainsi que la date actuelle, iostat affiche une vue d'ensemble de l'utilisation CPU moyenne du système depuis le dernier démarrage. Le rapport d'utilisation du CPU inclut les pourcentages suivants : 
 + 
 +  * **%user** - Pourcentage de temps passé en mode utilisateur (exécutant des applications, etc.) 
 +  * **%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'hyperviseur s'occupe d'un autre CPU virtuel. 
 +  * **%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'utilisation du CPU de la sortie de la commande **iostat** figure le rapport d'utilisation des périphériques. Ce dernier contient une ligne pour chaque périphérique disque du système et inclut les informations suivantes : 
 + 
 +  * 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, pour voir les statistiques étendues des disques, utilisez la commande suivante : 
 + 
 +<code> 
 +[root@centos8 ~]# iostat -d -x 
 +Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        30/06/21        _x86_64_        (8 CPU) 
 + 
 +Device            r/s     w/    rkB/    wkB/  rrqm/  wrqm/ %rrqm  %wrqm r_await w_await aqu-sz rareq-sz wareq-sz  svctm  %util 
 +sda              0.20    0.16     11.67      1.81     0.00     0.03   0.48  17.45    6.79   69.99   0.01    58.28    11.33   9.13   0.33 
 +sdb              0.00    0.00      0.02      0.00     0.00     0.00   0.00   0.00    0.13    0.00   0.00     8.81     0.00   0.51   0.00 
 +scd0             0.00    0.00      0.00      0.00     0.00     0.00   0.00   0.00    0.20    0.00   0.00     0.20     0.00   0.90   0.00 
 +dm-0             0.12    0.19      3.98      1.90     0.00     0.00   0.00   0.00    4.18   79.07   0.02    32.88    10.07  10.34   0.32 
 +dm-1             0.00    0.00      0.01      0.00     0.00     0.00   0.00   0.00    0.76    0.00   0.00    21.35     0.00   0.68   0.00 
 +</code>
  
 Les options de cette commande sont : Les options de cette commande sont :
  
 <code> <code>
-[root@centos8 ~]# traceroute --help +[root@centos8 ~]# iostat --help 
-Usage: +Usage: iostat options [ <interval> [ <count> ] ] 
-  traceroute -46dFITnreAUDV ] [ -f first_ttl ] [ -g gate,... ] [ -i device ] [ -m max_ttl ] [ -N squeries ] [ -p port ] [ -t tos ] [ -l flow_label ] [ -w MAX,HERE,NEAR ] [ -q nqueries ] [ -s src_addr ] [ -z sendwait ] [ --fwmark=num host packetlen +Options are: 
-Options: +[ -] [ -] [ -] [ -k | -m ] [ -N ] [ -] [ -t ] [ -] [ -] [ -] [ -] 
-  -4                          Use IPv4 +[ -j { ID | LABEL | PATH | UUID | ... } ] [ --human ] [ -o JSON 
-  -6                          Use IPv6 +[ [ -H ] -g <group_name> ] [ -p [ <device> [,...] | ALL ] ] 
-  -d  --debug                 Enable socket level debugging +[ <device> [...] | ALL ] 
-  -F  --dont-fragment         Do not fragment packets +</code>
-  -f first_ttl  --first=first_ttl +
-                              Start from the first_ttl hop (instead from 1) +
-  -g gate,...  --gateway=gate,... +
-                              Route packets through the specified gateway +
-                              (maximum 8 for IPv4 and 127 for IPv6) +
-  -I  --icmp                  Use ICMP ECHO for tracerouting +
-  -T  --tcp                   Use TCP SYN for tracerouting (default port is 80) +
-  -i device  --interface=device +
-                              Specify a network interface to operate with +
-  -m max_ttl  --max-hops=max_ttl +
-                              Set the max number of hops (max TTL to be +
-                              reached)Default is 30 +
-  -N squeries  --sim-queries=squeries +
-                              Set the number of probes to be tried +
-                              simultaneously (default is 16) +
-  -n                          Do not resolve IP addresses to their domain names +
-  -p port  --port=port        Set the destination port to useIt is either +
-                              initial udp port value for "default" method +
-                              (incremented by each probe, default is 33434), or +
-                              initial seq for "icmp" (incremented as well, +
-                              default from 1), or some constant destination +
-                              port for other methods (with default of 80 for +
-                              "tcp", 53 for "udp", etc.) +
-  -t tos  --tos=tos           Set the TOS (IPv4 type of service) or TC (IPv6 +
-                              traffic class) value for outgoing packets +
-  -l flow_label  --flowlabel=flow_label +
-                              Use specified flow_label for IPv6 packets +
-  -w MAX,HERE,NEAR  --wait=MAX,HERE,NEAR +
-                              Wait for a probe no more than HERE (default 3) +
-                              times longer than a response from the same hop, +
-                              or no more than NEAR (default 10) times than some +
-                              next hop, or MAX (default 5.0) seconds (float +
-                              point values allowed too) +
-  -q nqueries  --queries=nqueries +
-                              Set the number of probes per each hop. Default is +
-                              3 +
-  -r                          Bypass the normal routing and send directly to a +
-                              host on an attached network +
-  -s src_addr  --source=src_addr +
-                              Use source src_addr for outgoing packets +
-  -z sendwait  --sendwait=sendwait +
-                              Minimal time interval between probes (default 0). +
-                              If the value is more than 10, then it specifies a +
-                              number in milliseconds, else it is a number of +
-                              seconds (float point values allowed too) +
-  -e  --extensions            Show ICMP extensions (if present), including MPLS +
-  -A  --as-path-lookups       Perform AS path lookups in routing registries and +
-                              print results directly after the corresponding +
-                              addresses +
-  -M name  --module=name      Use specified module (either builtin or external) +
-                              for traceroute operations. Most methods have +
-                              their shortcuts (`-I' means `-M icmp' etc.) +
-  -O OPTS,...  --options=OPTS,... +
-                              Use module-specific option OPTS for the +
-                              traceroute module. Several OPTS allowed, +
-                              separated by comma. If OPTS is "help", print info +
-                              about available options +
-  --sport=num                 Use source port num for outgoing packets. Implies +
-                              `-N 1' +
-  --fwmark=num                Set firewall mark for outgoing packets +
-  -U  --udp                   Use UDP to particular port for tracerouting +
-                              (instead of increasing the port per each probe), +
-                              default port is 53 +
-  -UL                         Use UDPLITE for tracerouting (default dest port +
-                              is 53) +
-  -D  --dccp                  Use DCCP Request for tracerouting (default port +
-                              is 33434) +
-  -P prot  --protocol=prot    Use raw packet of protocol prot for tracerouting +
-  --mtu                       Discover MTU along the path being traced. Implies +
-                              `-F -N 1' +
-  --back                      Guess the number of hops in the backward path and +
-                              print if it differs +
-  -V  --version               Print version info and exit +
-  --help                      Read this help and exit+
  
-Arguments+====3.4 - La Commande hdparm==== 
-+     host          The host to traceroute to + 
-      packetlen     The full packet length (default is the length of an IP +Pour surveiller la vitesse des entrées et des sorties du disque, vous pouvez utiliser la commande **hdparm** 
-                    header plus 40). Can be ignored or increased to a minimal + 
-                    allowed value+<code> 
 +[root@centos8 ~]# hdparm -t /dev/sda 
 + 
 +/dev/sda: 
 + Timing buffered disk reads: 1410 MB in  3.00 seconds = 469.98 MB/sec
 </code> </code>
  
-=====LAB #3 - Connexions à Distance=====+====3.5 La Commande vmstat====
  
-==== 3.1 - Telnet ====+La commande **vmstat** affiche des statistiques sur la mémoire, la pagination et la charge ponctuelle du processeur :
  
-<WRAP center round important+<code
-**Important** Si la commande **telnet** n'est pas installée sous CentOS 8, installez-le à l'aide de la commande **dnf install telnet** en tant que root. +[root@centos8 ~]# vmstat 1 10 
-</WRAP>+procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- 
 +  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st 
 +  0      0 1765216   2256 866336    0    0            9   12  0  0 100  0  0 
 +  0      0 1765136   2256 866336    0    0           57   80  0  0 100  0  0 
 +  0      0 1765136   2256 866376    0    0           54   77  0  0 100  0  0 
 +  0      0 1765136   2256 866376    0    0           66  100  0  0 100  0  0 
 +  0      0 1765136   2256 866376    0    0          103  125  0  0 100  0  0 
 +  0      0 1765108   2256 866376    0    0           64   86  0  0 100  0  0 
 +  0      0 1765108   2256 866376    0    0           62   88  0  0 100  0  0 
 +  0      0 1765108   2256 866376    0    0           68   97  0  0 100  0  0 
 +  0      0 1765108   2256 866376    0    0           60   88  0  0 100  0  0 
 +  0      0 1765108   2256 866376    0    0          177  251  0  0 100  0  0 
 +</code>
  
-La commande **telnet** est utilisée pour établir une connexion à distance avec un serveur telnet :+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'ensemble des données lors de la recherche de statistiques spécifiques.
  
-<file> +Les champs relatifs aux processus sont les suivants :
-  # telnet numero_ip +
-</file>+
  
-<WRAP center round important 60%> +  r — Le nombre de processus exécutables attendant d'avoir accès au CPU 
-**Important*Le service telnet revient à une redirection des canaux standards d'entrée et de sortie. Notez que la connexion n'est **pas** sécurisée. Pour fermer la connexion, il faut saisir la commande **exit**. La commande telnet n'offre pas de services de transfert de fichiers. Pour cela, il convient d'utiliser la command **ftp**. +  b — Le nombre de processus exécutables dans un état de veille qui ne peut être interrompu
-</WRAP>+
  
-===Options de la commande telnet===+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/Sorties (E/S) sont les suivants : 
 + 
 +  * 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'interruptions par seconde 
 +  * 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'E/S
  
 Les options de cette commande sont : Les options de cette commande sont :
  
 <code> <code>
-[[root@centos8 ~]# telnet --help +[root@centos8 ~]# vmstat --help 
-telnet: invalid option -- '-' + 
-Usage: telnet [-4] [-6] [-8[-E[-L] [-S tos] [-a] [-c] [-d] [-char] [-l user] +Usage: 
-        [-n tracefile] [-b hostalias ] [-r]  + vmstat [options] [delay [count]] 
- [host-name [port]]+ 
 +Options: 
 + -a, --active           active/inactive memory 
 + -f, --forks            number of forks since boot 
 + -m, --slabs            slabinfo 
 + -n, --one-header       do not redisplay header 
 + -s, --stats            event counter statistics 
 + -d--disk             disk statistics 
 + -D, --disk-sum         summarize disk statistics 
 + -p, --partition <dev>  partition specific statistics 
 + -S, --unit <char>      define display unit 
 + -w, --wide             wide output 
 + -t, --timestamp        show timestamp 
 + 
 + -h, --help     display this help and exit 
 + -V, --version  output version information and exit 
 + 
 +For more details see vmstat(8).
 </code> </code>
  
-==== 3.wget ====+<WRAP center round important 60%> 
 +**Important** : Par défaut la commande vmstat affiche des informations depuis le démarrage du système. 
 +</WRAP> 
 + 
 +====3.La Commande mpstat====
  
-La commande **wget** est utilisée pour récupérer un fichier via http, https ou ftp +La commande **mpstat** affiche des statistiques détaillées sur le CPU :
  
 <code> <code>
-[root@centos8 ~]# wget https://www.dropbox.com/s/wk79lkfr6f12u9j/wget_file.txt +[root@centos8 ~]# mpstat 
-...+Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_(8 CPU)
  
-[root@centos8 ~]# cat wget_file.txt  +04:53:22     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 
-This is a file retrieved by the wget command.+04:53:22     all    0.03    0.00    0.01    0.02    0.01    0.01    0.00    0.00    0.00   99.92
 </code> </code>
  
-===Options de la commande wget===+Dans le cas où vous avez plusieurs processeurs ou coeurs, vous pouvez visualiser ces mêmes informations par unité de traitement : 
 + 
 +<code> 
 +[root@centos8 ~]# mpstat -P ALL 
 +Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_(8 CPU) 
 + 
 +04:54:28     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 
 +04:54:28     all    0.03    0.00    0.01    0.02    0.01    0.01    0.00    0.00    0.00   99.92 
 +04:54:28          0.03    0.00    0.01    0.00    0.01    0.00    0.00    0.00    0.00   99.94 
 +04:54:28          0.02    0.00    0.02    0.03    0.02    0.00    0.00    0.00    0.00   99.91 
 +04:54:28          0.02    0.00    0.01    0.01    0.01    0.04    0.00    0.00    0.00   99.90 
 +04:54:28          0.01    0.00    0.01    0.02    0.00    0.00    0.00    0.00    0.00   99.95 
 +04:54:28          0.05    0.00    0.02    0.03    0.01    0.00    0.00    0.00    0.00   99.88 
 +04:54:28          0.03    0.01    0.01    0.02    0.01    0.00    0.00    0.00    0.00   99.92 
 +04:54:28          0.02    0.00    0.02    0.01    0.01    0.00    0.00    0.00    0.00   99.95 
 +04:54:28          0.02    0.00    0.01    0.01    0.01    0.00    0.00    0.00    0.00   99.94 
 +</code> 
 + 
 +Pour afficher 5 jeux de statistiques à des intervales de 2 secondes pour tous les unités de traitement, il convient d'utiliser la commande suivante : 
 + 
 +<code> 
 +[root@centos8 ~]# mpstat -P ALL 2 5 
 +Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_        (8 CPU) 
 + 
 +04:55:11     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 
 +04:55:13     all    0.00    0.00    0.00    0.00    0.00    0.00    0.06    0.00    0.00   99.94 
 +04:55:13          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:13          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:13          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:13          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:13          0.00    0.00    0.00    0.00    0.00    0.00    0.50    0.00    0.00   99.50 
 +04:55:13          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:13          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:13          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 + 
 +04:55:13     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 
 +04:55:15     all    0.00    0.00    0.00    0.00    0.06    0.00    0.00    0.00    0.00   99.94 
 +04:55:15          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:15          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:15          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:15          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:15          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:15          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:15          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:15          0.00    0.00    0.00    0.00    0.50    0.00    0.00    0.00    0.00   99.50 
 + 
 +04:55:15     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 
 +04:55:17     all    0.00    0.00    0.00    0.00    0.06    0.00    0.00    0.00    0.00   99.94 
 +04:55:17          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:17          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:17          0.00    0.00    0.00    0.00    0.50    0.00    0.00    0.00    0.00   99.50 
 +04:55:17          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:17          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:17          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:17          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:17          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 + 
 +04:55:17     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 
 +04:55:19     all    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:19          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:19          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:19          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:19          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:19          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:19          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:19          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:19          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 + 
 +04:55:19     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 
 +04:55:21     all    0.06    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   99.94 
 +04:55:21          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:21          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:21          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:21          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:21          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:21          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:21          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +04:55:21          0.50    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   99.50 
 + 
 +Average:     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 
 +Average:     all    0.01    0.00    0.00    0.00    0.02    0.00    0.01    0.00    0.00   99.95 
 +Average:          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +Average:          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +Average:          0.00    0.00    0.00    0.00    0.10    0.00    0.00    0.00    0.00   99.90 
 +Average:          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +Average:          0.00    0.00    0.00    0.00    0.00    0.00    0.10    0.00    0.00   99.90 
 +Average:          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +Average:          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
 +Average:          0.10    0.00    0.00    0.00    0.10    0.00    0.00    0.00    0.00   99.80 
 +</code>
  
 Les options de cette commande sont : Les options de cette commande sont :
  
 <code> <code>
-[root@centos8 ~]# wget --help +[root@centos8 ~]# mpstat --help 
-GNU Wget 1.19.5, a non-interactive network retriever. +Usage: mpstat options ] [ <interval> [ <count> 
-Usage: wget [OPTION]... [URL]...+Options are: 
 +[ -A ] [ -n ] [ -u ] [ -V ] [ -I { SUM | CPU | SCPU | ALL } ] 
 +[ -N { <node_list> | ALL } ] [ -o JSON ] [ -P { <cpu_list> | ALL } ] 
 +</code>
  
-Mandatory arguments to long options are mandatory for short options too.+====3.7 - La Commande sar====
  
-Startup: +La commande **sar** (**S**ystem **A**ctivity **R**eporter) permet de surveiller toutes les ressources du système selon l'option qui est passée en argument à la commande. 
-  -V,  --version                   display the version of Wget and exit +
-  -h,  --help                      print this help +
-  -b,  --background                go to background after startup +
-  -e,  --execute=COMMAND           execute a `.wgetrc'-style command+
  
-Logging and input file: +Sous RHEL/CentOS 8 la commande **/usr/lib64/sa/sadc** permet de collecter les informations :
-  -o,  --output-file=FILE          log messages to FILE +
-  -a,  --append-output=FILE        append messages to FILE +
-  -d,  --debug                     print lots of debugging information +
-  -q,  --quiet                     quiet (no output) +
-  -v,  --verbose                   be verbose (this is the default) +
-  -nv, --no-verbose                turn off verboseness, without being quiet +
-       --report-speed=TYPE         output bandwidth as TYPE.  TYPE can be bits +
-  -i,  --input-file=FILE           download URLs found in local or external FILE +
-       --input-metalink=FILE       download files covered in local Metalink FILE +
-  -F,  --force-html                treat input file as HTML +
-  -B,  --base=URL                  resolves HTML input-file links (-i -F) +
-                                     relative to URL +
-       --config=FILE               specify config file to use +
-       --no-config                 do not read any config file +
-       --rejected-log=FILE         log reasons for URL rejection to FILE+
  
-Download: +<code> 
-  -t,  --tries=NUMBER              set number of retries to NUMBER (0 unlimits) +[root@centos8 ~]# ls /usr/lib64/sa 
-       --retry-connrefused         retry even if connection is refused +sa1  sa2  sadc 
-       --retry-on-http-error=ERRORS    comma-separated list of HTTP errors to retry +</code>
-  -O,  --output-document=FILE      write documents to FILE +
-  -nc, --no-clobber                skip downloads that would download to +
-                                     existing files (overwriting them) +
-       --no-netrc                  don't try to obtain credentials from .netrc +
-  -c,  --continue                  resume getting a partially-downloaded file +
-       --start-pos=OFFSET          start downloading from zero-based position OFFSET +
-       --progress=TYPE             select progress gauge type +
-       --show-progress             display the progress bar in any verbosity mode +
-  -N,  --timestamping              don't re-retrieve files unless newer than +
-                                     local +
-       --no-if-modified-since      don't use conditional if-modified-since get +
-                                     requests in timestamping mode +
-       --no-use-server-timestamps  don't set the local file's timestamp by +
-                                     the one on the server +
-  -S,  --server-response           print server response +
-       --spider                    don't download anything +
-  -T,  --timeout=SECONDS           set all timeout values to SECONDS +
-       --dns-timeout=SECS          set the DNS lookup timeout to SECS +
-       --connect-timeout=SECS      set the connect timeout to SECS +
-       --read-timeout=SECS         set the read timeout to SECS +
-  -w,  --wait=SECONDS              wait SECONDS between retrievals +
-       --waitretry=SECONDS         wait 1..SECONDS between retries of a retrieval +
-       --random-wait               wait from 0.5*WAIT...1.5*WAIT secs between retrievals +
-       --no-proxy                  explicitly turn off proxy +
-  -Q,  --quota=NUMBER              set retrieval quota to NUMBER +
-       --bind-address=ADDRESS      bind to ADDRESS (hostname or IP) on local host +
-       --limit-rate=RATE           limit download rate to RATE +
-       --no-dns-cache              disable caching DNS lookups +
-       --restrict-file-names=OS    restrict chars in file names to ones OS allows +
-       --ignore-case               ignore case when matching files/directories +
-  -4,  --inet4-only                connect only to IPv4 addresses +
-  -6,  --inet6-only                connect only to IPv6 addresses +
-       --prefer-family=FAMILY      connect first to addresses of specified family, +
-                                     one of IPv6, IPv4, or none +
-       --user=USER                 set both ftp and http user to USER +
-       --password=PASS             set both ftp and http password to PASS +
-       --ask-password              prompt for passwords +
-       --use-askpass=COMMAND       specify credential handler for requesting  +
-                                     username and password.  If no COMMAND is  +
-                                     specified the WGET_ASKPASS or the SSH_ASKPASS  +
-                                     environment variable is used. +
-       --no-iri                    turn off IRI support +
-       --local-encoding=ENC        use ENC as the local encoding for IRIs +
-       --remote-encoding=ENC       use ENC as the default remote encoding +
-       --unlink                    remove file before clobber +
-       --keep-badhash              keep files with checksum mismatch (append .badhash) +
-       --metalink-index=NUMBER     Metalink application/metalink4+xml metaurl ordinal NUMBER +
-       --metalink-over-http        use Metalink metadata from HTTP response headers +
-       --preferred-location        preferred location for Metalink resources +
-       --xattr                     turn on storage of metadata in extended file attributes+
  
-Directories: +Le script **/usr/lib64/sa/sa1** exécute la commande **sadc**Ce script prend deux options :
-  -nd, --no-directories            don't create directories +
-  -x,  --force-directories         force creation of directories +
-  -nH, --no-host-directories       don't create host directories +
-       --protocol-directories      use protocol name in directories +
-  -P,  --directory-prefix=PREFIX   save files to PREFIX/.+
-       --cut-dirs=NUMBER           ignore NUMBER remote directory components+
  
-HTTP options: +^ Option ^ Description ^ 
-       --http-user=USER            set http user to USER +-t | L'intervalle entre les collectes | 
-       --http-password=PASS        set http password to PASS +-n | Nombre de collectes |
-       --no-cache                  disallow server-cached data +
-       --default-page=NAME         change the default page name (normally +
-                                     this is 'index.html'.) +
-  -E,  --adjust-extension          save HTML/CSS documents with proper extensions +
-       --ignore-length             ignore 'Content-Length' header field +
-       --header=STRING             insert STRING among the headers +
-       --compression=TYPE          choose compression, one of auto, gzip and none. (default: none) +
-       --max-redirect              maximum redirections allowed per page +
-       --proxy-user=USER           set USER as proxy username +
-       --proxy-password=PASS       set PASS as proxy password +
-       --referer=URL               include 'Referer: URL' header in HTTP request +
-       --save-headers              save the HTTP headers to file +
-  -U,  --user-agent=AGENT          identify as AGENT instead of Wget/VERSION +
-       --no-http-keep-alive        disable HTTP keep-alive (persistent connections) +
-       --no-cookies                don't use cookies +
-       --load-cookies=FILE         load cookies from FILE before session +
-       --save-cookies=FILE         save cookies to FILE after session +
-       --keep-session-cookies      load and save session (non-permanent) cookies +
-       --post-data=STRING          use the POST method; send STRING as the data +
-       --post-file=FILE            use the POST method; send contents of FILE +
-       --method=HTTPMethod         use method "HTTPMethod" in the request +
-       --body-data=STRING          send STRING as data. --method MUST be set +
-       --body-file=FILE            send contents of FILE. --method MUST be set +
-       --content-disposition       honor the Content-Disposition header when +
-                                     choosing local file names (EXPERIMENTAL) +
-       --content-on-error          output the received content on server errors +
-       --auth-no-challenge         send Basic HTTP authentication information +
-                                     without first waiting for the server'+
-                                     challenge+
  
-HTTPS (SSL/TLS) options: +Le script **/usr/lib64/sa/sa2** exécute la commande **sar** et consigne les informations dans un fichier au format **/var/log/sa/sar<jj>** :
-       --secure-protocol=PR        choose secure protocol, one of auto, SSLv2, +
-                                     SSLv3, TLSv1, TLSv1_1, TLSv1_2 and PFS +
-       --https-only                only follow secure HTTPS links +
-       --no-check-certificate      don't validate the server's certificate +
-       --certificate=FILE          client certificate file +
-       --certificate-type=TYPE     client certificate type, PEM or DER +
-       --private-key=FILE          private key file +
-       --private-key-type=TYPE     private key type, PEM or DER +
-       --ca-certificate=FILE       file with the bundle of CAs +
-       --ca-directory=DIR          directory where hash list of CAs is stored +
-       --crl-file=FILE             file with bundle of CRLs +
-       --pinnedpubkey=FILE/HASHES  Public key (PEM/DER) file, or any number +
-                                   of base64 encoded sha256 hashes preceded by +
-                                   'sha256//' and separated by ';', to verify +
-                                   peer against+
  
-       --ciphers=STR           Set the priority string (GnuTLS) or cipher list string (OpenSSL) directly. +<code> 
-                                   Use with care. This option overrides --secure-protocol. +[root@centos8 ~]# ls /var/log/sa
-                                   The format and syntax of this string depend on the specific SSL/TLS engine. +sa29  s
-HSTS options: +
-       --no-hsts                   disable HSTS +
-       --hsts-file                 path of HSTS database (will override default)+
  
-FTP options: 
-       --ftp-user=USER             set ftp user to USER 
-       --ftp-password=PASS         set ftp password to PASS 
-       --no-remove-listing         don't remove '.listing' files 
-       --no-glob                   turn off FTP file name globbing 
-       --no-passive-ftp            disable the "passive" transfer mode 
-       --preserve-permissions      preserve remote file permissions 
-       --retr-symlinks             when recursing, get linked-to files (not dir) 
  
-FTPS options: +ar29 
-       --ftps-implicit                 use implicit FTPS (default port is 990) +</code> 
-       --ftps-resume-ssl               resume the SSL/TLS session started in the control connection when + 
-                                         opening a data connection +Sous CentOS / RHEL 8, l'intervalle entre les collectes des informations est configuré par les **timers** de systemd au lieu des cron jobs : 
-       --ftps-clear-data-connection    cipher the control channel only; all the data will be in plaintext + 
-       --ftps-fallback-to-ftp          fall back to FTP if FTPS is not supported in the target server +<code> 
-WARC options: +[root@centos8 ~]# cat /usr/lib/systemd/system/sysstat-collect.timer 
-       --warc-file=FILENAME        save request/response data to a .warc.gz file +# /usr/lib/systemd/system/sysstat-collect.timer 
-       --warc-header=STRING        insert STRING into the warcinfo record +# (C) 2014 Tomasz Torcz <tomek@pipebreaker.pl> 
-       --warc-max-size=NUMBER      set maximum size of WARC files to NUMBER +# 
-       --warc-cdx                  write CDX index files +# sysstat-11.7.3 systemd unit file: 
-       --warc-dedup=FILENAME       do not store records listed in this CDX file +#        Activates activity collector every 10 minutes
-       --no-warc-compression       do not compress WARC files with GZIP +
-       --no-warc-digests           do not calculate SHA1 digests +
-       --no-warc-keep-log          do not store the log file in a WARC record +
-       --warc-tempdir=DIRECTORY    location for temporary files created by the +
-                                     WARC writer+
  
-Recursive download: +[Unit] 
-  -r,  --recursive                 specify recursive download +Description=Run system activity accounting tool every 10 minutes
-  -l,  --level=NUMBER              maximum recursion depth (inf or 0 for infinite) +
-       --delete-after              delete files locally after downloading them +
-  -k,  --convert-links             make links in downloaded HTML or CSS point to +
-                                     local files +
-       --convert-file-only         convert the file part of the URLs only (usually known as the basename) +
-       --backups=N                 before writing file X, rotate up to N backup files +
-  -K,  --backup-converted          before converting file X, back up as X.orig +
-  -m,  --mirror                    shortcut for -N -r -l inf --no-remove-listing +
-  -p,  --page-requisites           get all images, etc. needed to display HTML page +
-       --strict-comments           turn on strict (SGML) handling of HTML comments+
  
-Recursive accept/reject: +[Timer] 
-  -A,  --accept=LIST               comma-separated list of accepted extensions +OnCalendar=*:00/10
-  -R,  --reject=LIST               comma-separated list of rejected extensions +
-       --accept-regex=REGEX        regex matching accepted URLs +
-       --reject-regex=REGEX        regex matching rejected URLs +
-       --regex-type=TYPE           regex type (posix) +
-  -D,  --domains=LIST              comma-separated list of accepted domains +
-       --exclude-domains=LIST      comma-separated list of rejected domains +
-       --follow-ftp                follow FTP links from HTML documents +
-       --follow-tags=LIST          comma-separated list of followed HTML tags +
-       --ignore-tags=LIST          comma-separated list of ignored HTML tags +
-  -H,  --span-hosts                go to foreign hosts when recursive +
-  -L,  --relative                  follow relative links only +
-  -I,  --include-directories=LIST  list of allowed directories +
-       --trust-server-names        use the name specified by the redirection +
-                                     URL's last component +
-  -X,  --exclude-directories=LIST  list of excluded directories +
-  -np, --no-parent                 don't ascend to the parent directory+
  
-Email bug reports, questions, discussions to <bug-wget@gnu.org> +[Install] 
-and/or open issues at https://savannah.gnu.org/bugs/?func=additem&group=wget.+WantedBy=sysstat.service
 </code> </code>
  
-==== 3.ftp ====+La valeur de **OnCalendar** indique un collecte toutes les dix minutes. 
 + 
 +Pour modifier l'intervalle entre les collectes, il faut créer un fichier **override** dans le répertoire **/etc/systemd/system/** en utilisant la commande **systemctl edit**. En effet, il ne faut jamais éditer les fichiers dans le répertoire **/usr/lib/systemd/system** : 
 + 
 +<code> 
 +[root@centos8 ~]# systemctl edit sysstat-collect.timer 
 +[root@centos8 ~]# cat /etc/systemd/system/sysstat-collect.timer.d/override.conf  
 +[Unit] 
 +Description=Run system activity accounting tool every 2 minutes 
 + 
 +[Timer] 
 +OnCalendar= 
 +OnCalendar=*:00/2 
 +AccuracySec=
 +</code>
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** - Si la commande **ftp** n'est pas installée sous CentOS 8, installez-le à l'aide de la commande **dnf install ftp** en tant que root.+**Important** : Notez la ligne **OnCalendar=** qui est necessaire afin de surcharger la valeur par défaut.
 </WRAP> </WRAP>
  
-La commande **ftp** est utilisée pour le transfert de fichiers. Une fois connecté, il convient d'utiliser la commande **help** pour afficher la liste des commandes disponibles :+Vérifiez ensuite la prise en compte de la configuration :
  
 <code> <code>
-ftp> help +[root@centos8 ~]# systemctl status sysstat-collect.timer 
-Commands may be abbreviated.  Commands are:+● sysstat-collect.timer - Run system activity accounting tool every 2 minutes 
 +   Loaded: loaded (/usr/lib/systemd/system/sysstat-collect.timer; enabled; vendor preset: disabled) 
 +  Drop-In: /etc/systemd/system/sysstat-collect.timer.d 
 +           └─override.conf 
 +   Active: active (waiting) since Tue 2021-06-29 06:16:04 EDT; 3h 2min ago 
 +  Trigger: Tue 2021-06-29 09:20:00 EDT; 1min 19s left
  
-! debug mdir sendport site +Jun 29 06:16:04 centos8.ittraining.loc systemd[1]: Started Run system activity accounting tool every 10 minutes.
-$ dir mget put size +
-account disconnect mkdir pwd status +
-append exit mls quit struct +
-ascii form mode quote system +
-bell get modtime recv sunique +
-binary glob mput reget tenex +
-bye hash newer rstatus tick +
-case help nmap rhelp trace +
-cd idle nlist rename type +
-cdup image ntrans reset user +
-chmod lcd open restart umask +
-close ls prompt rmdir verbose +
-cr macdef passive runique ? +
-delete mdelete proxy send +
-ftp> +
 </code> </code>
  
-Le caractère **!** permet d'exécuter une commande sur la machine cliente+<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: Succeeded. 
 +Jun 29 06:26:29 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. 
 +Jun 29 06:30:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. 
 +Jun 29 06:40:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. 
 +Jun 29 06:50:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. 
 +Jun 29 07:00:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. 
 +Jun 29 07:10:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. 
 +Jun 29 07:20:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. 
 +Jun 29 07:30:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. 
 +Jun 29 07:40:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. 
 +Jun 29 07:50:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. 
 +Jun 29 07:53:56 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. 
 +Jun 29 07:54:00 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. 
 +Jun 29 07:56:00 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. 
 +Jun 29 07:58:00 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. 
 +Jun 29 08:00:00 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. 
 +... 
 +</code> 
 + 
 +Saisissez la commande suivante :
  
 <code> <code>
-ftp> !pwd +[root@centos8 ~]# sar 
-/root+Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_        (8 CPU) 
 + 
 +06:16:04     LINUX RESTART      (8 CPU) 
 + 
 +06:20:33        CPU     %user     %nice   %system   %iowait    %steal     %idle 
 +06:26:29        all      0.03      0.00      0.03      0.00      0.00     99.94 
 +06:30:33        all      0.02      0.00      0.03      0.00      0.00     99.95 
 +06:40:33        all      0.02      0.00      0.03      0.00      0.00     99.94 
 +06:50:33        all      0.02      0.00      0.02      0.00      0.00     99.95 
 +07:00:33        all      0.02      0.00      0.02      0.00      0.00     99.95 
 +07:10:33        all      0.02      0.00      0.02      0.00      0.00     99.95 
 +07:20:33        all      0.02      0.00      0.03      0.00      0.00     99.95 
 +07:30:33        all      0.02      0.01      0.03      0.00      0.00     99.94 
 +07:40:33        all      0.03      0.00      0.04      0.00      0.00     99.93 
 +07:50:33        all      0.03      0.00      0.03      0.00      0.00     99.94 
 +07:53:56        all      0.08      0.00      0.06      0.00      0.00     99.86 
 +07:54:00        all      0.09      0.00      0.06      0.00      0.00     99.85 
 +Average:        all      0.03      0.00      0.03      0.00      0.00     99.94 
 + 
 +07:55:44     LINUX RESTART      (8 CPU) 
 + 
 +07:56:00        CPU     %user     %nice   %system   %iowait    %steal     %idle 
 +07:58:00        all      0.03      0.00      0.03      0.00      0.00     99.94 
 +08:00:00        all      0.02      0.00      0.04      0.00      0.00     99.94 
 +08:02:00        all      0.02      0.00      0.03      0.00      0.00     99.94 
 +08:04:00        all      0.02      0.00      0.03      0.00      0.00     99.95 
 +08:06:00        all      0.02      0.00      0.03      0.00      0.00     99.95 
 +08:08:00        all      0.02      0.00      0.04      0.00      0.00     99.94 
 +08:10:00        all      0.02      0.00      0.03      0.00      0.00     99.95 
 +08:12:00        all      0.03      0.00      0.03      0.00      0.00     99.95 
 +08:14:00        all      0.02      0.00      0.03      0.01      0.00     99.94 
 +08:16:00        all      0.02      0.00      0.03      0.00      0.00     99.95 
 +08:18:00        all      0.02      0.00      0.03      0.00      0.00     99.95 
 +08:20:00        all      0.02      0.00      0.04      0.00      0.00     99.94 
 +08:22:00        all      0.02      0.00      0.03      0.00      0.00     99.95 
 +08:24:00        all      0.02      0.00      0.02      0.00      0.00     99.95 
 +08:26:00        all      0.02      0.00      0.03      0.00      0.00     99.95 
 +08:28:00        all      0.02      0.00      0.04      0.00      0.00     99.94 
 +08:30:00        all      0.02      0.05      0.05      0.00      0.00     99.87 
 +08:32:00        all      0.02      0.00      0.04      0.00      0.00     99.94 
 +08:34:00        all      0.02      0.00      0.04      0.00      0.00     99.94 
 +08:36:00        all      0.03      0.00      0.04      0.00      0.00     99.94 
 +08:38:00        all      0.02      0.00      0.04      0.00      0.00     99.94 
 +08:40:00        all      0.02      0.00      0.04      0.00      0.00     99.94 
 +08:42:00        all      0.02      0.00      0.03      0.00      0.00     99.94 
 +08:44:00        all      0.03      0.00      0.03      0.00      0.00     99.94 
 +08:46:00        all      0.02      0.00      0.03      0.00      0.00     99.94 
 +08:48:00        all      0.03      0.00      0.03      0.00      0.00     99.95 
 +08:50:00        all      0.02      0.00      0.04      0.00      0.00     99.94 
 +08:52:00        all      0.02      0.00      0.06      0.00      0.00     99.92 
 +08:54:00        all      0.02      0.00      0.03      0.00      0.00     99.95 
 +08:56:00        all      0.02      0.00      0.04      0.00      0.00     99.94 
 +08:58:00        all      0.02      0.00      0.02      0.00      0.00     99.96 
 +09:00:00        all      0.07      0.00      0.05      0.00      0.00     99.88 
 +09:02:00        all      0.02      0.00      0.04      0.00      0.00     99.94 
 +09:04:00        all      0.02      0.00      0.03      0.00      0.00     99.95 
 +09:06:00        all      0.02      0.00      0.04      0.00      0.00     99.94 
 +09:08:00        all      0.02      0.00      0.04      0.00      0.00     99.94 
 +09:10:00        all      0.02      0.00      0.03      0.00      0.00     99.95 
 +09:12:00        all      0.02      0.00      0.03      0.00      0.00     99.94 
 + 
 +09:12:00        CPU     %user     %nice   %system   %iowait    %steal     %idle 
 +09:14:00        all      0.02      0.00      0.03      0.00      0.00     99.95 
 +09:16:00        all      0.02      0.00      0.06      0.00      0.00     99.92 
 +09:18:00        all      0.03      0.00      0.03      0.00      0.00     99.95 
 +09:20:00        all      0.02      0.00      0.03      0.00      0.00     99.94 
 +Average:        all      0.02      0.00      0.03      0.00      0.00     99.94
 </code> </code>
  
-Pour transférer un fichier vers le serveur, il convient d'utiliser la commande **put** :+===Statistiques d'Utilisation du CPU===
  
-<file> +Visualisez maintenant les statistiques d'utilisation du CPU: 
-ftp> put nom_fichier_local nom_fichier_distant +
-</file>+
  
-Vous pouvez également transférer plusieurs fichiers à la fois grâce à la commande **mput**Dans ce cas précis, il convient de saisir la commande suivante:+<code> 
 +[root@centos8 ~]# sar -u 5 3 
 +Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_        (8 CPU)
  
-<file> +09:22:52        CPU     %user     %nice   %system   %iowait    %steal     %idle 
-ftp> mput nom*.* +09:22:57        all      0.03      0.00      0.03      0.00      0.00     99.95 
-</file>+09:23:02        all      0.03      0.00      0.03      0.00      0.00     99.95 
 +09:23:07        all      0.00      0.00      0.03      0.00      0.00     99.97 
 +Average:        all      0.02      0.00      0.03      0.00      0.00     99.96 
 +</code>
  
-Pour transférer un fichier du serveur, il convient d'utiliser la commande **get** :+D'avantage de statistiques peuvent être obtenues en utilisant l'option **ALL** :
  
-<file+<code
-ftp> get nom_fichier +[root@centos8 ~]# sar -u ALL 5 3 
-</file>+Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_(8 CPU)
  
-Vous pouvez également transférer plusieurs fichiers à la fois grâce à la commande **mget** ( voir la commande **mput** ci-dessus ).+01:49:14        CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest    %gnice     %idle 
 +01:49:19        all      0.03      0.00      0.00      0.00      0.00      0.03      0.00      0.00      0.00     99.95 
 +01:49:24        all      0.03      0.00      0.03      0.00      0.00      0.10      0.05      0.00      0.00     99.80 
 +01:49:29        all      0.00      0.00      0.00      0.25      0.00      0.10      0.05      0.00      0.00     99.60 
 +Average:        all      0.02      0.00      0.01      0.08      0.00      0.08      0.03      0.00      0.00     99.78 
 +</code>
  
-Pour supprimer un fichier sur le serveuril convient d'utiliser la commande **del** :+Pour consulter les statistiques d'un coeur spécifiqueutilisez l'option **-P** :
  
-<file+<code
-ftp> del nom_fichier +[root@centos8 ~]# sar -u -P 1 5 3 
-</file>+Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_        (8 CPU)
  
-Pour fermer la session, il convient d'utiliser la commande **quit** :+01:51:52        CPU     %user     %nice   %system   %iowait    %steal     %idle 
 +01:51:57          1      0.00      0.00      0.00      0.00      0.00    100.00 
 +01:52:02          1      0.20      0.00      0.00      0.00      0.00     99.80 
 +01:52:07          1      0.00      0.00      0.00      0.00      0.00    100.00 
 +Average:          1      0.07      0.00      0.00      0.00      0.00     99.93 
 +[root@centos8 ~]# sar -u -P 5 5 3 
 +Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_        (8 CPU) 
 + 
 +01:52:16        CPU     %user     %nice   %system   %iowait    %steal     %idle 
 +01:52:21          5      0.00      0.00      0.00      0.00      0.00    100.00 
 +01:52:26          5      0.00      0.00      0.00      0.00      0.00    100.00 
 +01:52:31          5      0.00      0.00      0.00      0.00      0.00    100.00 
 +Average:          5      0.00      0.00      0.00      0.00      0.00    100.00 
 +</code> 
 + 
 +===Statistiques d'Utilisation de la Mémoire et du Swap=== 
 + 
 +Utilisez l'option **-r** pour visualiser les statistiques concernant la mémoire :
  
 <code> <code>
-ftp> quit +[root@centos8 ~]# sar -r 5 3 
-[root@centos7 ~]# +Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        30/06/21        _x86_64_(8 CPU) 
 + 
 +07:33:32    kbmemfree   kbavail kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit  kbactive   kbinact   kbdirty 
 +07:33:37      1647240   2297232   2177792     56.94      3356    827396   5096432     70.94    359072   1486368         0 
 +07:33:42      1647232   2297224   2177800     56.94      3356    827396   5095788     70.93    359072   1486300         0 
 +07:33:47      1647232   2297224   2177800     56.94      3356    827396   5095788     70.93    359072   1486376         0 
 +Average:      1647235   2297227   2177797     56.94      3356    827396   5096003     70.94    359072   1486348         0
 </code> </code>
  
-====3.4 SSH====+Utilisez l'option **-S** pour visualiser les statistiques concernant le Swap :
  
-===Présentation===+<code> 
 +[root@centos8 ~]# sar -S 5 3 
 +Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        30/06/21        _x86_64_(8 CPU)
  
-La commande **[[wpfr>Ssh|ssh]]** est le successeur et la remplaçante de la commande **[[wpfr>Rlogin|rlogin]]**Il permet d'établir des connexions sécurisées avec une machine distanteSSH comporte cinq acteurs :+07:31:58    kbswpfree kbswpused  %swpused  kbswpcad   %swpcad 
 +07:32:03      3358716              0.00              0.00 
 +07:32:08      3358716              0.00              0.00 
 +07:32:13      3358716              0.00              0.00 
 +Average:      3358716              0.00              0.00 
 +</code>
  
-  * Le **serveur SSH** +===Statistiques des E/S===
-    * le démon sshd, qui s'occupe des authentifications et autorisations des clients,  +
-  * Le **client SSH** +
-    * ssh ou scp, qui assure la connexion et le dialogue avec le serveur, +
-  * La **session** qui représente la connexion courante et qui commence juste après l'authentification réussie, +
-  * Les **clefs** +
-    * **Couple de clef utilisateur asymétriques** et persistantes qui assurent l'identité d'un utilisateur et qui sont stockés sur disque dur, +
-    * **Clef hôte asymétrique et persistante** garantissant l'identité du serveur er qui est conservé sur disque dur +
-    * **Clef serveur asymétrique et temporaire** utilisée par le protocole SSH1 qui sert au chiffrement de la clé de session, +
-    * **Clef de session symétrique qui est générée aléatoirement** et qui permet le chiiffrement de la communication entre le client et le serveur. Elle est détruite en fin de session. SSH-1 utilise une seule clef tandis que SSH-2 utilise une clef par direction de la communication, +
-  * La **base de données des hôtes connus** qui stocke les clés des connexions précédentes.+
  
-SSH fonctionne de la manière suivante pour la la mise en place d'un canal sécurisé:+Utilisez l'option **-b** pour visualiser les statistiques concernant les E/S  :
  
-  * Le client contacte le serveur sur son port 22, +<code> 
-  * Les client et le serveur échangent leur version de SSH. En cas de non-compatibilité de versions, l'un des deux met fin au processus, +[root@centos8 ~]# sar -b 5 3 
-  * Le serveur SSH s'identifie auprès du client en lui fournissant : +Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_        (8 CPU)
-    * Sa clé hôte, +
-    * Sa clé serveur, +
-    * Une séquence aléatoire de huit octets à inclure dans les futures réponses du client, +
-    * Une liste de méthodes de chiffrage, compression et authentification, +
-  * Le client et le serveur produisent un identifiant identique, un haché MD5 long de 128 bits contenant la clé hôte, la clé serveur et la séquence aléatoire, +
-  * Le client génère sa clé de session symétrique et la chiffre deux fois de suite, une fois avec la clé hôte du serveur et la deuxième fois avec la clé serveurLe client envoie cette clé au serveur accompagnée de la séquence aléatoire et un choix d'algorithmes supportés, +
-  * Le serveur déchiffre la clé de session, +
-  * Le client et le serveur mettent en place le canal sécurisé.+
  
-==SSH-1==+09:24:49          tps      rtps      wtps   bread/  bwrtn/
 +09:24:54         0.00      0.00      0.00      0.00      0.00 
 +09:24:59         1.20      0.00      1.20      0.00     20.20 
 +09:25:04         0.00      0.00      0.00      0.00      0.00 
 +Average:         0.40      0.00      0.40      0.00      6.73 
 +</code>
  
-SSH-1 utilise une paire de clefs de type RSA1. Il assure l'intégrité des données par une **[[wpfr>Contrôle_de_redondance_cyclique|Contrôle de Redondance Cyclique]]** (CRC) et est un bloc dit **monolithique**.+===Statistiques des E/S par Disque===
  
-Afin de s'identifier, le client essaie chacune des six méthodes suivantes :+Utilisez l'option **-d** pour visualiser les statistiques concernant les E/S par disque :
  
-  * **Kerberos**, +<code> 
-  * **Rhosts**, +[root@centos8 ~]# sar -d 5 3 
-  * **%%RhostsRSA%%**, +Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_        (8 CPU)
-  * Par **clef asymétrique**, +
-  * **TIS**, +
-  * Par **mot de passe**.+
  
-==SSH-2==+09:25:45          DEV       tps     rkB/    wkB/  areq-sz    aqu-sz     await     svctm     %util 
 +09:25:50       dev8-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +09:25:50      dev8-16      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +09:25:50      dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +09:25:50     dev253-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +09:25:50     dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
  
-SSH-2 utilise **DSA** ou **RSA**Il assure l'intégrité des données par l'algorithme **HMAC**SSH-2 est organisé en trois **couches** :+09:25:50          DEV       tps     rkB/    wkB/  areq-sz    aqu-sz     await     svctm     %util 
 +09:25:55       dev8-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +09:25:55      dev8-16      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +09:25:55      dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +09:25:55     dev253-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +09:25:55     dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
  
-  * **SSH-TRANS** – Transport Layer Protocol, +09:25:55          DEV       tps     rkB/    wkB/  areq-sz    aqu-sz     await     svctm     %util 
-  * **SSH-AUTH** – Authentification Protocol, +09:26:00       dev8-0      0.60      0.00      0.30      0.50      0.01     13.00     13.00      0.78 
-  * **SSH-CONN** – Connection Protocol.+09:26:00      dev8-16      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +09:26:00      dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +09:26:00     dev253-0      0.60      0.00      0.50      0.83      0.01     12.67     13.00      0.78 
 +09:26:00     dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
  
-SSH-2 diffère de SSH-1 essentiellement dans la phase authentification+Average:          DEV       tps     rkB/    wkB/  areq-sz    aqu-sz     await     svctm     %util 
 +Average:       dev8-0      0.20      0.00      0.10      0.50      0.00     13.00     13.00      0.26 
 +Average:      dev8-16      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +Average:      dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +Average:     dev253-0      0.20      0.00      0.17      0.83      0.00     12.67     13.00      0.26 
 +Average:     dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +</code>
  
-Trois méthodes d'authentification :+La colonne **DEV** indentifie les disques par leurs majeurs et mineurs. Pour voir les informations avec les noms des disques, ajoutez l'option **-p** :
  
-  * Par **clef asymétrique**, +<code> 
-    * Identique à SSH-1 sauf avec l'algorithme DSA, +[root@centos8 ~]# sar -p -d 5 3 
-  * **%%RhostsRSA%%**, +Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        30/06/21        _x86_64_        (8 CPU)
-  * Par **mot de passe**.+
  
-==Options de la commande==+07:48:32          DEV       tps     rkB/    wkB/  areq-sz    aqu-sz     await     svctm     %util 
 +07:48:37          sda      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +07:48:37          sdb      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +07:48:37          sr0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +07:48:37    cl_centos8-root      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +07:48:37    cl_centos8-swap      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
  
-Les options de cette commande sont :+07:48:37          DEV       tps     rkB/    wkB/  areq-sz    aqu-sz     await     svctm     %util 
 +07:48:42          sda      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +07:48:42          sdb      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +07:48:42          sr0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +07:48:42    cl_centos8-root      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +07:48:42    cl_centos8-swap      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 + 
 +07:48:42          DEV       tps     rkB/    wkB/  areq-sz    aqu-sz     await     svctm     %util 
 +07:48:47          sda      0.40      0.00      0.40      1.00      0.02     56.00     56.50      2.26 
 +07:48:47          sdb      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +07:48:47          sr0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +07:48:47    cl_centos8-root      0.40      0.00      0.80      2.00      0.02     56.00     56.50      2.26 
 +07:48:47    cl_centos8-swap      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 + 
 +Average:          DEV       tps     rkB/    wkB/  areq-sz    aqu-sz     await     svctm     %util 
 +Average:          sda      0.13      0.00      0.13      1.00      0.01     56.00     56.50      0.75 
 +Average:          sdb      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +Average:          sr0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +Average:    cl_centos8-root      0.13      0.00      0.27      2.00      0.01     56.00     56.50      0.75 
 +Average:    cl_centos8-swap      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
 +</code> 
 + 
 +Les options de la commande sar sont :
  
 <code> <code>
-[root@centos8 ~]# ssh --help +[root@centos8 ~]# sar --help 
-unknown option -- - +Usagesar options ] [ <interval> [ <count> ] ] 
-usagessh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface+Main options and reports (report name between square brackets): 
-           [-b bind_address] [-c cipher_spec[-[bind_address:]port+        -B      Paging statistics [A_PAGE
-           [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11] +        -b      I/O and transfer rate statistics [A_IO] 
-           [-i identity_file[-[user@]host[:port]] [-L address+        -d      Block devices statistics [A_DISK
-           [-l login_name[-m mac_spec] [-O ctl_cmd[-o option] [-p port+        -MOUNT ] 
-           [-Q query_option] [-R address] [-S ctl_path] [-W host:port+                Filesystems statistics [A_FS] 
-           [-w local_tun[:remote_tun]] destination [command]+        -H      Hugepages utilization statistics [A_HUGE] 
 +        -I { <int_list> | SUM | ALL } 
 +                Interrupts statistics [A_IRQ] 
 +        -m { <keyword> [,...| ALL } 
 +                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 { <keyword> [,...| ALL } 
 +                Network statistics [A_NET_...] 
 +                Keywords are: 
 +                DEV     Network interfaces 
 +                EDEV    Network interfaces (errors) 
 +                NFS     NFS client 
 +                NFSD    NFS server 
 +                SOCK    Sockets (v4) 
 +                IP      IP traffic      (v4) 
 +                EIP     IP traffic      (v4) (errors) 
 +                ICMP    ICMP traffic    (v4) 
 +                EICMP   ICMP traffic    (v4) (errors) 
 +                TCP     TCP traffic     (v4) 
 +                ETCP    TCP traffic     (v4) (errors) 
 +                UDP     UDP traffic     (v4) 
 +                SOCK6   Sockets (v6) 
 +                IP6     IP traffic      (v6) 
 +                EIP6    IP traffic      (v6) (errors) 
 +                ICMP6   ICMP traffic    (v6) 
 +                EICMP6  ICMP traffic    (v6) (errors) 
 +                UDP6    UDP traffic     (v6) 
 +                FC      Fibre channel HBAs 
 +                SOFT    Software-based network processing 
 +        -q      Queue length and load average statistics [A_QUEUE] 
 +        -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]
 </code> </code>
  
-===Authentification par mot de passe===+=====Modules usb=====
  
-L'utilisateur fournit un mot de passe au client ssh. Le client ssh le transmet de façon sécurisée au serveur ssh puis  le serveur vérifie le mot de passe et l'accepte ou non.+L'**USB** (//Universal Serial Bus//) est un bus de données qui peut offrir des taux de transfert jusqu'à 480Mb/s sous la version 2.0 et jusqu'à 4.8 Gb/s sous la version 3.0Les modules nécessaires pour les contrôleurs USB sont :
  
-Avantage+^ Version USB ^ Module ^ Nom Complet ^ 
-  * Aucune configuration de clef asymétrique n'est nécessaire.+|  1.0\1.1  | **UHCI** | //Universal Controller Host Interface// | 
 +|  :::  | **OHCI** | //Open Controller Host Interface// | 
 + 2.0  | **EHCI** | //Enhanced Host Controller Interface// | 
 +|  3.0  | **XHCI** | //Extensible Host Controller Interface// |
  
-Inconvénients: +Le tableau suivant liste les modules courrament chargés en fonction du périphérique utilisé :
-  * L'utilisateur doit fournir à chaque connexion un identifiant et un mot de passe, +
-  * Moins sécurisé qu'un système par clef asymétrique.+
  
-===Authentification par clef asymétrique===+^ Module ^ Type de Périphérique ^  
 +|  **usb_storage**  | Supports de masse | 
 +|  **usbhid**  | Periphériques HID (//Human Interface Device//) | 
 +|  **snd-usb-audio**  | Cartes son usb | 
 +|  **usbvidéo**  | Cartes vidéo et d'acquisition | 
 +|  **irda-usb**  | Périphériques infrarouges | 
 +|  **usbnet**  | Cartes réseaux usb |
  
-  * Le **client** envoie au serveur une requête d'authentification par clé asymétrique qui contient le module de la clé à utiliser, +Les modules peuvent être chargés par un des moyens suivants :
-  * Le **serveur** recherche une correspondance pour ce module dans le fichier des clés autorisés **~/.ssh/authorized_keys**, +
-    * Dans le cas où une correspondance n'est pas trouvée, le serveur met fin à la communication, +
-    * Dans le cas contraire le serveur génère une chaîne aléatoire de 256 bits appelée un **challenge** et la chiffre avec la **clé publique du client**, +
-  * Le **client** reçoit le challenge et le décrypte avec la partie privée de sa clé. Il combine le challenge avec l'identifiant de session et chiffre le résultat. Ensuite il envoie le résultat chiffré au serveur. +
-  * Le **serveur** génère le même haché et le compare avec celui reçu du client. Si les deux hachés sont identiques, l'authentification est réussie.+
  
-===Configuration du Serveur===+  * INITrd, 
 +  * Le processus init (systemd), 
 +  * kmod, d'une manière dynamique et transparente lors du branchement du périphérique, 
 +  * udev, 
 +  * manuellement.
  
-La configuration du serveur s'effectue dans le fichier **/etc/ssh/sshd_config** :+=====udev=====
  
-<code> +Depuis le noyau Linux 2.6 Linux est capable de détecter des périphériques branchés à chaud. Cette technologie s'appelle le **//hotplugging//**Le //hotplugging// est obtenu grâce à l'utilisation de trois composants :
-[root@centos8 ~]# cat /etc/ssh/sshd_config +
-#       $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $+
  
-# This is the sshd server system-wide configuration file.  See +  * Udev, 
-# sshd_config(5) for more information.+  * HAL, 
 +  * Dbus.
  
-# This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin+Les rôles de chaque composant sont les suivants :
  
-# The strategy used for options in the default sshd_config shipped with +  * Udev se charge de créer et supprimer d'une manière dynamique les nœuds dans le répertoire **/dev**, 
-# OpenSSH is to specify options with their default value where +  * 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, 
-# possiblebut leave them commented.  Uncommented options override the +  * Dbus joue le rôle d'un bus système qui est utilisé pour la communication inter-processus.
-# default value.+
  
-# If you want to change the port on a SELinux systemyou have to tell +Lors de démarrage de LinuxUdev joue un rôle important : 
-# SELinux about this change+ 
-# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER+  * Au démarrage **tmpfs** est monté sur /dev, 
 +  * Udev copie les éventuels nœuds statiques de **/lib/udev/devices** vers /dev, 
 +  * le démon **udevd** collecte des données appelées **uevents** du noyau et cherche une règle correspondante dans le répertoire **/lib/udev/rules.d/**, 
 +  * 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 **/lib/udev/rules.d/*.rules** en mémoire, 
 +  * 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'//User Space//. Par exemple, lors du branchement d'une clé USB, Udev crée **/dev/sdb1** automatiquement et utilise les informations contenues dans le fichier **/lib/modules/`uname -r`/modules.alias** pour trouver le pilote nécessaire : 
 + 
 +Le fichier de configuration principal d'Udev est **/etc/udev/udev.conf** : 
 + 
 +<code> 
 +[root@centos8 ~]cat /etc/udev/udev.conf 
 +# see udev.conf(5) for details
 # #
-#Port 22 +udevd is also started in the initrd.  When this file is modified you might 
-#AddressFamily any +also want to rebuild the initrd, so that it will include the modified configuration.
-#ListenAddress 0.0.0.0 +
-#ListenAddress ::+
  
-HostKey /etc/ssh/ssh_host_rsa_key +#udev_log="info" 
-HostKey /etc/ssh/ssh_host_ecdsa_key +</code>
-HostKey /etc/ssh/ssh_host_ed25519_key+
  
-# Ciphers and keying +Les fichiers de règles se trouvent dans **/lib/udev/rules.d/** :
-#RekeyLimit default none+
  
-This system is following system-wide crypto policyThe changes to +<code> 
-# crypto properties (Ciphers, MACs, ...) will not have any effect here+[root@centos8 ~]ls /lib/udev/rules.d/ 
-# They will be overridden by command-line options passed to the server +01-md-raid-creating.rules              70-uaccess.rules 
-# on command line+10-dm.rules                            70-wacom.rules 
-# Please, check manual pages for update-crypto-policies(8) and sshd_config(5).+11-dm-lvm.rules                        71-biosdevname.rules 
 +11-dm-mpath.rules                      71-nvmf-iopolicy-netapp.rules 
 +11-dm-parts.rules                      71-prefixdevname.rules 
 +13-dm-disk.rules                       71-seat.rules 
 +39-usbmuxd.rules                       73-idrac.rules 
 +40-elevator.rules                      73-seat-late.rules 
 +40-libgphoto2.rules                    75-net-description.rules 
 +40-redhat.rules                        75-probe_mtd.rules 
 +40-usb-blacklist.rules                 75-rdma-description.rules 
 +40-usb_modeswitch.rules                77-mm-cinterion-port-types.rules 
 +50-udev-default.rules                  77-mm-dell-port-types.rules 
 +60-alias-kmsg.rules                    77-mm-ericsson-mbm.rules 
 +60-block.rules                         77-mm-fibocom-port-types.rules 
 +60-cdrom_id.rules                      77-mm-haier-port-types.rules 
 +60-drm.rules                           77-mm-huawei-net-port-types.rules 
 +60-evdev.rules                         77-mm-longcheer-port-types.rules 
 +60-fido-id.rules                       77-mm-mtk-port-types.rules 
 +60-input-id.rules                      77-mm-nokia-port-types.rules 
 +60-libfprint-2-autosuspend.rules       77-mm-pcmcia-device-blacklist.rules 
 +60-net.rules                           77-mm-quectel-port-types.rules 
 +60-persistent-alsa.rules               77-mm-sierra.rules 
 +60-persistent-input.rules              77-mm-simtech-port-types.rules 
 +60-persistent-storage.rules            77-mm-telit-port-types.rules 
 +60-persistent-storage-tape.rules       77-mm-ublox-port-types.rules 
 +60-persistent-v4l.rules                77-mm-usb-device-blacklist.rules 
 +60-raw.rules                           77-mm-usb-serial-adapters-greylist.rules 
 +60-rdma-ndd.rules                      77-mm-x22x-port-types.rules 
 +60-rdma-persistent-naming.rules        77-mm-zte-port-types.rules 
 +60-sensor.rules                        78-sound-card.rules 
 +60-serial.rules                        80-drivers.rules 
 +60-tpm-udev.rules                      80-iio-sensor-proxy.rules 
 +61-gdm.rules                           80-libinput-device-groups.rules 
 +61-gnome-bluetooth-rfkill.rules        80-mm-candidate.rules 
 +61-gnome-settings-daemon-rfkill.rules  80-net-setup-link.rules 
 +61-scsi-sg3_id.rules                   80-udisks2.rules 
 +62-multipath.rules                     81-kvm-rhel.rules 
 +63-fc-wwpn-id.rules                    84-nm-drivers.rules 
 +63-md-raid-arrays.rules                85-nm-unmanaged.rules 
 +63-scsi-sg3_symlink.rules              85-regulatory.rules 
 +64-btrfs.rules                         90-alsa-restore.rules 
 +64-md-raid-assembly.rules              90-bolt.rules 
 +65-libwacom.rules                      90-fwupd-devices.rules 
 +65-md-incremental.rules                90-iprutils.rules 
 +65-sane-backends.rules                 90-libinput-fuzz-override.rules 
 +66-kpartx.rules                        90-nm-thunderbolt.rules 
 +68-del-part-nodes.rules                90-pulseaudio.rules 
 +69-btattach-bcm.rules                  90-rdma-hw-modules.rules 
 +69-cd-sensors.rules                    90-rdma-ulp-modules.rules 
 +69-dm-lvm-metad.rules                  90-rdma-umad.rules 
 +69-libmtp.rules                        90-vconsole.rules 
 +69-md-clustered-confirm-device.rules   91-drm-modeset.rules 
 +70-hypervfcopy.rules                   95-cd-devices.rules 
 +70-hypervkvp.rules                     95-dm-notify.rules 
 +70-hypervvss.rules                     95-upower-csr.rules 
 +70-joystick.rules                      95-upower-hid.rules 
 +70-mouse.rules                         95-upower-wup.rules 
 +70-nvmf-autoconnect.rules              98-kexec.rules 
 +70-power-switch.rules                  99-qemu-guest-agent.rules 
 +70-printers.rules                      99-systemd.rules 
 +70-spice-vdagentd.rules                99-vmware-scsi-udev.rules 
 +70-touchpad.rules 
 +</code>
  
-# Logging +<WRAP center round important 60%> 
-#SyslogFacility AUTH +**Important** : Il vous est possible d'ajouter des règles si besoin est. Dans ce cas, créez un fichier **99-local.rules** est éditez-le au lieu d'éditer les fichiers existants. 
-SyslogFacility AUTHPRIV +</WRAP>
-#LogLevel INFO+
  
-# Authentication:+Comme indique le nom de chaque fichier, le contenu est composé de règles à l'attention d'udev. Le fichier des règles par défaut est le **50-udev-default.rules** :
  
-#LoginGraceTime 2m +<code> 
-PermitRootLogin yes +[root@centos8 ~]cat /lib/udev/rules.d/50-udev-default.rules | more 
-#StrictModes yes +do not edit this file, it will be overwritten on update
-#MaxAuthTries 6 +
-#MaxSessions 10+
  
-#PubkeyAuthentication yes+run a command on remove events 
 +ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}" 
 +ACTION=="remove", GOTO="default_end"
  
-# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 +SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"
-# but this is overridden so installations will only check .ssh/authorized_keys +
-AuthorizedKeysFile      .ssh/authorized_keys+
  
-#AuthorizedPrincipalsFile none+select "system RTC" or just use the first one 
 +SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc" 
 +SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100"
  
-#AuthorizedKeysCommand none +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb" 
-#AuthorizedKeysCommandUser nobody+ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}"
  
-# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +ACTION!="add", GOTO="default_end"
-#HostbasedAuthentication no +
-# Change to yes if you don't trust ~/.ssh/known_hosts for +
-# HostbasedAuthentication +
-#IgnoreUserKnownHosts no +
-# Don't read the user's ~/.rhosts and ~/.shosts files +
-#IgnoreRhosts yes+
  
-# To disable tunneled clear text passwordschange to no here! +SUBSYSTEM=="tty"KERNEL=="ptmx", GROUP="tty", MODE="0666" 
-#PasswordAuthentication yes +SUBSYSTEM=="tty", KERNEL=="tty", GROUP="tty", MODE="0666" 
-#PermitEmptyPasswords no +SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620" 
-PasswordAuthentication yes+SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620" 
 +SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620" 
 +SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620" 
 +SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty" 
 +KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
  
-# Change to no to disable s/key passwords +SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
-#ChallengeResponseAuthentication yes +
-ChallengeResponseAuthentication no+
  
-# Kerberos options +SUBSYSTEM=="input", GROUP="input" 
-#KerberosAuthentication no +SUBSYSTEM=="input", KERNEL=="js[0-9]*", MODE="0664"
-#KerberosOrLocalPasswd yes +
-#KerberosTicketCleanup yes +
-#KerberosGetAFSToken no +
-#KerberosUseKuserok yes+
  
-# GSSAPI options +SUBSYSTEM=="video4linux", GROUP="video" 
-GSSAPIAuthentication yes +SUBSYSTEM=="graphics", GROUP="video" 
-GSSAPICleanupCredentials no +SUBSYSTEM=="drm", KERNEL!="renderD*", GROUP="video" 
-#GSSAPIStrictAcceptorCheck yes +SUBSYSTEM=="dvb", GROUP="video" 
-#GSSAPIKeyExchange no +SUBSYSTEM=="media", GROUP="video" 
-#GSSAPIEnablek5users no+SUBSYSTEM=="cec", GROUP="video"
  
-# Set this to 'yes' to enable PAM authenticationaccount processing, +SUBSYSTEM=="drm"KERNEL=="renderD*"GROUP="render"MODE="0666" 
-# and session processing. If this is enabledPAM authentication will +SUBSYSTEM=="kfd"GROUP="render", MODE="0666"
-# be allowed through the ChallengeResponseAuthentication and +
-# PasswordAuthentication.  Depending on your PAM configuration, +
-# PAM authentication via ChallengeResponseAuthentication may bypass +
-# the setting of "PermitRootLogin without-password"+
-# If you just want the PAM account and session checks to run without +
-# PAM authenticationthen enable this but set PasswordAuthentication +
-# and ChallengeResponseAuthentication to 'no'+
-# WARNING: 'UsePAM no' is not supported in Fedora and may cause several +
-# problems. +
-UsePAM yes+
  
-#AllowAgentForwarding yes +SUBSYSTEM=="sound", GROUP="audio", \ 
-#AllowTcpForwarding yes +  OPTIONS+="static_node=snd/seq", OPTIONS+="static_node=snd/timer" 
-#GatewayPorts no +--More-- 
-X11Forwarding yes +</code>
-#X11DisplayOffset 10 +
-#X11UseLocalhost yes +
-#PermitTTY yes+
  
-# It is recommended to use pam_motd in /etc/pam.d/sshd instead of PrintMotd, +Chaque règle prend la forme suivante :
-# as it is more configurable and versatile than the built-in version. +
-PrintMotd no+
  
-#PrintLastLog yes +KEY, [KEY, ...] NAME [, SYMLINK]
-#TCPKeepAlive yes +
-#PermitUserEnvironment no +
-#Compression delayed +
-#ClientAliveInterval 0 +
-#ClientAliveCountMax 3 +
-#UseDNS no +
-#PidFile /var/run/sshd.pid +
-#MaxStartups 10:30:100 +
-#PermitTunnel no +
-#ChrootDirectory none +
-#VersionAddendum none+
  
-# no default banner path +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 :
-#Banner none+
  
-# Accept locale-related environment variables +^ Type ^ Description ^ Exemples ^ 
-AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES +| BUS | Type de bus | usb, scsi, ide | 
-AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT +| KERNEL | Le nom par défault du périphérique donné par le noyau | hda, ttyUSB0, lp0 | 
-AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE +| SUBSYSTEM | Le nom noyau du sous-système, généralement identique à la valeur du BUS | usb, scsi | 
-AcceptEnv XMODIFIERS+| 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'à 5 fichiers est possible par règle | S/O | 
 +| PROGRAM | Ceci permet à Udev d'appeler un programme externe pour nommer un périphérique | S/O | 
 +| RESULT | Valeur à comparer au résultat de PROGRAM | S/O |
  
-# override default of no subsystems +NAME et SYMLINK sont utilisées pour stipuler ce que Udev doit faire avec le périphérique :
-Subsystem       sftp    /usr/libexec/openssh/sftp-server+
  
-# Example of overriding settings on a per-user basis +^ Type ^ Description ^ Exemples ^ 
-#Match User anoncvs +| NAME | Le nome du nœud dans /dev | S/O | 
-#       X11Forwarding no +| SYMLINK | Le ou les lien(s) symbolique(s) qui pointe(nt) vers le NAME | S/O | 
-#       AllowTcpForwarding no + 
-#       PermitTTY no +====La commande udevadm====
-#       ForceCommand cvs server +
-</code>+
  
-Pour ôter les lignes de commentaires dans ce fichier, utilisez la commande suivante :+Pour obtenir de l'information sur un périphérique il convient d'utiliser la commande **udevadm** :
  
 <code> <code>
-[root@centos8 ~]# cd /tmp ; grep --v '^(#|$)'  /etc/ssh/sshd_config > sshd_config +[root@centos8 ~]# udevadm info --query=all -n /dev/sda 
-[root@centos8 tmp]# cat sshd_config  +P: /devices/pci0000:00/0000:00:07.0/ata3/host2/target2:0:0/2:0:0:0/block/sda 
-HostKey /etc/ssh/ssh_host_rsa_key +N: sda 
-HostKey /etc/ssh/ssh_host_ecdsa_key +S: disk/by-id/ata-QEMU_HARDDISK_QM00005 
-HostKey /etc/ssh/ssh_host_ed25519_key +S: disk/by-id/scsi-0ATA_QEMU_HARDDISK_QM00005 
-SyslogFacility AUTHPRIV +S: disk/by-id/scsi-1ATA_QEMU_HARDDISK_QM00005 
-PermitRootLogin yes +S: disk/by-id/scsi-SATA_QEMU_HARDDISK_QM00005 
-AuthorizedKeysFile      .ssh/authorized_keys +S: disk/by-path/pci-0000:00:07.0-ata-1 
-PasswordAuthentication yes +E: DEVLINKS=/dev/disk/by-path/pci-0000:00:07.0-ata-1 /dev/disk/by-id/scsi-SATA_QEMU_HARDDISK_QM00005 /dev/disk/by-id/ata-QEMU_HARDDISK_QM00005 /dev/disk/by-id/scsi-0ATA_QEMU_HARDDISK_QM00005 /dev/disk/by-id/scsi-1ATA_QEMU_HARDDISK_QM00005 
-ChallengeResponseAuthentication no +E: DEVNAME=/dev/sda 
-GSSAPIAuthentication yes +E: DEVPATH=/devices/pci0000:00/0000:00:07.0/ata3/host2/target2:0:0/2:0:0:0/block/sda 
-GSSAPICleanupCredentials no +E: DEVTYPE=disk 
-UsePAM yes +E: ID_ATA=1 
-X11Forwarding yes +E: ID_ATA_FEATURE_SET_SMART=1 
-PrintMotd no +E: ID_ATA_FEATURE_SET_SMART_ENABLED=1 
-AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES +E: ID_ATA_SATA=1 
-AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT +E: ID_ATA_WRITE_CACHE=1 
-AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE +E: ID_ATA_WRITE_CACHE_ENABLED=1 
-AcceptEnv XMODIFIERS +E: ID_BUS=ata 
-Subsystem       sftp    /usr/libexec/openssh/sftp-server+E: ID_MODEL=QEMU_HARDDISK 
 +E: ID_MODEL_ENC=QEMU\x20HARDDISK\x20\x20\x20 
 +E: ID_PART_TABLE_TYPE=dos 
 +E: ID_PART_TABLE_UUID=b39ec5c8 
 +E: ID_PATH=pci-0000:00:07.0-ata-1 
 +E: ID_PATH_TAG=pci-0000_00_07_0-ata-1 
 +E: ID_REVISION=2.5+ 
 +E: ID_SCSI=1 
 +E: ID_SCSI_INQUIRY=1 
 +E: ID_SERIAL=QEMU_HARDDISK_QM00005 
 +E: ID_SERIAL_SHORT=QM00005 
 +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=:systemd: 
 +E: USEC_INITIALIZED=8735808
 </code> </code>
  
-Pour sécuriser le serveur ssh, ajoutez ou modifiez les directives suivantes :+===Les options de la commande===
  
-<file> +Les options de la commande udevadm sont :
-AllowGroups adm +
-Banner /etc/issue.net +
-HostbasedAuthentication no +
-IgnoreRhosts yes +
-LoginGraceTime 60 +
-LogLevel INFO +
-PermitEmptyPasswords no +
-PermitRootLogin no +
-PrintLastLog yes +
-Protocol 2 +
-StrictModes yes +
-X11Forwarding no +
-</file> +
- +
-Votre fichier ressemblera à celui-ci :+
  
 <code> <code>
-[root@centos8 tmp]# vi sshd_config  +[root@centos8 ~]# udevadm --help 
-[root@centos8 tmp]# cat sshd_config  +udevadm [--help] [--version] [--debug] COMMAND [COMMAND OPTIONS
-AllowGroups adm + 
-Banner /etc/issue.net +Send control commands or test the device manager
-HostbasedAuthentication no + 
-IgnoreRhosts yes +Commands: 
-LoginGraceTime 60 +  info          Query sysfs or the udev database 
-LogLevel INFO +  trigger       Request events from the kernel 
-PermitEmptyPasswords no +  settle        Wait for pending udev events 
-PermitRootLogin no +  control       Control the udev daemon 
-PrintLastLog yes +  monitor       Listen to kernel and udev events 
-Protocol 2 +  test          Test an event run 
-StrictModes yes +  test-builtin  Test a built-in command 
-X11Forwarding no + 
-HostKey /etc/ssh/ssh_host_rsa_key +[root@centos8 ~]# udevadm info --help 
-HostKey /etc/ssh/ssh_host_ecdsa_key +udevadm info [OPTIONS] [DEVPATH|FILE] 
-HostKey /etc/ssh/ssh_host_ed25519_key + 
-SyslogFacility AUTHPRIV +Query sysfs or the udev database
-AuthorizedKeysFile      .ssh/authorized_keys + 
-PasswordAuthentication yes +  -h --help                   Print this message 
-ChallengeResponseAuthentication no +  -V --version                Print version of the program 
-GSSAPIAuthentication yes +  -q --query=TYPE             Query device information: 
-GSSAPICleanupCredentials no +       name                     Name of device node 
-UsePAM yes +       symlink                  Pointing to node 
-PrintMotd no +       path                     sysfs device path 
-AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES +       property                 The device properties 
-AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT +       all                      All values 
-AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE +  -p --path=SYSPATH           sysfs device path used for query or attribute walk 
-AcceptEnv XMODIFIERS +  -n --name=NAME              Node or symlink name used for query or attribute walk 
-Subsystem       sftp    /usr/libexec/openssh/sftp-server+  -r --root                   Prepend dev directory to path names 
 +  -a --attribute-walk         Print all key matches walking along the chain 
 +                              of parent devices 
 +  -d --device-id-of-file=FILE Print major:minor of device containing this file 
 +  -x --export                 Export key/value pairs 
 +  -P --export-prefix          Export the key name with a prefix 
 +  -e --export-db              Export the content of the udev database 
 +  -c --cleanup-db             Clean up the udev database
 </code> </code>
  
-Renommez le fichier **/etc/ssh/sshd_config** en **/etc/ssh/sshd_config.old** :+=====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 :
  
 <code> <code>
-[root@centos8 tmp]# cp /etc/ssh/sshd_config /etc/ssh/sshd_config.old+[root@centos8 ~]# ls -l /sys 
 +total 0 
 +drwxr-xr-x.   2 root root 0 Jul 12 08:15 block 
 +drwxr-xr-x.  33 root root 0 Jul 12 08:15 bus 
 +drwxr-xr-x.  57 root root 0 Jul 12 08:15 class 
 +drwxr-xr-x.   4 root root 0 Jul 12 08:15 dev 
 +drwxr-xr-x.  14 root root 0 Jul 12 08:15 devices 
 +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.  15 root root 0 Jul 12 08:15 kernel 
 +drwxr-xr-x. 153 root root 0 Jul 12 08:15 module 
 +drwxr-xr-x  2 root root 0 Jul 12 08:15 power
 </code> </code>
  
-Copiez le fichier **/tmp/sshd_config** vers **/etc/ssh/** :+Chaque répertoire contient des informations : 
 + 
 +  * **block** 
 +    contient des informations sur les périphériques bloc 
 +  * **bus** 
 +    * contient des informations sur les bus de données 
 +  * **class** 
 +    * contient des informations sur des classes de matériel 
 +  * **devices** 
 +    * contient des informations sur la position des périphériques sur les bus 
 +  * **firmware** 
 +    * contient, entre autre, des informations sur l'ACPI 
 +  * **module** 
 +    * contient des informations sur les modules du noyau 
 +  * **power** 
 +    * contient des informations sur la gestion de l'énergie 
 +  * **fs** 
 +    * contient des informations sur les systèmes de fichiers 
 + 
 +Pour illustrer ceci, saisissez la commande suivante :
  
 <code> <code>
-[root@centos8 tmp]# cp /tmp/sshd_config /etc/ssh +[root@centos8 ~]# cat /sys/block/sda/sda1/size 
-cp: overwrite '/etc/ssh/sshd_config'? y+2097152
 </code> </code>
  
-Redémarrez le service sshd :+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'utilisation de la commande **ulimit**.  
 + 
 +La commande **ulimit** gère deux types de limite, la limite //hard// en utilisant l'option **-H** et la limite //soft// en utilisant l'option **-S**. Seul root peut positionner une limite //hard// et ceci à condition que la limite ne dépasse pas les ressources réelles. 
 + 
 +La limite //soft// est la limite imposée à l'utilisateur par défaut tandis que la limite //hard// est la limite que l'utilisateur peut atteindre en utilisant la commande ulimit lui-même. 
 + 
 +L'utilisateur root peut paramétrer les limites accordées en éditant la fichier **/etc/security/limits.conf** :
  
 <code> <code>
-[root@centos8 tmp]# systemctl restart sshd +[root@centos8 ~]# cat /etc/security/limits.conf 
-[root@centos8 tmp]systemctl status sshd +/etc/security/limits.conf 
-● sshd.service - OpenSSH server daemon +
-   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor presetenabled) +#This file sets the resource limits for the users logged in via PAM
-   Activeactive (running) since Mon 2021-08-30 02:17:00 EDT; 11s ago +#It does not affect resource limits of the system services. 
-     Docsman:sshd(8+
-           man:sshd_config(5+#Also note that configuration files in /etc/security/limits.d directory, 
- Main PID: 1042039 (sshd+#which are read in alphabetical order, override the settings in this 
-    Tasks:(limit: 23535+#file in case the domain is the same or more specific. 
-   Memory: 1.1M +#That means for example that setting a limit for wildcard domain here 
-   CGroup: /system.slice/sshd.service +#can be overriden with a wildcard setting in a config file in the 
-           └─1042039 /usr/sbin/sshd --oCiphers=aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,a>+#subdirectory, but a user specific setting here can be overriden only 
 +#with a user specific setting in the subdirectory. 
 +
 +#Each line describes a limit for a user in the form
 +
 +#<domain>        <type>  <item>  <value> 
 +
 +#Where: 
 +#<domain> can be: 
 +#        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 
 +
 +#<type> can have the two values: 
 +#        - "soft" for enforcing the soft limits 
 +#        - "hard" for enforcing hard limits 
 +
 +#<item> can be one of the following: 
 +#        - 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: [-2019] 
 +#        - rtprio - max realtime priority 
 +
 +#<domain     <type>  <item>         <value> 
 +#
  
-Aug 30 02:17:00 centos8.ittraining.loc systemd[1]Starting OpenSSH server daemon..+#*               soft    core            0 
-Aug 30 02:17:00 centos8.ittraining.loc sshd[1042039]Server listening on 0.0.0.0 port 22. +#*               hard    rss             10000 
-Aug 30 02:17:00 centos8.ittraining.loc sshd[1042039]: Server listening on :: port 22+#@student        hard    nproc           20 
-Aug 30 02:17:00 centos8.ittraining.loc systemd[1]: Started OpenSSH server daemon. +#@faculty        soft    nproc           20 
-[q] +#@faculty        hard    nproc           50 
-</code>+#ftp             hard    nproc           0 
 +#@student        -       maxlogins       4 
 + 
 +# End of file 
 +</code>  
 + 
 +<WRAP center round important 60%> 
 +**Important** La valeur de la limite peut être un **nombre** ou le mot **unlimited**
 +</WRAP> 
 + 
 +Par exemple, si root inscrit les deux ligne suivantes dans le fichier /etc/security/limits.conf 
 + 
 +<file> 
 +... 
 +trainee                soft        nofile          1024 
 +trainee                hard        nofile          4096 
 +... 
 +</file>
  
-Mettez l'utilisateur **trainee** dans le groupe **adm** :+la limite du nombre de fichiers ouverts simultanément par trainee est de 1 024. Par contre, trainee a la possibilité d'augmenter cette limite jusqu'à 4 096 en utilisant la commande suivante :
  
 <code> <code>
-[root@centos8 tmp]# groups trainee +$ ulimit -n 4096
-trainee : trainee +
-[root@centos8 tmp]# usermod -aG adm trainee +
-[root@centos8 tmp]# groups trainee +
-trainee : trainee adm+
 </code> </code>
  
-Pour générer les clefs du serveursaisissez la commande suivante en tant que **root**. Notez que la passphrase doit être **vide**.+Pour consulter la liste des limites actuellesil convient d'utiliser la commande ulimit avec l'option **-a** :
  
 <code> <code>
-[root@centos8 tmp]# ssh-keygen -t dsa +[root@centos8 ~]# ulimit -a 
-Generating public/private dsa key pair. +core file size          (blocks, -cunlimited 
-Enter file in which to save the key (/root/.ssh/id_dsa): /etc/ssh/ssh_host_dsa_key +data seg size           (kbytes, -dunlimited 
-Enter passphrase (empty for no passphrase) +scheduling priority             (-e) 0 
-Enter same passphrase again:  +file size               (blocks, -f) unlimited 
-Your identification has been saved in /etc/ssh/ssh_host_dsa_key. +pending signals                 (-i) 14702 
-Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub. +max locked memory       (kbytes, -l) 64 
-The key fingerprint is: +max memory size         (kbytes, -m) unlimited 
-SHA256:dywC6jKyIMaTxsaEamz1kmthEmuG18HxmS22qRICOYk root@centos8.ittraining.loc +open files                      (-n) 1024 
-The key's randomart image is: +pipe size            (512 bytes, -p) 8 
-+---[DSA 1024]----+ +POSIX message queues     (bytes, -q) 819200 
-|                 | +real-time priority              (-r) 0 
-|    .            | +stack size              (kbytes, -s) 8192 
-|.o . o.+         | +cpu time               (seconds, -t) unlimited 
-|E.  o.*..  .     | +max user processes              (-u) 14702 
-|+ooo.o +S o o    | +virtual memory          (kbytes, -v) unlimited 
-|X==++ o  o o     | +file locks                      (-x) unlimited 
-|B/=+oo           | +</code> 
-|Ooo++            | + 
-|. .o             | +====Options de la commande====
-+----[SHA256]-----+ +
-</code> +
  
-De la même façon, il est possible de générer les clefs au format **[[https://fr.wikipedia.org/wiki/Chiffrement_RSA|RSA]]**, **[[https://fr.wikipedia.org/wiki/Elliptic_curve_digital_signature_algorithm|ECDSA]]** et **[[https://fr.wikipedia.org/wiki/EdDSA|ED25519]]** :+Les options de **ulimit** sont :
  
 <code> <code>
-[root@centos8 tmp]# ssh-keygen -t rsa +[root@centos8 ~]# help ulimit 
-Generating public/private rsa key pair+ulimit: ulimit [-SHabcdefiklmnpqrstuvxPT] [limit] 
-Enter file in which to save the key (/root/.ssh/id_rsa): /etc/ssh/ssh_host_rsa_key +    Modify shell resource limits
-Enter passphrase (empty for no passphrase):  +     
-Enter same passphrase again:  +    Provides control over the resources available to the shell and processes 
-Your identification has been saved in /etc/ssh/ssh_host_rsa_key+    it creates, on systems that allow such control
-Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub. +     
-The key fingerprint is+    Options
-SHA256:8jXFK50NnoJCz9E7aPKpFYSYCstCPfRsdmlLBTNUnKg root@centos8.ittraining.loc +      -S        use the `soft' resource limit 
-The key's randomart image is: +      -H        use the `hardresource limit 
-+---[RSA 3072]----+ +      -a        all current limits are reported 
-|    .==o.      | +      -b        the socket buffer size 
-|  o oo o=+ .     | +      -c        the maximum size of core files created 
-|.. oo=+=o . +    | +      -d        the maximum size of a process's data segment 
-|oo .+E++.+ = *   | +      -e        the maximum scheduling priority (`nice'
-|o..   +.S B * .  | +      -f        the maximum size of files written by the shell and its children 
-|.      B + =     | +      -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 
-+----[SHA256]-----+ +      -n        the maximum number of open file descriptors 
-[root@centos8 tmp]# ssh-keygen -t ecdsa +      -p        the pipe buffer size 
-Generating public/private ecdsa key pair. +      -q        the maximum number of bytes in POSIX message queues 
-Enter file in which to save the key (/root/.ssh/id_ecdsa): /etc/ssh/ssh_host_ecdsa_key +      -r        the maximum real-time scheduling priority 
-Enter passphrase (empty for no passphrase):  +      -s        the maximum stack size 
-Enter same passphrase again:  +      -t        the maximum amount of cpu time in seconds 
-Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key. +      -u        the maximum number of user processes 
-Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub. +      -v        the size of virtual memory 
-The key fingerprint is: +      -x        the maximum number of file locks 
-SHA256:AMqFUJKGqnUEPh/IYda0wnbW1kXK+lnprpHsOo4UMbI root@centos8.ittraining.loc +      -P        the maximum number of pseudoterminals 
-The key's randomart image is: +      -T        the maximum number of threads 
-+---[ECDSA 256]---+ +     
-|++*=+    .o      +    Not all options are available on all platforms
-|oX.=o+ o o       | +     
-|o %.B + +        | +    If LIMIT is given, it is the new value of the specified resource; the 
-|...O.= o       | +    special LIMIT values `soft', `hard', and `unlimited' stand for the 
-|..E.o . S o      | +    current soft limit, the current hard limit, and no limit, respectively
-|.    . o =       | +    Otherwise, the current value of the specified resource is printed If 
-     * .      | +    no option is given, then -f is assumed
-|   . ... o       | +     
-   ..ooo..      | +    Values are in 1024-byte increments, except for -t, which is in seconds, 
-+----[SHA256]-----+ +    -p, which is in increments of 512 bytes, and -u, which is an unscaled 
-[root@centos8 tmp]# ssh-keygen -t ed25519 +    number of processes
-Generating public/private ed25519 key pair+     
-Enter file in which to save the key (/root/.ssh/id_ed25519): /etc/ssh/ssh_host_ed25519_key +    Exit Status: 
-Enter passphrase (empty for no passphrase):  +    Returns success unless an invalid option is supplied or an error occurs.
-Enter same passphrase again:  +
-Your identification has been saved in /etc/ssh/ssh_host_ed25519_key. +
-Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub. +
-The key fingerprint is+
-SHA256:CtbcN9iXv00PfbHFGf2bEW7iRibOFwRctyqM5hmlhwE root@centos8.ittraining.loc +
-The key's randomart image is: +
-+--[ED25519 256]--+ +
-|       E  .... . | +
-|        .  .. . o| +
-|         . . . +.| +
-|     o . oB ..o.=| +
-   o o S*+=o* *+| +
-|   . .o.*o*.+.B| +
-|      .  o o +o++| +
-|            o  =o| +
-|              . o| +
-+----[SHA256]-----++
 </code> </code>
  
-Les clefs publiques générées possèdent l'extension **.pub**. Les clefs privées n'ont pas d'extension :+====4.2 - Groupes de Contrôle==== 
 + 
 +Les **Groupes de Contrôles** (//Control Groups//) aussi appelés **CGroups**, sont une façon de contrôler et de limiter des ressources. Les groupes de contrôle permettent l'allocation de ressources, même d'une manière dynamique pendant que le système fonctionne, telles le temps processeur, la mémoire système, la bande réseau, ou une combinaison de ces ressources parmi des groupes de tâches (processus) définis par l'utilisateur et exécutés sur un système. 
 + 
 +Les groupes de contrôle sont organisés de manière hiérarchique, comme des processus. Par contre, la comparaison entre les deux démontre que tandis que les processus se trouvent dans une arborescence unique descandant tous du processus init et héritant de l'environnement de leurs parents, les contrôles groupes peuvent être multiples donnant lieu à des arborescences ou **hiérarchies** multiples qui héritent de certains attributs de leurs groupes de contrôle parents. 
 + 
 +Ces hiérarchies multiples et séparés sont necéssaires parce que chaque hiérarchie est attaché à un ou plusieurs **sous-système(s)** aussi appelés des **Contrôleurs de Ressources** ou simplement des **Contrôleurs**. Les contrôleurs disponibles sous RHEl/CentOS 7 sont : 
 + 
 +  * **blkio** - utilisé pour établir des limites sur l'accès des entrées/sorties à partir et depuis des périphériques blocs, 
 +  * **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'accès des tâches aux périphériques dans un groupe de contrôle, 
 +  * **freezer** - utilisé pour suspendre ou pour réactiver les tâches dans un groupe de contrôle, 
 +  * **memory** - utilisé pour établir les limites d'utilisation de la mémoire par les tâches d'un groupe de contrôle et pour génèrer des rapports automatiques sur les ressources rmémoire utilisées par ces tâches, 
 +  * **net_cls** - utilisé pour repèrer les paquets réseau avec un identifiant de classe (//classid//) afin de permettre au contrôleur de trafic Linux, **tc**,  d'identifier les paquets provenant d'une tâche particulière d'un groupe de contrôle. 
 +  * **perf_event**  - utilisé pour permettre le monitoring des CGroups avec l'outil perf, 
 +  * **hugetlb** - utilisé pour limiter des ressources sur des pages de mémoire virtuelle de grande taille. 
 + 
 +Pour visualiser les hiérarchies, il convient d'utiliser la commande **lssubsys** :
  
 <code> <code>
-[root@centos8 tmp]# ls /etc/ssh +[root@centos8 ~]# lssubsys -am 
-moduli      ssh_config.d  sshd_config.old     ssh_host_ecdsa_key.pub  ssh_host_ed25519_key.pub  ssh_host_rsa_key.pub +bash: lssubsys: command not found... 
-ssh_config  sshd_config   ssh_host_ecdsa_key  ssh_host_ed25519_key    ssh_host_rsa_key+Install package 'libcgroup-tools' to provide command 'lssubsys'? [N/y] y 
 + 
 + 
 + * Waiting in queue...  
 +The following packages have to be installed: 
 + libcgroup-0.41-19.el8.x86_64   Library to control and monitor control groups 
 + libcgroup-tools-0.41-19.el8.x86_64     Command-line utility programs, services and daemons for libcgroup 
 +Proceed with changes? [N/y] y 
 + 
 + 
 + * Waiting in queue...  
 + * Waiting for authentication...  
 + * Waiting in queue...  
 + * Downloading packages...  
 + * Requesting data...  
 + * Testing changes...  
 + * Installing packages...  
 +cpuset /sys/fs/cgroup/cpuset 
 +cpu,cpuacct /sys/fs/cgroup/cpu,cpuacct 
 +blkio /sys/fs/cgroup/blkio 
 +memory /sys/fs/cgroup/memory 
 +devices /sys/fs/cgroup/devices 
 +freezer /sys/fs/cgroup/freezer 
 +net_cls,net_prio /sys/fs/cgroup/net_cls,net_prio 
 +perf_event /sys/fs/cgroup/perf_event 
 +hugetlb /sys/fs/cgroup/hugetlb 
 +pids /sys/fs/cgroup/pids 
 +rdma /sys/fs/cgroup/rdma
 </code> </code>
  
-Re-démarrez ensuite le service sshd :+<code> 
 +[root@centos8 ~]# lssubsys -am 
 +cpuset /sys/fs/cgroup/cpuset 
 +cpu,cpuacct /sys/fs/cgroup/cpu,cpuacct 
 +blkio /sys/fs/cgroup/blkio 
 +memory /sys/fs/cgroup/memory 
 +devices /sys/fs/cgroup/devices 
 +freezer /sys/fs/cgroup/freezer 
 +net_cls,net_prio /sys/fs/cgroup/net_cls,net_prio 
 +perf_event /sys/fs/cgroup/perf_event 
 +hugetlb /sys/fs/cgroup/hugetlb 
 +pids /sys/fs/cgroup/pids 
 +rdma /sys/fs/cgroup/rdma 
 +</code>  
 + 
 +Sous RHEL/CentOS 8, **Systemd** organise les processus dans chaque CGroup. Par exemple tous les processus démarrés par le serveur Apache se trouveront dans le même CGroup, y compris les scripts CGI. Ceci implique que la gestion des ressources en utilisant des hiérarchies est couplé avec l'arborescence des unités de Systemd. 
 + 
 +En haut de l'arborescence des unités de Systemd se trouve la tranche root - **-.slice**, dont dépend : 
 + 
 +  * le **system.slice** - l'emplacement des services système, 
 +  * le **user.slice** - l'emplacement des sessions des utilisateurs, 
 +  * le **machine.slice** - l'emplacement des machines virtuelles et conteneurs. 
 + 
 +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 :
  
 <code> <code>
-[root@centos8 tmp]# systemctl restart sshd.service +[root@centos8 ~]# systemctl list-units --type=slice 
-[root@centos8 tmp]# systemctl status sshd.service +UNIT                                        LOAD   ACTIVE SUB    DESCRIPTION                                 
-● sshd.service OpenSSH server daemon +-.slice                                     loaded active active Root Slice                                  
-   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled) +machine.slice                               loaded active active Virtual Machine and Container Slice         
-   Active: active (running) since Mon 2021-08-30 02:24:57 EDT; 9s ago +system-getty.slice                          loaded active active system-getty.slice                          
-     Docs: man:sshd(8) +system-lvm2\x2dpvscan.slice                 loaded active active system-lvm2\x2dpvscan.slice                 
-           man:sshd_config(5) +system-sshd\x2dkeygen.slice                 loaded active active system-sshd\x2dkeygen.slice                 
- Main PID: 1042204 (sshd) +system-systemd\x2dfsck.slice                loaded active active system-systemd\x2dfsck.slice                
-    Tasks: 1 (limit: 23535) +system-systemd\x2dhibernate\x2dresume.slice loaded active active system-systemd\x2dhibernate\x2dresume.slice 
-   Memory: 1.1M +system-user\x2druntime\x2ddir.slice         loaded active active system-user\x2druntime\x2ddir.slice         
-   CGroup: /system.slice/sshd.service +system-vncserver.slice                      loaded active active system-vncserver.slice                      
-           └─1042204 /usr/sbin/sshd --oCiphers=aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,a>+system.slice                                loaded active active System Slice                                
 +user-1000.slice                             loaded active active User Slice of UID 1000                      
 +user-42.slice                               loaded active active User Slice of UID 42                        
 +user.slice                                  loaded active active User and Session Slice                     
  
-Aug 30 02:24:57 centos8.ittraining.loc systemd[1]: Starting OpenSSH server daemon... +LOAD   = Reflects whether the unit definition was properly loaded. 
-Aug 30 02:24:57 centos8.ittraining.loc sshd[1042204]Server listening on 0.0.0.0 port 22+ACTIVE = The high-level unit activation state, i.e. generalization of SUB. 
-Aug 30 02:24:57 centos8.ittraining.loc sshd[1042204]: Server listening on :: port 22+SUB    = The low-level unit activation state, values depend on unit type. 
-Aug 30 02:24:57 centos8.ittraining.loc systemd[1]Started OpenSSH server daemon. + 
-[q]+13 loaded units listed. Pass --all to see loaded but inactive units, too. 
 +To show all installed unit files use 'systemctl list-unit-files'
 +</code> 
 + 
 +L'arborescence des unités de Systemd est la suivante : 
 + 
 +<code> 
 +[root@centos8 ~]# systemd-cgls 
 +Control group /: 
 +-.slice 
 +├─user.slice 
 +│ ├─user-42.slice 
 +│ │ ├─session-c1.scope 
 +│ │ │ ├─1317 gdm-session-worker [pam/gdm-launch-environment] 
 +│ │ │ ├─1459 /usr/libexec/gdm-wayland-session --register-session gnome-session --autostart /usr/share/gdm/greeter/autostart 
 +│ │ │ ├─1856 /usr/libexec/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart 
 +│ │ │ ├─1882 /usr/bin/gnome-shell 
 +│ │ │ ├─2059 /usr/bin/Xwayland :1024 -rootless -terminate -accessx -core -listen 4 -listen 5 -displayfd 6 
 +│ │ │ ├─2132 ibus-daemon --xim --panel disable 
 +│ │ │ ├─2135 /usr/libexec/ibus-dconf 
 +│ │ │ ├─2138 /usr/libexec/ibus-x11 --kill-daemon 
 +│ │ │ ├─2251 /usr/libexec/gsd-xsettings 
 +│ │ │ ├─2261 /usr/libexec/gsd-a11y-settings 
 +│ │ │ ├─2268 /usr/libexec/gsd-clipboard 
 +│ │ │ ├─2271 /usr/libexec/gsd-color 
 +│ │ │ ├─2272 /usr/libexec/gsd-datetime 
 +│ │ │ ├─2273 /usr/libexec/gsd-housekeeping 
 +│ │ │ ├─2274 /usr/libexec/gsd-keyboard 
 +│ │ │ ├─2275 /usr/libexec/gsd-media-keys 
 +│ │ │ ├─2280 /usr/libexec/gsd-mouse 
 +│ │ │ ├─2281 /usr/libexec/gsd-power 
 +│ │ │ ├─2283 /usr/libexec/gsd-print-notifications 
 +│ │ │ ├─2284 /usr/libexec/gsd-rfkill 
 +│ │ │ ├─2285 /usr/libexec/gsd-screensaver-proxy 
 +│ │ │ ├─2290 /usr/libexec/gsd-sharing 
 +│ │ │ ├─2321 /usr/libexec/gsd-smartcard 
 +│ │ │ ├─2328 /usr/libexec/gsd-sound 
 +│ │ │ ├─2333 /usr/libexec/gsd-wacom 
 +│ │ │ └─2432 /usr/libexec/ibus-engine-simple 
 +│ │ └─user@42.service 
 +│ │   ├─xdg-permission-store.service 
 +│ │   │ └─2170 /usr/libexec/xdg-permission-store 
 +│ │   ├─pulseaudio.service 
 +│ │   │ └─1455 /usr/bin/pulseaudio --daemonize=no --log-target=journal 
 +│ │   ├─init.scope 
 +│ │   │ ├─1357 /usr/lib/systemd/systemd --user 
 +│ │   │ └─1377 (sd-pam) 
 +│ │   ├─at-spi-dbus-bus.service 
 +│ │   │ ├─2090 /usr/libexec/at-spi-bus-launcher 
 +│ │   │ ├─2095 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3 
 +│ │   │ └─2098 /usr/libexec/at-spi2-registryd --use-gnome-session 
 +│ │   └─dbus.service 
 +│ │     ├─1755 /usr/bin/dbus-daemon --session --address=systemd--nofork --nopidfile --systemd-activation --syslog-only 
 +│ │     └─2143 /usr/libexec/ibus-portal 
 +│ └─user-1000.slice 
 +│   ├─user@1000.service 
 +│   │ ├─gvfs-goa-volume-monitor.service 
 +│   │ │ └─2369 /usr/libexec/gvfs-goa-volume-monitor 
 +│   │ ├─xdg-permission-store.service 
 +│   │ │ └─2191 /usr/libexec/xdg-permission-store 
 +│   │ ├─tracker-store.service 
 +│   │ │ └─2653 /usr/libexec/tracker-store 
 +│   │ ├─evolution-calendar-factory.service 
 +│   │ │ ├─2605 /usr/libexec/evolution-calendar-factory 
 +│   │ │ └─2706 /usr/libexec/evolution-calendar-factory-subprocess --factory all --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.Calendarx2605x2 --own-path /org/gnome/evolution> 
 +│   │ ├─pulseaudio.service 
 +│   │ │ └─1456 /usr/bin/pulseaudio --daemonize=no --log-target=journal 
 +│   │ ├─gvfs-daemon.service 
 +│   │ │ ├─1896 /usr/libexec/gvfsd 
 +│   │ │ └─1901 /usr/libexec/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes 
 +│   │ ├─evolution-source-registry.service 
 +│   │ │ └─2206 /usr/libexec/evolution-source-registry 
 +│   │ ├─gvfs-udisks2-volume-monitor.service 
 +│   │ │ └─2243 /usr/libexec/gvfs-udisks2-volume-monitor 
 +│   │ ├─init.scope 
 +│   │ │ ├─1239 /usr/lib/systemd/systemd --user 
 +│   │ │ └─1318 (sd-pam) 
 +│   │ ├─gvfs-gphoto2-volume-monitor.service 
 +│   │ │ └─2269 /usr/libexec/gvfs-gphoto2-volume-monitor 
 +│   │ ├─at-spi-dbus-bus.service 
 +│   │ │ ├─1964 /usr/libexec/at-spi-bus-launcher 
 +│   │ │ ├─1969 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3 
 +│   │ │ └─1972 /usr/libexec/at-spi2-registryd --use-gnome-session 
 +│   │ ├─dbus.service 
 +│   │ │ ├─1786 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only 
 +│   │ │ ├─2183 /usr/libexec/ibus-portal 
 +│   │ │ ├─2201 /usr/libexec/gnome-shell-calendar-server 
 +│   │ │ ├─2225 /usr/libexec/goa-daemon 
 +│   │ │ ├─2397 /usr/libexec/goa-identity-service 
 +│   │ │ └─2721 /usr/libexec/dconf-service 
 +│   │ ├─evolution-addressbook-factory.service 
 +│   │ │ ├─2727 /usr/libexec/evolution-addressbook-factory 
 +│   │ │ └─2771 /usr/libexec/evolution-addressbook-factory-subprocess --factory all --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.AddressBookx2727x2 --own-path /org/gnome/evo> 
 +│   │ ├─gvfs-mtp-volume-monitor.service 
 +lines 44-86
 </code> </code>
  
-===Configuration du Client===+En utilisant Systemd, plusieurs ressources peuvent être limitées :
  
-Saisissez maintenant les commandes suivantes en tant que **trainee** :+  * **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%> <WRAP center round important 60%>
-**Important** - Lors de la génération des clefs, la passphrase doit être **vide**.+**Important** : Consultez le manuel systemd.resource-control(5) pour voir les paramètres CGroup qui peuvent être passés à systemctl.
 </WRAP> </WRAP>
  
-<code> +===Limitation de la Mémoire===
-[root@centos8 tmp]# exit +
-logout +
-[trainee@centos8 ~]$ ssh-keygen -t dsa +
-Generating public/private dsa key pair. +
-Enter file in which to save the key (/home/trainee/.ssh/id_dsa):  +
-Created directory '/home/trainee/.ssh'+
-Enter passphrase (empty for no passphrase):  +
-Enter same passphrase again:  +
-Your identification has been saved in /home/trainee/.ssh/id_dsa. +
-Your public key has been saved in /home/trainee/.ssh/id_dsa.pub. +
-The key fingerprint is: +
-SHA256:Qd17X1iROjk5rLOQBbyVg1hNXkUdTeiFtEpn3rgPKc4 trainee@centos8.ittraining.loc +
-The key's randomart image is: +
-+---[DSA 1024]----+ +
-|        =o+o.o+OB| +
-|       o +o=o oo=+
-|        . +.+oB+ | +
-|         o o.&+o.| +
-|        S o o.*.o| +
-|         o o   o.| +
-|          . + +  | +
-|           + . o | +
-|            E   .| +
-+----[SHA256]-----+ +
-[trainee@centos8 ~]$ ssh-keygen -t rsa +
-Generating public/private rsa key pair.+
  
-Enter file in which to save the key (/home/trainee/.ssh/id_rsa): Enter passphrase (empty for no passphrase):  +Commencez par créer le script **hello-world.sh** qui servira à générer un processus pour travailler avec les CGroups : 
-Enter same passphrase again:  + 
-Your identification has been saved in /home/trainee/.ssh/id_rsa. +<code> 
-Your public key has been saved in /home/trainee/.ssh/id_rsa.pub. +[root@centos8 ~]# vi hello-world.sh 
-The key fingerprint is: +[root@centos8 ~]# cat hello-world.sh 
-SHA256:BgEjoWQrGCzdJfyZczVZYVoafiHsz9GK5PDWuywG/z0 trainee@centos8.ittraining.loc +#!/bin/bash 
-The key's randomart image is: +while ]; do 
-+---[RSA 3072]----+ +        echo "hello world" 
-|o+o++oo  .oo*.   | +        sleep 360 
-|=+o.oo . .=B .   | +done
-|=.   ..o o+...   | +
-|.     =.o o.. .  | +
-|       oS= = o   | +
-|       .. = =    | +
-|             | +
-|          +...E  | +
-|         . o+... | +
-+----[SHA256]-----+ +
-[trainee@centos8 ~]$ ssh-keygen -t ecdsa +
-Generating public/private ecdsa key pair. +
-Enter file in which to save the key (/home/trainee/.ssh/id_ecdsa):  +
-Enter passphrase (empty for no passphrase):  +
-Enter same passphrase again:  +
-Your identification has been saved in /home/trainee/.ssh/id_ecdsa. +
-Your public key has been saved in /home/trainee/.ssh/id_ecdsa.pub. +
-The key fingerprint is: +
-SHA256:mpBDgsCxP2DqRPkmGvXHpNnvm5B+Cl7MSiiZKfDjWLk trainee@centos8.ittraining.loc +
-The key's randomart image is: +
-+---[ECDSA 256]---+ +
-|o..              | +
-|.oo              | +
-|.*o . .          | +
-|+.++ B           | +
-|+o =B + S        | +
-|=*oo.* =         | +
-|B.* o O .        | +
-|.= = = o..       | +
-|. E o oo+.       | +
-+----[SHA256]-----+ +
-[trainee@centos8 ~]$ ssh-keygen -t ed25519 +
-Generating public/private ed25519 key pair+
-Enter file in which to save the key (/home/trainee/.ssh/id_ed25519):  +
-Enter passphrase (empty for no passphrase):  +
-Enter same passphrase again:  +
-Your identification has been saved in /home/trainee/.ssh/id_ed25519. +
-Your public key has been saved in /home/trainee/.ssh/id_ed25519.pub. +
-The key fingerprint is: +
-SHA256:JfFxG2mg9feAvFGxoxZ8uSsON3sXvtYQYYg5iVxzZS4 trainee@centos8.ittraining.loc +
-The key's randomart image is: +
-+--[ED25519 256]--+ +
-|       ..o*=++=. | +
-       o==O+Boo | +
-       o ooE.O. | +
-|           O.= | +
-|        S   + ...| +
-|            .o | +
-|          . + o.o| +
-|           + +.oo| +
-|            o..o.| +
-+----[SHA256]-----++
 </code> </code>
  
-Les clés générées seront placées dans le répertoire **~/.ssh/** :+Rendez le script exécutable et testez-le :
  
 <code> <code>
-[trainee@centos8 ~]$ ls .ssh +[root@centos8 ~]# chmod u+x hello-world.sh 
-id_dsa  id_dsa.pub  id_ecdsa  id_ecdsa.pub  id_ed25519  id_ed25519.pub  id_rsa  id_rsa.pub+[root@centos8 ~]# ./hello-world.sh 
 +hello world 
 +^C
 </code> </code>
  
-===Tunnels SSH===+Créez maintenant un CGroup dans le sous-système **memory** appelé **helloworld** :
  
-Le protocole SSH peut être utilisé pour sécuriser les protocoles tels telnet, pop3 etc.. En effet, on peut créer un //tunnel// SSH dans lequel passe les communications du protocole non-sécurisé.+<code> 
 +[root@centos8 ~]# mkdir /sys/fs/cgroup/memory/helloworld 
 +</code>
  
-La commande pour créer un tunnel ssh prend la forme suivante :+Par défaut, ce CGroup héritera de l'ensemble de la mémoire disponible. Pour éviter cela, créez maintenant une limite de **40000000** octets pour ce CGroup :
  
-  ssh -N -f compte@hôte -Lport-local:localhost:port_distant+<code> 
 +[root@centos8 ~]# echo 40000000 > /sys/fs/cgroup/memory/helloworld/memory.limit_in_bytes 
 +[root@centos8 ~]# cat /sys/fs/cgroup/memory/helloworld/memory.limit_in_bytes 
 +39997440 
 +</code>
  
-Dans votre cas, vous allez créer un tunnel dans votre propre vm entre le port 15023 et le port 23 :+<WRAP center round important 60%> 
 +**Important** - Notez que les 40 000 000 demandés sont devenus 39 997 440 ce qui correspond à un nombre entier de pages mémoire du noyau de 4Ko. ( 39 997 440 / 4096 = 9 765 ). 
 +</WRAP> 
 + 
 +Lancez maintenant le script **helloworld.sh** 
  
 <code> <code>
-[root@centos8 ~]# ssh -N -f trainee@localhost -L15023:localhost:23 +[root@centos8 ~]# ./hello-world.sh & 
-\S +[1] 35148 
-Kernel \r on an \m + 
-trainee@localhost's passwordtrainee+[root@centos8 ~]# hello world 
 +[Entrée] 
 + 
 +[root@centos8 ~]# ps aux | grep hello-world 
 +root       35148  0.0  0.0  12724  2980 pts/1    S    08:48   0:00 /bin/bash ./hello-world.sh 
 +root       35151  0.0  0.0  12136  1044 pts/1    S+   08:48   0:00 grep --color=auto hello-world
 </code> </code>
  
-Installez maintenant le serveur telnet :+Notez qu'il n'y a pas de limite de la mémoire, ce qui implique l'héritage par défaut :
  
 <code> <code>
-[root@centos8 ~]# dnf install telnet-server+[root@centos8 ~]# ps -ww -o cgroup 35148 
 +CGROUP 
 +12:memory:/user.slice/user-1000.slice/session-7.scope,7:devices:/user.slice,4:pids:/user.slice/user-1000.slice/session-7.scope,2:blkio:/user.slice,1:name=systemd:/user.slice/user-1000.slice/session-7.scope
 </code> </code>
  
-Telnet n'est ni démarré ni activé. Il convient donc de le démarrer et de l'activer :+Insérer le PID de notre script dans le CGroup **helloworld** :
  
 <code> <code>
-[root@centos8 ~]# systemctl status telnet.socket +[root@centos8 ~]# echo 35148 > /sys/fs/cgroup/memory/helloworld/cgroup.procs 
-● telnet.socket - Telnet Server Activation Socket +</code>
-   Loaded: loaded (/usr/lib/systemd/system/telnet.socket; disabled; vendor preset: disabled) +
-   Active: inactive (dead) +
-     Docs: man:telnetd(8) +
-   Listen: [::]:23 (Stream) +
- Accepted: 0; Connected: 0; +
-  +
-[root@centos8 ~]# systemctl start telnet.socket+
  
-[root@centos8 ~]# systemctl status telnet.socket +Notez maintenant l'héritage de la limitation de la mémoire **12:memory:/helloworld** :
-● telnet.socket Telnet Server Activation Socket +
-   Loadedloaded (/usr/lib/systemd/system/telnet.socket; disabled; vendor presetdisabled) +
-   Active: active (listening) since Mon 2021-08-30 02:44:01 EDT; 4s ago +
-     Docs: man:telnetd(8) +
-   Listen: [::]:23 (Stream) +
- Accepted: 0; Connected: 0; +
-   CGroup: /system.slice/telnet.socket+
  
-Aug 30 02:44:01 centos8.ittraining.loc systemd[1]: Listening on Telnet Server Activation Socket. +<code> 
- +[root@centos8 ~]# ps -ww -o cgroup 35148 
-[root@centos8 ~]# systemctl enable telnet.socket +CGROUP 
-Created symlink /etc/systemd/system/sockets.target.wants/telnet.socket → /usr/lib/systemd/system/telnet.socket.+12:memory:/helloworld,7:devices:/user.slice,4:pids:/user.slice/user-1000.slice/session-7.scope,2:blkio:/user.slice,1:name=systemd:/user.slice/user-1000.slice/session-7.scope
 </code> </code>
  
-Connectez-vous ensuite via telnet sur le port 15023, vous constaterez que votre connexion n'aboutit pas :+Constatez ensuite l'occupation mémoire réelle :
  
 <code> <code>
-[root@centos8 ~]# telnet localhost 15023 +[root@centos8 ~]# cat /sys/fs/cgroup/memory/helloworld/memory.usage_in_bytes 
-Trying ::1..+274432 
-Connected to localhost. +</code>
-Escape character is '^]'.+
  
-Kernel 4.18.0-305.7.1.el8.i2tch.x86_64 on an x86_64 +Tuez le script **hello-world.sh** :  
-centos8 logintrainee + 
-Password:  +<code> 
-Last login: Mon Aug 30 02:37:00 from ::1 +[root@centos8 ~]# kill 35148 
-[trainee@centos8 ~]$ whoami +[root@centos8 ~]# ps aux | grep hello-world 
-trainee +root       35307  0.0  0.0  12136  1112 pts/1    S+   08:55   0:00 grep --color=auto hello-world 
-[trainee@centos8 ~]$ pwd +[1]+  Terminated              ./hello-world.sh
-/home/trainee+
 </code> </code>
  
-<WRAP center round important 60%> +Créez un second CGroup beaucoup plus restrictif :
-**Important** - Notez bien que votre communication telnet passe par le tunnel SSH. +
-</WRAP>+
  
-====3.5 - SCP====+<code> 
 +[root@centos8 ~]# mkdir /sys/fs/cgroup/memory/helloworld1 
 +[root@centos8 ~]# echo 6000 > /sys/fs/cgroup/memory/helloworld1/memory.limit_in_bytes 
 +[root@centos8 ~]# cat /sys/fs/cgroup/memory/helloworld1/memory.limit_in_bytes 
 +4096 
 +</code>
  
-===Présentation===+Relancez le script **hello-world.sh** et insérez-le dans le nouveau CGroup :
  
-La commande **scp** est le successeur et la remplaçante de la commande **rcp** de la famille des commandes **remote**Il permet de faire des transferts sécurisés à partir d'une machine distante :+<code> 
 +[root@centos8 ~]# ./hello-world.sh & 
 +[1] 35389
  
-  $ scp compte@numero_ip(nom_de_machine):/chemin_distant/fichier_distant /chemin_local/fichier_local+[root@centos8 ~]# hello world 
 +[Entrée]
  
-ou vers une machine distante :+[root@centos8 ~]# echo 35389 > /sys/fs/cgroup/memory/helloworld1/cgroup.procs 
 +</code>
  
-  $ scp /chemin_local/fichier_local compte@numero_ip(nom_de_machine):/chemin_distant/fichier_distant+Attendez la prochaine sortie de **hello world** sur le canal standard puis constatez que le script s'arrête :
  
-===Utilisation===+<code> 
 +[root@centos8 ~]# hello world 
 +[Entrée] 
 +[1]+  Killed                  ./hello-world.sh 
 +</code>
  
-Nous allons maintenant utiliser **scp** pour chercher un fichier sur le <<serveur>> :+===La Commande cgcreate===
  
-Créez le fichier **/home/trainee/scp_test** :+Cette commande permet la création d'un CGroup :
  
 <code> <code>
-[trainee@centos8 ~]$ touch scp-test +[root@centos8 ~]# cgcreate -g memory:helloworld2 
-[trainee@centos8 ~]$ exit +[root@centos8 ~]# ls -l /sys/fs/cgroup/memory/helloworld2/ 
-logout +total 0 
-Connection closed by foreign host+-rw-rw-r--1 root root 0 Jul 13 10:39 cgroup.clone_children 
-[root@centos8 ~]# +--w--w----. 1 root root 0 Jul 13 10:39 cgroup.event_control 
 +-rw-rw-r--. 1 root root 0 Jul 13 10:39 cgroup.procs 
 +-rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.failcnt 
 +--w--w----. 1 root root 0 Jul 13 10:39 memory.force_empty 
 +-rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.failcnt 
 +-rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.limit_in_bytes 
 +-rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.max_usage_in_bytes 
 +-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 
 +-rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.tcp.limit_in_bytes 
 +-rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.tcp.max_usage_in_bytes 
 +-r--r--r--. 1 root root 0 Jul 13 10:39 memory.kmem.tcp.usage_in_bytes 
 +-r--r--r--. 1 root root 0 Jul 13 10:39 memory.kmem.usage_in_bytes 
 +-rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.limit_in_bytes 
 +-rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.max_usage_in_bytes 
 +-rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.memsw.failcnt 
 +-rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.memsw.limit_in_bytes 
 +-rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.memsw.max_usage_in_bytes 
 +-r--r--r--. 1 root root 0 Jul 13 10:39 memory.memsw.usage_in_bytes 
 +-rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.move_charge_at_immigrate 
 +-r--r--r--. 1 root root 0 Jul 13 10:39 memory.numa_stat 
 +-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 
 +-rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.soft_limit_in_bytes 
 +-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 
 +-r--r--r--. 1 root root 0 Jul 13 10:39 memory.usage_in_bytes 
 +-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 
 +-rw-rw-r--. 1 root root 0 Jul 13 10:39 tasks
 </code> </code>
  
-Récupérez le fichier **scp_test** en utilisant scp :+Il n'existe cependant pas de commande pour affecter une limitation de la mémoire :
  
 <code> <code>
-[root@centos8 ~]# scp trainee@127.0.0.1:/home/trainee/scp-test . +[root@centos8 ~]# echo 40000000 > /sys/fs/cgroup/memory/helloworld2/memory.limit_in_bytes
-The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established. +
-ECDSA key fingerprint is SHA256:Q7T/CP0SLiMbMAIgVzTuEHegYS/spPE5zzQchCHD5Vw. +
-Are you sure you want to continue connecting (yes/no/[fingerprint])? yes +
-Warning: Permanently added '127.0.0.1' (ECDSA) to the list of known hosts. +
-\S +
-Kernel \r on an \m +
-trainee@127.0.0.1's password: trainee +
-scp-test                                                                                                           100%    0     0.0KB/  00:00     +
- +
-[root@centos8 ~]# ls -l +
-total 32 +
--rw-------. 1 root root 1358 Jun 16 06:40 anaconda-ks.cfg +
-drwxr-xr-x. 3 root root   21 Jun 16 06:39 home +
--rw-r--r--. 1 root root 1749 Aug 24 11:20 I2TCH.asc +
--rw-r--r--. 1 root root 1853 Jun 16 06:54 initial-setup-ks.cfg +
--rw-r--r--. 1 root root   31 Aug 24 11:22 message.txt +
--rw-r--r--. 1 root root  561 Aug 24 11:32 message.txt.asc +
--rw-r--r--. 1 root root  367 Aug 24 11:30 message.txt.gpg +
--rw-r--r--. 1 root root  329 Aug 24 11:23 message.txt.sig +
--rw-r--r--. 1 root root    0 Aug 30 03:55 scp-test +
--rw-r--r--. 1 root root   46 Aug 29 06:22 wget_file.txt+
 </code> </code>
  
-====3.6 - Mise en Place des Clefs Asymétriques====+==La Commande cgexec==
  
-Il convient maintenant de se connecter sur le <<serveur>> en utilisant ssh et vérifiez la présence du répertoire ~/.ssh :+Cette commande permet d'insérer la limitation dans le CGroup **et** de lancer le script en une seule ligne :
  
 <code> <code>
-[root@centos8 ~]# ssh -l trainee 127.0.0.1 +[root@centos8 ~]# cgexec -g memory:helloworld2 ./hello-world.sh & 
-\S +[1] 37670
-Kernel \r on an \m +
-trainee@127.0.0.1's password: trainee +
-Activate the web console with: systemctl enable --now cockpit.socket+
  
-[trainee@centos8 ~]$ ls -la | grep .ssh +[root@centos8 ~]# hello world 
-drwx------.  2 trainee trainee      4096 Aug 30 02:26 .ssh+[Entrée] 
 + 
 +[root@centos8 ~]# 
 </code> </code>
  
-<WRAP center round important 60%> +==La Commande cgdelete==
-**Important** - Si le dossier distant .ssh n'existe pas dans le répertoire personnel de l'utilisateur connecté, il faut le créer avec des permissions de 700. Dans votre cas, puisque votre machine joue le rôle de serveur **et** du client, le dossier /home/trainee/.ssh existe **déjà**. +
-</WRAP>+
  
-Ensuiteil convient de transférer le fichier local **.ssh/id_ecdsa.pub** du <<client>> vers le <<serveur>> en le renommant en **authorized_keys** :+Une fois le script terminécette commande permet de supprimer le cgroup :
  
 <code> <code>
-[trainee@centos8 ~]$ exit +[root@centos8 ~]# ps aux | grep *.sh 
-logout +root       37670  0.0  0.0  12724  3112 pts/1    S    10:41   0:00 /bin/bash ./hello-world.sh 
-Connection to 127.0.0.1 closed.+root       37685  0.0  0.0  12136  1148 pts/   S+   10:42   0:00 grep --color=auto hello-world.sh
  
-[root@centos8 ~]# exit +[root@centos8 ~]# kill 37670
-logout+
  
-[trainee@centos8 ~]$ scp .ssh/id_ecdsa.pub trainee@127.0.0.1:/home/trainee/.ssh/authorized_keys +root@centos8 ~]# ps aux | grep *.sh 
-The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established. +root       37726  0.0  0.0  12136  1156 pts/   R+   10:43   0:00 grep --color=auto hello-world.sh 
-ECDSA key fingerprint is SHA256:Q7T/CP0SLiMbMAIgVzTuEHegYS/spPE5zzQchCHD5Vw+[1]+  Terminated              cgexec -g memory:helloworld2 ./hello-world.sh 
-Are you sure you want to continue connecting (yes/no/[fingerprint])? yes + 
-WarningPermanently added '127.0.0.1' (ECDSA) to the list of known hosts+[root@centos8 ~]# cgdelete memory:helloworld2 
-\S + 
-Kernel \r on an \m +[root@centos8 ~]# ls -l /sys/fs/cgroup/memory/helloworld2/ 
-trainee@127.0.0.1's passwordtrainee +lscannot access '/sys/fs/cgroup/memory/helloworld2/': No such file or directory
-id_ecdsa.pub                                                                                                       100%  192   497.6KB/s   00:00+
 </code> </code>
  
-Connectez-vous via telnet :+==Le Fichier /etc/cgconfig.conf==
  
-<code> +Afin de les rendre persistants, il convient d'éditer le fichier **/etc/cgconfig.conf** :
-[trainee@centos8 ~]$ ssh -l trainee localhost +
-The authenticity of host 'localhost (::1)' can't be established. +
-ECDSA key fingerprint is SHA256:Q7T/CP0SLiMbMAIgVzTuEHegYS/spPE5zzQchCHD5Vw. +
-Are you sure you want to continue connecting (yes/no/[fingerprint])? yes +
-WarningPermanently added 'localhost' (ECDSA) to the list of known hosts. +
-\S +
-Kernel \r on an \m +
-Activate the web console with: systemctl enable --now cockpit.socket+
  
-Last login: Mon Aug 30 03:57:14 2021 from 127.0.0.1 +<code> 
-[trainee@centos8 ~]$+[root@centos8 ~]# vi /etc/cgconfig.conf 
 +[root@centos8 ~]# cat /etc/cgconfig.conf 
 +
 +#  Copyright IBM Corporation. 2007 
 +
 +#  Authors:     Balbir Singh <balbir@linux.vnet.ibm.com> 
 +#  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; 
 +        } 
 +}
 </code> </code>
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** - Lors de la connexion au serveurl'authentification utilise le couple de clefs asymétrique au format ecdsa et aucun mot de passe n'est requis.+**Important** - Notez la création de **deux** limitationsune de 40 000 octets de mémoire et l'autre de **100** **cpu.shares**. Cette dernière est une valeur exprimée sur 1 024, où 1 024 représente 100% du temps CPU. La limite fixée est donc equivalente à 9,77% du temps CPU.
 </WRAP> </WRAP>
  
-Insérez maintenant les clefs publiques restantes dans le fichier .ssh/authorized_keys :+Créez donc les deux CGroups concernés :
  
 <code> <code>
-[trainee@centos8 ~]$ cd .ssh +[root@centos8 ~]# cgcreate -g memory:helloworld2 
-[trainee@centos8 .ssh]ls +[root@centos8 ~]ls -l /sys/fs/cgroup/memory/helloworld2/ 
-authorized_keys  id_dsa  id_dsa.pub  id_ecdsa  id_ecdsa.pub  id_ed25519  id_ed25519.pub  id_rsa  id_rsa.pub  known_hosts +total 0 
-[trainee@centos8 .ssh]$ cat authorized_keys  +-rw-rw-r--1 root root 0 Jul 13 10:46 cgroup.clone_children 
-ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHDrzSXP+Ecxf/sQ18VwCRNm7rrSrrsaJmuIw/RgTH5puKF5E+Yy15cvAAKBXpJPxUmrOaOyhab84PevV7XSHcI= trainee@centos8.ittraining.loc+--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>
  
-[trainee@centos8 .ssh]$ cat id_rsa.pub >> authorized_keys +<code> 
-[trainee@centos8 .ssh]$ cat id_dsa.pub >> authorized_keys +[root@centos8 ~]# cgcreate -g cpu:helloworld2 
-[trainee@centos8 .ssh]$ cat id_ed25519.pub >authorized_keys+[root@centos8 ~]# ls -l /sys/fs/cgroup/cpu/helloworld2/ 
 +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 
 +</code>
  
-[trainee@centos8 .ssh]$ cat authorized_keys +==La Commande cgconfigparser== 
-ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHDrzSXP+Ecxf/sQ18VwCRNm7rrSrrsaJmuIw/RgTH5puKF5E+Yy15cvAAKBXpJPxUmrOaOyhab84PevV7XSHcI= trainee@centos8.ittraining.loc + 
-ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQD3ZSMn/GIAHtaDFc6ZNnKJam9hzq8TxqMN5IopUr8QhwODyPadbB+FgH4r50qTux4ubwr1BlymgIdqRVWy32mE15M8tdtKc3j8DNMpUwPGEh+s/PT7GW+3E3shoyPvpLc1kKaKXKGl/JwfCK/8IYsubk2BmiiJYkzLECotPlaaxm4w1K0AtlnZQuLHt1HK3/rHChxo2o2w1t59/QwNcMLiKve1Z+zQ1POKo8VJ/DDrf90y2QWC28ejUs/ZjP6f6C4bn5Jjol4TbHls3ArMsbU6C1Ev5jqbzZ0kmognQ2CnRjeNM51YdFo6nRsLoPQKpeLRMBpT/87HK1bPUOBVCyhXxSkqkVhMlgg8tgcD/MRlBaUVFoZ1wQ0L26Fe+q7c2Oykj54pdXCAK2ZTpCXGfhd/FxrfqGw7cSeKlGX4QUzHMjMk2oHFC9h30BUk1gGN21KJPTh7/S1OZVrnCc3GUi5fXPvEpral0IU0sws+j03dj0sWm5ICQFKRkmZN11HCyT0= trainee@centos8.ittraining.loc +Appliquez le contenu du fichier **/etc/cgconfig.conf** grâce à l'utilisation de la commande **cgconfigparser** : 
-ssh-dss AAAAB3NzaC1kc3MAAACBALIdwEEqHrMWSUdzARm9ldsZK9ebbtZShtmwgdjphOk77fxymK0y6wV7QEmLL25LOcLb12uZ1F0LtRt/t2oqgrwqk3vUSpCPLr09AXpcD/nxL9kc+rUxHyl6u1mHtyfCVLCPSvavCMR8TaA8egVMk3EwGRfHTiuDOKi7Iwus7gXPAAAAFQDHEQPGVRI7gVYKzCT6nrjDsQQ6jwAAAIEAhhhH7fEjdldASXY0qTWkCvcs3cfK9/Ff315zByn47O02y9Vdo3QG5nOr1Oo8fc2xEkIBNmFr8Rr2g60cpvEev5hy4XZ1ghxnQ53iwKuiS72ZATwhD6bZBrsiH0k1Et25gRcj5KCvDe/jHhbxCxsCuHUH2qvWsQNVwztE7hD0sxkAAACAQ8Dkpy8zXj7jW8o1txxf2W6J4r2+1lPldymA45ywZokN4SCwvXlpPAuyBt0/HiU0R2PI9aqOAMosCLcy9WmnSwLQ2Z7QcD2i3XlAih2+1q9NJP22sPT3jSK9UZcdRjoZ/eNiz84sXZucNape32tFxjvcV4txobH/vD53q8g63fA= trainee@centos8.ittraining.loc + 
-ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOfFQULLU8IZyKiSU63D2Zz6yGLqyHcBHnCRdSR9JSmc trainee@centos8.ittraining.loc+<code> 
 +[root@centos8 ~]# cgconfigparser -/etc/cgconfig.conf 
 +[root@centos8 ~]# cat /sys/fs/cgroup/memory/helloworld2/memory.limit_in_bytes 
 +36864 
 +[root@centos8 ~]# cat /sys/fs/cgroup/cpu/helloworld2/cpu.shares 
 +100
 </code> </code>
  
 ----- -----
 Copyright © 2024 Hugh Norris. Copyright © 2024 Hugh Norris.
Menu