socat -d -d unix-client:/run/vc/sbs/18b2d72aa31b721b96d50e606684ab92fac19244cddd604dae35428fda5a28ce/console.sock pty,echo=0,raw &> /tmp/log &
sleep 1
pts=$(grep "N PTY is" /tmp/log | egrep -o "/dev/pts/[0-9]+")
echo "" > $pts
echo "uptime" > $pts
uptime=$(head -4 $pts)
killall socat
echo "VM uptime: " $uptime
Created
May 22, 2018 18:56
-
-
Save devimc/75f3e6b3172923e104b41b099fc8731a to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment