Update TP3
This commit is contained in:
parent
5b03f090fe
commit
50cbff18eb
6 changed files with 181 additions and 29 deletions
|
|
@ -121,25 +121,16 @@ afficher des informations sur un processus donné :
|
|||
</div>
|
||||
|
||||
|
||||
### `batinfo.sh`
|
||||
### `rev_kdb_leds.sh`, `batinfo.sh`, `cpuinfo.sh`
|
||||
|
||||
Explorons le pseudo système de fichiers `/sys` pour écrire un script
|
||||
qui va nous renvoyer des statistiques sur votre batterie.
|
||||
qui va, en fonction de ce que vous avez de disponible :
|
||||
|
||||
* inverser l'état des diodes de notre clavier ;
|
||||
* nous afficher des statistiques sur notre batterie ;
|
||||
* nous afficher des statistiques la fréquence de notre CPU.
|
||||
|
||||
Voici un exemple d'utilisation :
|
||||
|
||||
<div lang="en-US">
|
||||
```shell
|
||||
42sh$ ./rev_kdb_leds.sh input20
|
||||
```
|
||||
</div>
|
||||
|
||||
|
||||
### `rev_kdb_leds.sh`
|
||||
|
||||
Explorons le pseudo système de fichiers `/sys` pour écrire un script
|
||||
qui va inverser l'état des diodes de notre clavier.
|
||||
#### `rev_kdb_leds.sh`
|
||||
|
||||
Si vous avez :
|
||||
|
||||
|
|
@ -160,3 +151,55 @@ Voici un exemple d'utilisation :
|
|||
42sh$ ./rev_kdb_leds.sh input20
|
||||
```
|
||||
</div>
|
||||
|
||||
|
||||
#### `batinfo.sh`
|
||||
|
||||
Voici un exemple d'utilisation :
|
||||
|
||||
<div lang="en-US">
|
||||
```shell
|
||||
42sh$ ./batinfo.sh
|
||||
BAT0 Discharging
|
||||
====
|
||||
Capacity: 83% (Normal)
|
||||
Voltage: 11.972000 V (minimal: 11.400000 V)
|
||||
Energy: 18.290000/21.830000 Wh
|
||||
Power: 7.937000 W
|
||||
Remaining time: 2.304 h
|
||||
|
||||
BAT1 Unknown
|
||||
====
|
||||
Capacity: 83% (Normal)
|
||||
Voltage: 11.972000 V (minimal: 11.400000 V)
|
||||
Energy: 18.290000/21.830000 Wh
|
||||
Power: 0.0 W
|
||||
Remaining time: N/A
|
||||
```
|
||||
</div>
|
||||
|
||||
|
||||
#### `cpuinfo.sh`
|
||||
|
||||
Voici un exemple d'utilisation :
|
||||
|
||||
<div lang="en-US">
|
||||
```shell
|
||||
42sh$ ./cpuinfo.sh
|
||||
cpu0
|
||||
====
|
||||
Current frequency: 2100384 Hz
|
||||
Current governor: powersave
|
||||
Allowed frequencies: between 500000 - 2100000 Hz
|
||||
Thermal throttle count: 0
|
||||
|
||||
cpu1
|
||||
====
|
||||
Current frequency: 2099871 Hz
|
||||
Current governor: powersave
|
||||
Allowed frequencies: between 500000 - 2100000 Hz
|
||||
Thermal throttle count: 0
|
||||
```
|
||||
</div>
|
||||
|
||||
N'hésitez pas à rajouter toute sorte d'information intéressantes !
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue