Files
linuxkit/alpine/packages/diagnostics/usr/bin/diagnostics
Justin Cormack 9a96f5da8c Add support for running a development bundle of Docker
Add a database key `bundle` that contains a path to a Docker dev
bundle eg `/.../docker/bundles/1.13.0-dev` where the docker
binaries to run can be found. This will be paired with a script
in `docker/docker` to set this key, so users can easily help
contribute to Docker development.

The change will be permanent until the key is removed or a factory
reset is done, or the bundle cannot be found.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-13 22:46:27 +01:00

35 lines
1.8 KiB
Bash
Executable File

#!/bin/sh
printf '\n'
DEV="$(find /dev -maxdepth 1 -type b ! -name 'loop*' | grep -v '[0-9]$' | sed 's@.*/dev/@@' | head -1 )"
[ $? -eq 0 ] && printf "✓ Drive found: $DEV\n" || printf "✗ No drive found\n"
DEV=$(mount | grep '/dev/.*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 [ "$(mobyplatform)" = "mac" ]
then
FUSE=$(ps -eo args | grep '^/sbin/transfused')
[ $? -eq 0 ] && printf "✓ Process transfused running\n" || printf "✗ No transfused process\n"
fi
if [ "$(mobyplatform)" = "windows" ]
then
TAPVS=$(ps -eo args | grep '^/sbin/tap-vsockd')
[ $? -eq 0 ] && printf "✓ Process tap-vsockd running\n" || printf "✗ No tap-vsockd process\n"
fi
DOCKER=$(ps -eo args | grep '^/usr/bin/dockerd')
[ $? -eq 0 ] && printf "✓ Process dockerd running: $DOCKER\n" || printf "✗ No dockerd 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)
DOCKERV=$(docker --version)
[ $? -eq 0 ] && printf "✓ Docker daemon working: ${DOCKERV}\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"
CONTAINERD=$(ps -eo args | grep '^/usr/bin/containerd')
[ $? -eq 0 ] && printf "✓ System containerd server running: $CONTAINERD\n" || printf "✗ No containerd server\n"
CONTAINERPS=$(containerd-ctr containers 2>&1)
[ $? -eq 0 ] && printf "✓ System containerd working\n" || printf "✗ containerd failed: $CONTAINERPS\n"
exit 0