From 3b2523b816556aa911459097c2476a2da4542151 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 4 Oct 2021 19:45:22 +0200 Subject: op-mode: T3889: migrate to journalctl when reading daemon logs --- op-mode-definitions/show-log.xml.in | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/show-log.xml.in b/op-mode-definitions/show-log.xml.in index 92c1cf016..f31c85245 100644 --- a/op-mode-definitions/show-log.xml.in +++ b/op-mode-definitions/show-log.xml.in @@ -6,7 +6,7 @@ Show contents of current master log file - /bin/journalctl + journalctl --boot @@ -18,7 +18,7 @@ Show listing of authorization attempts - /bin/journalctl --quiet SYSLOG_FACILITY=10 SYSLOG_FACILITY=4 + journalctl --boot --quiet SYSLOG_FACILITY=10 SYSLOG_FACILITY=4 @@ -30,7 +30,7 @@ Show log for Conntrack-sync - cat $(printf "%s\n" /var/log/messages* | sort -nr ) | grep -e conntrackd + journalctl --boot --unit conntrackd.service @@ -89,7 +89,7 @@ Show log for HTTPs - cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e nginx + journalctl --boot --unit nginx.service @@ -133,7 +133,7 @@ Show log for LLDP - cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e lldpd + journalctl --boot --unit lldpd.service @@ -141,17 +141,28 @@ egrep -i "kernel:.*\[NAT-[A-Z]{3,}-[0-9]+(-MASQ)?\]" $(find /var/log -maxdepth 1 -type f -name messages\* | sort -t. -k2nr) - + Show log for OpenVPN - cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e openvpn - + journalctl --boot --unit openvpn@*.service + + + + Show OpenVPN log on specific interface + + interfaces openvpn + + + journalctl --boot --unit openvpn@$5.service + + + Show log for Simple Network Monitoring Protocol (SNMP) - cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e snmpd + journalctl --boot --unit snmpd.service @@ -195,13 +206,13 @@ Show log for PPTP - cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e accel-pptp -e ppp + journalctl --boot --unit accel-ppp@pptp.service Show log for SSTP - cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e accel-sstp -e ppp + journalctl --boot --unit accel-ppp@sstp.service @@ -209,13 +220,13 @@ Show log for Virtual Router Redundancy Protocol (VRRP) - cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e Keepalived_vrrp + journalctl --boot --unit keepalived.service Show log for Webproxy - cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e "squid" + journalctl --boot --unit squid.service -- cgit v1.2.3