ceph-csi/system-status.sh
Niels de Vos bae519db07 ci: use "top -w" for untruncated wide output
Without the `-w` argument, the output of `top` gets truncated, and the
commandline of the processes is not comlete. It would be useful to eb
able to tell which command uses 100% CPU in an output like:

  17377 root      20   0  110.8m   8.2m   0.0   0.1   0:00.89 S  `- containerd+
  17414 167       20   0 1036.7m  59.6m   0.0   0.4   0:03.47 S      `- ceph-o+
  40875 root      20   0  283.9m  30.4m 100.0   0.2   0:00.23 R      `- ceph

Updates: #1969
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-05-12 05:12:09 +00:00

41 lines
920 B
Bash
Executable File

#!/bin/bash
#
# Run this script to gather details about the environment where the CI job is
# running. This can be helpful to identify issues why minikube failed to
# deploy, or tests encounter problems while running.
#
function minikube_ssh() {
ssh \
-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
-l docker -i "$(minikube ssh-key)" \
"$(minikube ip)" "${*}"
}
function log() {
echo "###"
echo "### going to execute: ${*}"
echo "###"
"${@}"
echo "###"
echo "### execution finished: ${*}"
echo "###"
}
# get the status of the VM in libvirt
log virsh list
# status of the minikube Kubernetes cluster
log minikube status
log minikube logs
# get the status of processes in the VM
log minikube_ssh top -b -c -n1 -w
# get the logs from the VM
log minikube_ssh journalctl --boot
# filesystem status for host and VM
log df -h
log minikube_ssh df -h