Skip to content
Snippets Groups Projects
Commit c591f1b7 authored by ines mkacher's avatar ines mkacher
Browse files

Update linux.md

parent 1cadaf73
No related branches found
No related tags found
2 merge requests!14Mise à jour arborescence,!131.0
# Conversion des commandes entre les différents OS
https://bhami.com/rosetta.html
......@@ -7,6 +6,7 @@
Pour voir les messages dans le journal du système, l'outil journalctl peut être utilisé.
```
root@MaarchCourrier:/var/lib/postgresql/9.6# journalctl -xn
-- Logs begin at mar. 2019-08-13 12:43:02 CEST, end at mer. 2019-08-14 16:00:26 CEST. --
......@@ -45,16 +45,21 @@ KiB Swap: 0 total, 0 used, 0 free. 110756 cached Mem
7 root 20 0 0 0 0 R 0,0 0,0 3:51.82 rcu_sched
```
```
lsof -p PID (listopenfiles)
```
```
netstat
```
```
screen
```
```
root@MaarchIntegration1904:~# ls -al /proc/31742/fd
total 0
dr-x------ 2 root root 0 mai 3 10:39 .
......@@ -67,35 +72,42 @@ lrwx------ 1 root root 64 mai 3 10:39 4 -> socket:[52892]
lr-x------ 1 root root 64 mai 3 10:39 5 -> pipe:[52023]
l-wx------ 1 root root 64 mai 3 10:39 6 -> pipe:[52023]
l-wx------ 1 root root 64 mai 3 10:39 7 -> /var/log/apache2/other_vhosts_access.log
```
```
ctr-c : arret du processus
ctr-d : fin de saisie (fermeture entrée standard)
ctr-z : detacher un process (bg|fg : backgroud|forground)
ctr-s : stop du pocesus (pause)
ctr-q : restart le process (arret de la pause)
```
```
lancer des process
nohup/detach
ctr+Z (avec le numero de job) bg detach
```
```
kill : laisse le temps au processus de ce terminer
kill -9 : tue le processus immediatement
kill -1 : signup 6-> redemarrage pour une mise à jour (relire la config) = service apache2 reload
```
systemd gestion de service et de processus est un demon il monitore tous les processus
systemd gestion de service et de processus
est un demon il monitore tous les processus
```
upstart /etc/init
sysv /etc/init.d
lrwxrwxrwx 1 root root 20 avril 8 12:51 init -> /lib/systemd/systemd
```
```
root@MaarchIntegration1904:/sbin# systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
......@@ -110,7 +122,9 @@ root@MaarchIntegration1904:/sbin# systemctl status apache2
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
si besoin d'édition :
```
```
root@MaarchIntegration1904:/etc/systemd/system# ls -ltr
total 36
drwxr-xr-x 2 root root 4096 nov. 13 2017 systemd-udevd.service.d
......@@ -125,8 +139,11 @@ drwxr-xr-x 2 root root 4096 juil. 1 11:50 sockets.target.wants
drwxr-xr-x 2 root root 4096 juil. 1 11:50 remote-fs.target.wants
drwxr-xr-x 2 root root 4096 juil. 1 11:50 multi-user.target.wants
```
paramètres par defauts installées
```
root@MaarchIntegration1904:/etc/default# ls -ltr
total 88
-rw-r--r-- 1 root root 306 juin 2 2015 networking
......@@ -151,9 +168,11 @@ total 88
-rw-r--r-- 1 root root 17 avril 3 2018 locale
-rw-r--r-- 1 root root 1014 sept. 25 2018 exim4
-rw-r--r-- 1 root root 2006 mai 3 10:05 gandi
```
apache /httpd (centos/debian)
```
root@MaarchIntegration1904:/var/spool/mail# kill -l
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP
6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1
......@@ -168,11 +187,16 @@ root@MaarchIntegration1904:/var/spool/mail# kill -l
53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-7
58) SIGRTMAX-6 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2
63) SIGRTMAX-1 64) SIGRTMAX
```
```
root@MaarchIntegration1904:/var
systemctl status apache2
systemctl daemon reload si on a modifié systemd et u'on veut qu'il prenne en compte
```
verification des process
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment