3 66b4f513 2021-01-03 mischa # Copyright (c) 2019-2021 Mischa Peters <mischa @ openbsd.amsterdam>
5 510c65cd 2020-05-17 mischa # Permission to use, copy, modify, and distribute this software for any
6 510c65cd 2020-05-17 mischa # purpose with or without fee is hereby granted, provided that the above
7 510c65cd 2020-05-17 mischa # copyright notice and this permission notice appear in all copies.
9 510c65cd 2020-05-17 mischa # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 510c65cd 2020-05-17 mischa # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 510c65cd 2020-05-17 mischa # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 510c65cd 2020-05-17 mischa # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 510c65cd 2020-05-17 mischa # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 510c65cd 2020-05-17 mischa # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 510c65cd 2020-05-17 mischa # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 f0f264d4 2020-09-26 mischa HOST=$(hostname -s)
18 510c65cd 2020-05-17 mischa TOTAL=$(vmctl show | grep -vc ID)
19 510c65cd 2020-05-17 mischa RUNNING=$(vmctl show | egrep -vc 'ID|- ')
20 f0f264d4 2020-09-26 mischa printf "VMs Running: %2d of %2d (%s)\n" "${RUNNING}" "${TOTAL}" "${HOST}"