Update 2018
This commit is contained in:
parent
3c2e528390
commit
b2b5c1c0eb
12 changed files with 197 additions and 185 deletions
|
|
@ -16,8 +16,8 @@ montage :
|
|||
|
||||
<div lang="en-US">
|
||||
```
|
||||
/dev/sda1 on / type ext4 (rw,relatime,data=ordered)
|
||||
/dev/sda3 on /home type ext4 (rw,relatime,data=ordered)
|
||||
/dev/sda1 on / type ext4 (rw,relatime,data=ordered)
|
||||
/dev/sda3 on /home type ext4 (rw,relatime,data=ordered)
|
||||
```
|
||||
</div>
|
||||
|
||||
|
|
@ -62,14 +62,14 @@ exemple, pour modifier les paramètres du noyau, on passe par le fichier
|
|||
La consultation d'un élément se fait généralement à l'aide d'un simple `cat` :
|
||||
|
||||
```shell
|
||||
42sh$ cat /sys/power/state
|
||||
freeze mem
|
||||
42sh$ cat /sys/power/state
|
||||
freeze mem
|
||||
```
|
||||
|
||||
La modification d'un élément se fait avec `echo`, comme ceci :
|
||||
|
||||
```shell
|
||||
echo mem > /sys/power/state
|
||||
42sh# echo mem > /sys/power/state
|
||||
```
|
||||
|
||||
Vous devriez constater l'effet de cette commande sans plus attendre !
|
||||
|
|
@ -84,39 +84,54 @@ afficher des informations sur un processus donné :
|
|||
|
||||
<div lang="en-US">
|
||||
```
|
||||
42sh$ ./procinfo $$
|
||||
PID: 4242
|
||||
Path: /bin/bash
|
||||
Command line: bash
|
||||
Working directory: /home/nemunaire/virli/
|
||||
Root: /
|
||||
State: S (sleeping)
|
||||
Threads: 1
|
||||
42sh$ ./procinfo $$
|
||||
PID: 4242
|
||||
Path: /bin/bash
|
||||
Command line: bash
|
||||
Working directory: /home/nemunaire/virli/
|
||||
Root: /
|
||||
State: S (sleeping)
|
||||
Threads: 1
|
||||
|
||||
CGroups
|
||||
=======
|
||||
12:pids:/
|
||||
11:net_prio:/
|
||||
10:perf_event:/
|
||||
9:net_cls:/
|
||||
8:freezer:/
|
||||
7:devices:/
|
||||
6:memory:/
|
||||
5:blkio:/
|
||||
4:cpuacct:/
|
||||
3:cpu:/
|
||||
2:cpuset:/
|
||||
1:name=openrc:/
|
||||
CGroups
|
||||
=======
|
||||
12:pids:/
|
||||
11:net_prio:/
|
||||
10:perf_event:/
|
||||
9:net_cls:/
|
||||
8:freezer:/
|
||||
7:devices:/
|
||||
6:memory:/
|
||||
5:blkio:/
|
||||
4:cpuacct:/
|
||||
3:cpu:/
|
||||
2:cpuset:/
|
||||
1:name=openrc:/
|
||||
|
||||
Namespaces
|
||||
==========
|
||||
cgroup:[4026531835]
|
||||
ipc:[4026531839]
|
||||
mnt:[4026531840]
|
||||
net:[4026531969]
|
||||
pid:[4026531836]
|
||||
user:[4026531837]
|
||||
uts:[4026531838]
|
||||
Namespaces
|
||||
==========
|
||||
cgroup:[4026531835]
|
||||
ipc:[4026531839]
|
||||
mnt:[4026531840]
|
||||
net:[4026531969]
|
||||
pid:[4026531836]
|
||||
user:[4026531837]
|
||||
uts:[4026531838]
|
||||
```
|
||||
</div>
|
||||
|
||||
|
||||
### `batinfo.sh`
|
||||
|
||||
Explorons le pseudo système de fichiers `/sys` pour écrire un script
|
||||
qui va nous renvoyer des statistiques sur votre batterie.
|
||||
|
||||
|
||||
Voici un exemple d'utilisation :
|
||||
|
||||
<div lang="en-US">
|
||||
```shell
|
||||
42sh$ ./rev_kdb_leds.sh input20
|
||||
```
|
||||
</div>
|
||||
|
||||
|
|
@ -142,6 +157,6 @@ Voici un exemple d'utilisation :
|
|||
|
||||
<div lang="en-US">
|
||||
```shell
|
||||
42sh$ ./rev_kdb_leds.sh input20
|
||||
42sh$ ./rev_kdb_leds.sh input20
|
||||
```
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue