This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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}')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
OLD_HOSTNAME=$(hostname) | |
NEW_HOSTNAME=$1 | |
rename() { | |
echo $OLD_HOSTNAME > /.old_nodename | |
hostnamectl set-hostname "$NEW_HOSTNAME" | |
# edit hostname file |