mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 05:02:50 +00:00
Allow dumping full systemd journal in log-dump.sh.
The feature is gated behind a newly introduced 'dump-systemd-journal' flag. We want to dump the full systemd journal in our scalability performance tests.
This commit is contained in:
@@ -51,6 +51,7 @@ readonly kern_logfile="kern.log"
|
||||
readonly initd_logfiles="docker/log"
|
||||
readonly supervisord_logfiles="kubelet.log supervisor/supervisord.log supervisor/kubelet-stdout.log supervisor/kubelet-stderr.log supervisor/docker-stdout.log supervisor/docker-stderr.log"
|
||||
readonly systemd_services="kubelet kubelet-monitor kube-container-runtime-monitor ${LOG_DUMP_SYSTEMD_SERVICES:-docker}"
|
||||
readonly dump_systemd_journal="${LOG_DUMP_SYSTEMD_JOURNAL:-false}"
|
||||
|
||||
# Limit the number of concurrent node connections so that we don't run out of
|
||||
# file descriptors for large clusters.
|
||||
@@ -164,6 +165,10 @@ function save-logs() {
|
||||
for svc in "${services[@]}"; do
|
||||
log-dump-ssh "${node_name}" "sudo journalctl --output=cat -u ${svc}.service" > "${dir}/${svc}.log" || true
|
||||
done
|
||||
|
||||
if [[ "$dump_systemd_journal" == "true" ]]; then
|
||||
log-dump-ssh "${node_name}" "sudo journalctl --output=short-precise" > "${dir}/systemd.log" || true
|
||||
fi
|
||||
else
|
||||
files="${kern_logfile} ${files} ${initd_logfiles} ${supervisord_logfiles}"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user