Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
howto.doc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Documentations
howto.doc
Commits
c591f1b7
Commit
c591f1b7
authored
4 years ago
by
ines mkacher
Browse files
Options
Downloads
Patches
Plain Diff
Update linux.md
parent
1cadaf73
No related branches found
Branches containing commit
No related tags found
2 merge requests
!14
Mise à jour arborescence
,
!13
1.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
troubleshooting/linux.md
+32
-8
32 additions, 8 deletions
troubleshooting/linux.md
with
32 additions
and
8 deletions
troubleshooting/linux.md
+
32
−
8
View file @
c591f1b7
# Conversion des commandes entre les différents OS
# Conversion des commandes entre les différents OS
https://bhami.com/rosetta.html
https://bhami.com/rosetta.html
...
@@ -7,6 +6,7 @@
...
@@ -7,6 +6,7 @@
Pour voir les messages dans le journal du système, l'outil journalctl peut être utilisé.
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
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. --
-- 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
...
@@ -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
7 root 20 0 0 0 0 R 0,0 0,0 3:51.82 rcu_sched
```
```
```
lsof -p PID (listopenfiles)
lsof -p PID (listopenfiles)
```
```
netstat
netstat
```
```
screen
screen
```
```
root@MaarchIntegration1904:~# ls -al /proc/31742/fd
root@MaarchIntegration1904:~# ls -al /proc/31742/fd
total 0
total 0
dr-x------ 2 root root 0 mai 3 10:39 .
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]
...
@@ -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]
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 6 -> pipe:[52023]
l-wx------ 1 root root 64 mai 3 10:39 7 -> /var/log/apache2/other_vhosts_access.log
l-wx------ 1 root root 64 mai 3 10:39 7 -> /var/log/apache2/other_vhosts_access.log
```
```
ctr-c : arret du processus
ctr-c : arret du processus
ctr-d : fin de saisie (fermeture entrée standard)
ctr-d : fin de saisie (fermeture entrée standard)
ctr-z : detacher un process (bg|fg : backgroud|forground)
ctr-z : detacher un process (bg|fg : backgroud|forground)
ctr-s : stop du pocesus (pause)
ctr-s : stop du pocesus (pause)
ctr-q : restart le process (arret de la pause)
ctr-q : restart le process (arret de la pause)
```
```
lancer des process
lancer des process
nohup/detach
nohup/detach
ctr+Z (avec le numero de job) bg detach
ctr+Z (avec le numero de job) bg detach
```
```
kill : laisse le temps au processus de ce terminer
kill : laisse le temps au processus de ce terminer
kill -9 : tue le processus immediatement
kill -9 : tue le processus immediatement
kill -1 : signup 6-> redemarrage pour une mise à jour (relire la config) = service apache2 reload
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
upstart /etc/init
sysv /etc/init.d
sysv /etc/init.d
lrwxrwxrwx 1 root root 20 avril 8 12:51 init -> /lib/systemd/systemd
lrwxrwxrwx 1 root root 20 avril 8 12:51 init -> /lib/systemd/systemd
```
```
root@MaarchIntegration1904:/sbin# systemctl status apache2
root@MaarchIntegration1904:/sbin# systemctl status apache2
● apache2.service - The Apache HTTP Server
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
...
@@ -110,7 +122,9 @@ root@MaarchIntegration1904:/sbin# systemctl status apache2
...
@@ -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.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
si besoin d'édition :
si besoin d'édition :
```
```
root@MaarchIntegration1904:/etc/systemd/system# ls -ltr
root@MaarchIntegration1904:/etc/systemd/system# ls -ltr
total 36
total 36
drwxr-xr-x 2 root root 4096 nov. 13 2017 systemd-udevd.service.d
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
...
@@ -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 remote-fs.target.wants
drwxr-xr-x 2 root root 4096 juil. 1 11:50 multi-user.target.wants
drwxr-xr-x 2 root root 4096 juil. 1 11:50 multi-user.target.wants
```
paramètres par defauts installées
paramètres par defauts installées
```
root@MaarchIntegration1904:/etc/default# ls -ltr
root@MaarchIntegration1904:/etc/default# ls -ltr
total 88
total 88
-rw-r--r-- 1 root root 306 juin 2 2015 networking
-rw-r--r-- 1 root root 306 juin 2 2015 networking
...
@@ -151,9 +168,11 @@ total 88
...
@@ -151,9 +168,11 @@ total 88
-rw-r--r-- 1 root root 17 avril 3 2018 locale
-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 1014 sept. 25 2018 exim4
-rw-r--r-- 1 root root 2006 mai 3 10:05 gandi
-rw-r--r-- 1 root root 2006 mai 3 10:05 gandi
```
apache /httpd (centos/debian)
apache /httpd (centos/debian)
```
root@MaarchIntegration1904:/var/spool/mail# kill -l
root@MaarchIntegration1904:/var/spool/mail# kill -l
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP
6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1
6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1
...
@@ -168,11 +187,16 @@ root@MaarchIntegration1904:/var/spool/mail# kill -l
...
@@ -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
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
58) SIGRTMAX-6 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2
63) SIGRTMAX-1 64) SIGRTMAX
63) SIGRTMAX-1 64) SIGRTMAX
```
```
root@MaarchIntegration1904:/var
root@MaarchIntegration1904:/var
systemctl status apache2
systemctl status apache2
systemctl daemon reload si on a modifié systemd et u'on veut qu'il prenne en compte
systemctl daemon reload si on a modifié systemd et u'on veut qu'il prenne en compte
```
verification des process
verification des process
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment