My Personal Wiki

La théorie, c'est quand on sait tout et que rien ne fonctionne.... La pratique, c'est quand tout fonctionne et que personne ne sait pourquoi.

Outils pour utilisateurs

Outils du site


linux:astuces:service

Contrôle de service locaux sous LINUX


Tous les Services

Voici comment contrôler vos services locaux et leurs états:

service --status-all

ou

systemctl status squid.service 
 [ - ]  alsa-utils
 [ - ]  apache-htcacheclean
 [ + ]  apache2
 [ + ]  avahi-daemon
 [ - ]  bluetooth
 [ - ]  console-setup.sh
 [ + ]  cron
 [ + ]  dbus
 [ + ]  dhcpcd
 [ + ]  domoticz.sh
 [ + ]  dphys-swapfile
 [ + ]  fail2ban
 [ + ]  fake-hwclock
 [ - ]  hwclock.sh
 [ - ]  keyboard-setup.sh
 [ + ]  kmod
 [ + ]  mysql
 [ + ]  networking
 [ - ]  nfs-common
 [ + ]  nfs-kernel-server
 [ + ]  nmbd
 [ + ]  openvpn
 [ - ]  paxctld
 [ - ]  pcscd
 [ + ]  procps
 [ + ]  raspi-config
 [ ? ]  rng-tools
 [ + ]  rpcbind
 [ - ]  rpivpn
 [ - ]  rsync
 [ + ]  rsyslog
 [ - ]  samba-ad-dc
 [ + ]  smbd
 [ + ]  squid
 [ + ]  ssh
 [ - ]  sudo
 [ + ]  triggerhappy
 [ + ]  udev

+ : Démarré
- : Arrèté

Un Service Particulier

service squid status

ou

systemctl stop squid.service 
● squid.service - Squid Web Proxy Server
   Loaded: loaded (/lib/systemd/system/squid.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2021-02-20 11:48:22 CET; 27min ago
     Docs: man:squid(8)
  Process: 410 ExecStartPre=/usr/sbin/squid --foreground -z (code=exited, status=0/SUCCESS)
  Process: 557 ExecStart=/usr/sbin/squid -sYC (code=exited, status=0/SUCCESS)
 Main PID: 560 (squid)
    Tasks: 9 (limit: 2200)
   Memory: 25.8M
   CGroup: /system.slice/squid.service
           ├─560 /usr/sbin/squid -sYC
           ├─562 (squid-1) --kid squid-1 -sYC
           ├─565 (basic_ncsa_auth) /etc/squid/users
           ├─566 (basic_ncsa_auth) /etc/squid/users
           ├─567 (basic_ncsa_auth) /etc/squid/users
           ├─568 (basic_ncsa_auth) /etc/squid/users
           ├─569 (basic_ncsa_auth) /etc/squid/users
           ├─576 (logfile-daemon) /var/log/squid/access.log
           └─598 (pinger)
 
févr. 20 11:48:23 RazorbackPi squid[562]: Max Swap size: 0 KB
févr. 20 11:48:23 RazorbackPi squid[562]: Using Least Load store dir selection
févr. 20 11:48:23 RazorbackPi squid[562]: Current Directory is /
févr. 20 11:48:24 RazorbackPi squid[562]: Finished loading MIME types and icons.
févr. 20 11:48:24 RazorbackPi squid[562]: HTCP Disabled.
févr. 20 11:48:24 RazorbackPi squid[562]: Pinger socket opened on FD 24
févr. 20 11:48:24 RazorbackPi squid[562]: Squid plugin modules loaded: 0
févr. 20 11:48:24 RazorbackPi squid[562]: Adaptation support is off.
févr. 20 11:48:24 RazorbackPi squid[562]: Accepting HTTP Socket connections at local=[::]:8080 remote=[::] FD 22 flags=9
févr. 20 11:48:24 RazorbackPi squid[562]: storeLateRelease: released 0 objects

Systemctl NOTE

systemctl disable [nom du service].service	Désactiver un service
systemctl stop [nom du service].service	Arrêter un service
systemctl start [nom du service].service	Démarrer un service

Exemple

Desactiver

systemctl disable squid.service
Synchronizing state of squid.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable squid
Removed /etc/systemd/system/multi-user.target.wants/squid.service.

Activer

systemctl enable squid.service
Synchronizing state of squid.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable squid
Created symlink /etc/systemd/system/multi-user.target.wants/squid.service → /lib/systemd/system/squid.service.

linux/astuces/service.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki