This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository maintenancescripts. from cb32ea6 .gitignore: ignore temporary and binary files. new 81fa037 killstalevms.bash: get VMs, get builder PIDs. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: killstalevms.bash | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 killstalevms.bash -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository maintenancescripts. commit 81fa0374ba10ee6f91fbb21be796c6be53202d82 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Feb 11 23:25:20 2015 +0100 killstalevms.bash: get VMs, get builder PIDs. --- killstalevms.bash | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/killstalevms.bash b/killstalevms.bash new file mode 100644 index 0000000..b1761a5 --- /dev/null +++ b/killstalevms.bash @@ -0,0 +1,25 @@ +#/bin/bash + +set -x + +typeset -a VM_LIST +typeset -i i + +i=0 + +pgrep -f -u root '^kvm.*pbuilder.*qemu.*' | while read VM_PID; do + VM_LIST[$((i++))]="${VM_PID}" +done + +typeset -a BUILDER_LIST + +for ((i = 0; i < ${#VM_LIST[@]}; ++i)); do + BUILDER_LIST[$i]="$(perl -pe 's/.*?qemu\.(\d+)\.dev.*/\1/' < /proc/${VM_LIST[$i]}/cmdline)" +done + +typeset -a COMPONENT_LIST BRANCH_LIST SYSTEM_LIST + +for ((i = 0; i < ${#BUILDER_LIST[@]}; ++i)); do + TMP_CMDLINE="$(< /proc/${BUILDER_LIST[$i]}/cmdline)" + COMPONENT_LIST[$i]="$(perl -pe 's///' <<< "${TMP_CMDLINE}")" +done -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git