piatok 1. mája 2020

systemctl | grep failed

Občas (napríklad po inštalácii alebo reboote) potrebujem pozrieť služby, ktoré nenabehli. Ako na to?


1. Stačí si len grepnúť, čo je failed

napríklad takto:

root@guliverkel:/home/martin# systemctl | grep failed
● apache2.service                                                                           loaded failed failed    The Apache HTTP Server                                                     
● systemd-remount-fs.service                                                                loaded failed failed    Remount Root and Kernel File Systems                                       
root@guliverkel:/home/martin# 




2. môžeme si overiť napríklad apache2:

- voľačo sa tej pačmage nepáči....vážne nechápem prečo

root@guliverkel:/home/martin# systemctl status apache2
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2020-04-25 22:46:51 CEST; 3s ago
  Process: 20075 ExecStop=/usr/sbin/apachectl stop (code=exited, status=1/FAILURE)
  Process: 20324 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
 Main PID: 19912 (code=exited, status=0/SUCCESS)

Apr 25 22:46:51 guliverkel systemd[1]: Starting The Apache HTTP Server...
Apr 25 22:46:51 guliverkel apachectl[20324]: AH00526: Syntax error on line 182 of /etc/apache2/apache2.conf:
Apr 25 22:46:51 guliverkel apachectl[20324]: Invalid command 'ic_do_guty', perhaps misspelled or defined by a module not included in the server configuration
Apr 25 22:46:51 guliverkel apachectl[20324]: Action 'start' failed.
Apr 25 22:46:51 guliverkel apachectl[20324]: The Apache error log may have more information.
Apr 25 22:46:51 guliverkel systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 25 22:46:51 guliverkel systemd[1]: Failed to start The Apache HTTP Server.
Apr 25 22:46:51 guliverkel systemd[1]: apache2.service: Unit entered failed state.
Apr 25 22:46:51 guliverkel systemd[1]: apache2.service: Failed with result 'exit-code'.
root@guliverkel:/home/martin#




Žiadne komentáre:

Zverejnenie komentára