has journalctl -xe ever dumped any useful information for anyone ever or am I just an idiot? when I restart nginx I want to know if it failed, why , what's the syntax error. instead old reliable /etc/init.d/nginx configtest no I have to dig around
has journalctl -xe ever dumped any useful information for anyone ever or am I just an idiot? when I restart nginx I want to know if it failed, why , what's the syntax error. instead old reliable /etc/init.d/nginx configtest no I have to dig around
# Output all logs since boot
journalctl
# Follow all logs in real time
journalctl -f
# Output logs for a given systemd unit
journalctl -u $unit
# Combine follow and unit flags to follow logs for a given systemd unit
# Easy to remember: You are saying F*** U to a broken piece of software
journalctl -fu $unit
# Output kernel logs
journalctl -k
# Follow kernel logs
journalctl -fk
# Tip: Use -b flag to see logs from previous boot cycles
# Learn more, including advanced filtering and formatting
man journalctl
You can also add that configtest command as an ExecStartPre to the unit, and it will run that before starting nginx and optionally fail early if it finds an error. # Easy to remember: You are saying F**K because your kernel is broken
journalctl -fkIt can be useful when there's potentially multiple things leading up to the error in whatever you're running, as it is showing and explaining nearly every action that's recently happened in the system log. But if you're just wanting to look at logs related to nginx starting at the most recent then just query for niginx's system log instead of the whole system.
sudo journalctl --pager-end --unit nginx
or: sudo journalctl -e -u nginx
or: sudo journalctl -eu nginx $ service nginx status
which should cover your if it failed, why , what's the syntax error
For anything more complicated, refer to these cheatsheets:https://wiki.archlinux.org/title/Systemd#Using_units
https://wiki.archlinux.org/title/Systemd/Journal#Filtering_o...
YMMV. I find systemd a lot easier to work with (I actually started wrapping daemons in proper services instead of sticking everything into nohup or tmux sessions).
Try trinity as a desktop with sysvinit.
(I don't use kwin, but instead a different window manager, and only part of trinity for this and that, but that's not due to a lack of quality, I just prefer to mix and match.)