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
vim = RbVmomi::VIM.connect host: vcenter.hostname, user: vcenter.username, password: vcenter.password, insecure: true | |
pm = vim.serviceInstance.content.perfManager | |
# this is for a single cluster with hosts directly in one cluster. 'first' returns the cluster object. | |
hosts = vim.serviceInstance.find_datacenter.hostFolder.children.first.host | |
pm.retrieve_stats([hosts[0]], ['cpu.usagemhz'], {interval: '300', start_time: (Time.now - 6.hours)}).first[1][:metrics]['cpu.usagemhz'] | |
# This above query queries for the 'cpu.usagemhz' counter, which by default matches the (none) rollup counter (NOT THE AVERAGE) in vSphere API. | |
# This is a problem with the RbVmomi gem helper function "retrieve_stats" only. To override this, use the following manual counter selection: |
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
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get -y install linux-image-extra-$(uname -r) | |
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -" | |
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ > /etc/apt/sources.list.d/docker.list" | |
sudo apt-get update | |
sudo apt-get -y install lxc-docker |
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
#Persistent | |
; update mouse tooltip position this often, in ms | |
; 10 ms looks the smoothest, but you may prefer a higher value | |
; if the CPU load is too high with 10 ms | |
MouseTipUpdateInterval := 10 | |
; a usage example | |
Tip("This is an example mousetip.") |
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
#!/bin/bash | |
export EC2_HOME=/usr/local/share/ec2_tools/ | |
export JAVA_HOME=/usr/lib/jvm/java | |
export PATH=$PATH:$EC2_HOME/bin | |
INSTANCEID=`curl -s http://169.254.169.254/latest/meta-data/instance-id` | |
case "$1" in | |
MASTER) | |
logger triggering notify master event |