tuto:linux:quelques_commandes_utiles
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tuto:linux:quelques_commandes_utiles [2017/05/05 17:17] – [sg_persist] root | tuto:linux:quelques_commandes_utiles [2024/01/20 17:20] (Version actuelle) – admin | ||
|---|---|---|---|
| Ligne 515: | Ligne 515: | ||
| lsof -i | lsof -i | ||
| - | ===== nmap ===== | ||
| + | Voir les process qui ont des fichiers supprimés : | ||
| + | lsof +aL1 | ||
| + | lsof -d DEL | ||
| + | ===== nmap ===== | ||
| + | * [[https:// | ||
| + | ]] | ||
| Nmap est un scanner de ports. | Nmap est un scanner de ports. | ||
| Ligne 2815: | Ligne 2820: | ||
| ===== tshark ===== | ===== tshark ===== | ||
| + | * https:// | ||
| Wireshark en ligne de commande. | Wireshark en ligne de commande. | ||
| Ligne 3238: | Ligne 3243: | ||
| Peripheral device type: disk | Peripheral device type: disk | ||
| PR generation=0x8, | PR generation=0x8, | ||
| + | 0xdeadbeef | ||
| + | </ | ||
| + | |||
| + | ou | ||
| + | < | ||
| + | $ sg_persist / | ||
| + | >> No service action given; assume Persistent Reserve In command | ||
| + | >> with Read Keys service action | ||
| + | SUSE RBD | ||
| + | Peripheral device type: disk | ||
| + | PR generation=0x14, | ||
| 0xdeadbeef | 0xdeadbeef | ||
| </ | </ | ||
| Ligne 3258: | Ligne 3274: | ||
| </ | </ | ||
| - | * Positionner une clé de réservation (la clé est au format HEX et fait 6 ou 8 chiffres) : | + | * Positionner une clé de réservation (la clé est au format HEX jusqu' |
| < | < | ||
| $ sg_persist --out --register --param-sark=0xDEADBEEF /dev/sda | $ sg_persist --out --register --param-sark=0xDEADBEEF /dev/sda | ||
| Ligne 3265: | Ligne 3281: | ||
| </ | </ | ||
| + | < | ||
| + | Il est possible de convertir l'IP en HEX pour positionner la clé : | ||
| + | < | ||
| + | $ printf ' | ||
| + | </ | ||
| + | </ | ||
| * Placer un type réservation : | * Placer un type réservation : | ||
| < | < | ||
| - | $ sg_persist --out --reserve --param-rk=0xDEADBEEF --prout-type=3 /dev/sda | + | $ sg_persist --out --reserve --param-rk=0xDEADBEEF --prout-type=5 /dev/sda |
| SUSE RBD | SUSE RBD | ||
| Peripheral device type: disk | Peripheral device type: disk | ||
| Ligne 3288: | Ligne 3310: | ||
| * Supprimer la réservation : | * Supprimer la réservation : | ||
| < | < | ||
| - | $ sg_persist --out --release --param-rk=0xDEADBEEF | + | $ sg_persist --out --release --param-rk=0xDEADBEEF |
| </ | </ | ||
| Ligne 3301: | Ligne 3323: | ||
| </ | </ | ||
| + | ===== upower ===== | ||
| + | Lister les sources d' | ||
| + | < | ||
| + | $ upower -e | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | Information sur une source d' | ||
| + | < | ||
| + | $ upower -i / | ||
| + | native-path: | ||
| + | vendor: | ||
| + | model: | ||
| + | serial: | ||
| + | power supply: | ||
| + | updated: | ||
| + | has history: | ||
| + | has statistics: | ||
| + | battery | ||
| + | present: | ||
| + | rechargeable: | ||
| + | state: | ||
| + | warning-level: | ||
| + | energy: | ||
| + | energy-empty: | ||
| + | energy-full: | ||
| + | energy-full-design: | ||
| + | energy-rate: | ||
| + | voltage: | ||
| + | time to full: 1,7 hours | ||
| + | percentage: | ||
| + | capacity: | ||
| + | technology: | ||
| + | icon-name: | ||
| + | History (charge): | ||
| + | 1510179176 11, | ||
| + | History (rate): | ||
| + | 1510179176 30, | ||
| + | </ | ||
| + | |||
| + | Information sur le démon : | ||
| + | < | ||
| + | $ upower -d | ||
| + | ... | ||
| + | Daemon: | ||
| + | daemon-version: | ||
| + | on-battery: | ||
| + | lid-is-closed: | ||
| + | lid-is-present: | ||
| + | critical-action: | ||
| + | </ | ||
| + | |||
| + | Voir aussi [[#acpi]]. | ||
| + | |||
| + | ===== acpi ===== | ||
| + | Information sur la batterie (voir aussi [[# | ||
| + | < | ||
| + | $ acpi -i -b | ||
| + | Battery 0: Discharging, | ||
| + | Battery 0: design capacity 7894 mAh, last full capacity 6028 mAh = 76% | ||
| + | </ | ||
| + | |||
| + | ===== showkey ===== | ||
| + | Afficher la valeur d'une touche : | ||
| + | < | ||
| + | $ showkey -a | ||
| + | </ | ||
| + | |||
| + | ===== rpm ===== | ||
| + | ==== Metadonnées rpm ==== | ||
| + | Afficher les vendors: | ||
| + | < | ||
| + | $ rpm -qa --qf ' | ||
| + | </ | ||
| + | |||
| + | Afficher les rpms: | ||
| + | < | ||
| + | $ rpm -qa --qf ' | ||
| + | </ | ||
| + | |||
| + | Pour afficher tous les tags: | ||
| + | < | ||
| + | rpm --querytags | ||
| + | </ | ||
| + | |||
| + | ===== patchelf ===== | ||
| + | [[https:// | ||
| + | < | ||
| + | $ patchelf --set-interpreter / | ||
| + | $ patchelf --set-rpath / | ||
| + | $ patchelf --shrink-rpath program | ||
| + | </ | ||
| + | |||
| + | ===== growpart ===== | ||
| + | Etend au max la partition: | ||
| + | < | ||
| + | $ growpart /dev/sda 1 | ||
| + | </ | ||
| + | |||
| + | Ensuite on augmente le fs: | ||
| + | < | ||
| + | $ btrfs filesystem resize max /mounted | ||
| + | </ | ||
| + | |||
| + | ===== nvme ===== | ||
| + | < | ||
| + | $ nvme list | ||
| + | Node | ||
| + | ---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- -------- | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | $ nvme smart-log /dev/nvme0 | ||
| + | Smart Log for NVME device: | ||
| + | critical_warning : | ||
| + | temperature : | ||
| + | available_spare : | ||
| + | available_spare_threshold : | ||
| + | percentage_used : | ||
| + | endurance group critical warning summary: 0 | ||
| + | data_units_read : | ||
| + | data_units_written : | ||
| + | host_read_commands : | ||
| + | host_write_commands : | ||
| + | controller_busy_time : | ||
| + | power_cycles : | ||
| + | power_on_hours : | ||
| + | unsafe_shutdowns : | ||
| + | media_errors : | ||
| + | num_err_log_entries : | ||
| + | Warning Temperature Time : 11 | ||
| + | Critical Composite Temperature Time : 0 | ||
| + | Temperature Sensor 1 : 44 C | ||
| + | Thermal Management T1 Trans Count : 0 | ||
| + | Thermal Management T2 Trans Count : 0 | ||
| + | Thermal Management T1 Total Time : 0 | ||
| + | Thermal Management T2 Total Time : 0 | ||
| + | </ | ||
tuto/linux/quelques_commandes_utiles.1494004649.txt.gz · Dernière modification : de root
