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

Update linux.md

parent 4fce53e6
No related branches found
No related tags found
2 merge requests!14Mise à jour arborescence,!131.0
## Gestion de fichiers
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
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)
Active: active (running) since Fri 2019-05-03 10:17:39 CEST; 3 months 18 days ago
Main PID: 31742 (apache2)
Tasks: 55 (limit: 4915)
CGroup: /system.slice/apache2.service
├─31742 /usr/sbin/apache2 -k start
├─31744 /usr/sbin/apache2 -k start
└─31745 /usr/sbin/apache2 -k start
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
drwxr-xr-x 2 root root 4096 nov. 13 2017 paths.target.wants
drwxr-xr-x 2 root root 4096 nov. 13 2017 network-online.target.wants
lrwxrwxrwx 1 root root 35 nov. 13 2017 syslog.service -> /lib/systemd/system/rsyslog.service
lrwxrwxrwx 1 root root 31 nov. 13 2017 sshd.service -> /lib/systemd/system/ssh.service
drwxr-xr-x 2 root root 4096 nov. 13 2017 getty.target.wants
drwxr-xr-x 2 root root 4096 nov. 13 2017 sysinit.target.wants
drwxr-xr-x 2 root root 4096 avril 3 2018 timers.target.wants
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
-rw-r--r-- 1 root root 2062 déc. 30 2015 rsync
-rw-r--r-- 1 root root 346 sept. 20 2016 acpid
-rw-r--r-- 1 root root 222 oct. 25 2016 bsdmainutils
-rw-r--r-- 1 root root 632 déc. 15 2016 nfs-kernel-server
-rw-r--r-- 1 root root 793 déc. 15 2016 nfs-common
-rw-r--r-- 1 root root 339 déc. 23 2016 autofs
-rw-r--r-- 1 root root 124 janv. 18 2017 rsyslog
-rw-r--r-- 1 root root 657 mars 22 2017 hwclock
-rw-r--r-- 1 root root 1118 mai 17 2017 useradd
-rw------- 1 root root 384 juin 15 2017 cacerts
-rw-r--r-- 1 root root 1756 juin 15 2017 nss
-rw-r--r-- 1 root root 133 juin 18 2017 ssh
-rw-r--r-- 1 root root 297 juil. 30 2017 dbus
-rw-r--r-- 1 root root 556 sept. 19 2017 apache-htcacheclean
-rw-r--r-- 1 root root 955 oct. 7 2017 cron
-rw-r--r-- 1 root root 1373 nov. 13 2017 grub
-rw-r--r-- 1 root root 1228 nov. 13 2017 grub.ucf-dist
-rw-r--r-- 1 root root 931 nov. 13 2017 irqbalance
-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
11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM
16) SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP
21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ
26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR
31) SIGSYS 34) SIGRTMIN 35) SIGRTMIN+1 36) SIGRTMIN+2 37) SIGRTMIN+3
38) SIGRTMIN+4 39) SIGRTMIN+5 40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8
43) SIGRTMIN+9 44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13
48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12
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
```
root@MaarchIntegration1904:/var/spool/mail# ps -faux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 2 0.0 0.0 0 0 ? S mai03 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S mai03 0:28 \_ [ksoftirqd/0]
root 5 0.0 0.0 0 0 ? S< mai03 0:00 \_ [kworker/0:0H]
root 7 0.0 0.0 0 0 ? S mai03 44:38 \_ [rcu_sched]
root 8 0.0 0.0 0 0 ? S mai03 0:00 \_ [rcu_bh]
root 9 0.0 0.0 0 0 ? S mai03 0:08 \_ [migration/0]
```
### Création de fichiers en doublons pour autoimport par exemple
......
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