Files
linuxkit/alpine/packages/diagnostics/diagnostics
Justin Cormack 6b0b4e05cb remove 9pudc, unused and not being fixed
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-04-04 18:21:01 +01:00

29 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
printf '\n'
DEV=$(ls /dev | grep '[sxv]da$')
[ $? -eq 0 ] && printf "✓ Drive found: $DEV\n" || printf "✗ No drive found\n"
DEV=$(mount | grep '/dev/[sxv]da. on /var type')
[ $? -eq 0 ] && printf "✓ Drive mounted: $DEV\n" || printf "✗ No drive mounted\n"
INET=$(ifconfig eth0 2> /dev/null | grep 'inet addr')
[ $? -eq 0 ] && printf "✓ Network connected: $INET\n" || printf "✗ No network connection\n"
if [ -d /Transfuse ]
then
FUSE=$(ps -eo args | grep '^/sbin/transfused')
[ $? -eq 0 ] && printf "✓ Process transfused running\n" || printf "✗ No transfused process\n"
fi
MDNS=$(ps -eo args | grep '^/sbin/mdnstool')
[ $? -eq 0 ] && printf "✓ Process mdnstool running: $MDNS\n" || printf "✗ No mdnstool process\n"
HUPPER=$(ps -eo args | grep '^/bin/hupper')
[ $? -eq 0 ] && printf "✓ Process hupper running: $HUPPER\n" || printf "✗ No hupper process\n"
DOCKER=$(ps -eo args | grep '^/usr/bin/docker')
[ $? -eq 0 ] && printf "✓ Process docker running: $DOCKER\n" || printf "✗ No docker process\n"
CONTAINERD=$(ps -eo args | grep '^docker-containerd')
[ $? -eq 0 ] && printf "✓ Process containerd running: $CONTAINERD\n" || printf "✗ No containerd process\n"
DOCKERPS=$(docker ps 2>&1)
[ $? -eq 0 ] && printf "✓ Docker daemon working\n" || printf "✗ Docker ps failed: $DOCKERPS\n"
DIAGNOSTICS=$(ps -eo args | grep '/usr/bin/diagnostics-server$')
[ $? -eq 0 ] && printf "✓ Diagnostics server running: $DIAGNOSTICS\n" || printf "✗ No diagnostics server\n"
exit 0