Skip to content

Instantly share code, notes, and snippets.


Burak Say buraksay

View GitHub Profile
buraksay / performance_data.rb
Created Feb 5, 2017 — forked from toobulkeh/performance_data.rb
rbvmomi performance manager usage
View performance_data.rb
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 =
pm.retrieve_stats([hosts[0]], ['cpu.usagemhz'], {interval: '300', start_time: ( - 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:
sudo apt-get update
sudo apt-get -y install linux-image-extra-$(uname -r)
sudo sh -c "wget -qO- | apt-key add -"
sudo sh -c "echo deb docker main\ > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get -y install lxc-docker
View mouse-tip.ahk
; 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.")
export EC2_HOME=/usr/local/share/ec2_tools/
export JAVA_HOME=/usr/lib/jvm/java
export PATH=$PATH:$EC2_HOME/bin
INSTANCEID=`curl -s`
case "$1" in
logger triggering notify master event