Skip to content

Instantly share code, notes, and snippets.

View mittwillson's full-sized avatar
:shipit:
I may be slow to respond.

Mitt mittwillson

:shipit:
I may be slow to respond.
View GitHub Profile
#!/usr/bin bash
#
# Kill all zombies kvm process to release memory and idle cpu
#
# bash <(curl https://gist.githubusercontent.com/MittWillson/6b8e6b8b68af4c18bc9eb138713284e9/raw/proxmox-kill-zombie-kvm)
# bash <(curl https://gist.githubusercontent.com/MittWillson/6b8e6b8b68af4c18bc9eb138713284e9/raw/proxmox-kill-zombie-kvm) --kill
RUNNING=($(ps -ef | grep "kvm -id" | grep -v grep | awk '{print $2}'))
ALIVE_RUNNING=($(qm list|grep running|awk '{print $6}'))
#!/usr/bin/env bash
OLD_HOSTNAME=$(hostname)
NEW_HOSTNAME=$1
rename() {
echo $OLD_HOSTNAME > /.old_nodename
hostnamectl set-hostname "$NEW_HOSTNAME"
# edit hostname file