From 434815e013c48f1feb3bfd2d3ce7d2c5a97c02ac Mon Sep 17 00:00:00 2001 From: kneutron <50146127+kneutron@users.noreply.github.com> Date: Wed, 17 Apr 2024 13:46:04 -0600 Subject: [PATCH] Add files via upload --- proxmox/proxmox-list-containers.sh | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 proxmox/proxmox-list-containers.sh diff --git a/proxmox/proxmox-list-containers.sh b/proxmox/proxmox-list-containers.sh new file mode 100644 index 0000000..23b55af --- /dev/null +++ b/proxmox/proxmox-list-containers.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# 2024.Apr kneutron + +declare -a tmpa +tmpa=$(pct list) +# if we dont quote tha var/array, only get 1 line of output + +echo "$tmpa" |egrep 'Status|running' +#VMID Status Lock Name +#105 running gotify +#118 running proxmox-fileserver-ctr + +echo '=====' +echo "$tmpa" |egrep 'Status|stopped' +#VMID Status Lock Name +#110 stopped suseleap-ctr-p +#113 stopped debian-ctr +#114 stopped debianctr-xorgtest +#122 stopped test-phone-tether +#124 stopped debian-qdevice-dellap + +exit; + +# echo "$tmpa" +VMID Status Lock Name +105 running gotify +110 stopped suseleap-ctr-p +113 stopped debian-ctr +114 stopped debianctr-xorgtest +118 running proxmox-fileserver-ctr +122 stopped test-phone-tether +124 stopped debian-qdevice-dellap