Category: Uncategorized

puppet dev environment with lxc

  credit: https://blkperl.github.io/puppet-dev-with-lxc.html   Install LXC On Ubuntu installing LXC is easy and the package comes with working Ubuntu and Debian templates. sudo apt-get install lxc Create a puppet master The first thing we need is a puppet master. To do this we are going to use the lxc-create command to create a minimal Ubuntu Precise […]

vsphere powercli/powershell – VM average performance stats for x number of days

execute the code below after connecting to your VI server: change values as needed:   example: C:\PS>Connect-VIServer -Server 10.23.112.235 -Protocol https -User Administrator -Password pass01   Get-VM | where {$_.name -like “*publ*”} | Select Name, VMHost, NumCpu, MemoryMB, ` @{N=”CPU Usage (Average), Mhz” ; E={[Math]::Round((($_ | Get-Stat -Stat cpu.usagemhz.average -Start (Get-Date).AddDays(-30) -IntervalMins 5 | Measure-Object […]

CURL – test for website response

command line: for i in `seq 1 10`;do curl -s -w ‘\nLookup time:\t%{time_namelookup}\nConnect time:\t%{time_connect}\nPreXfer time:\t%{time_pretransfer}\nStartXfer time:\t%{time_starttransfer}\n\nTotal time:\t%{time_total}\n’ -o /dev/null http://www.google.com;done; Lookup time: 0.009 Connect time: 0.036 PreXfer time: 0.036 StartXfer time: 0.115 Total time: 0.143 Lookup time: 0.010 Connect time: 0.037 PreXfer time: 0.037 StartXfer time: 0.117 Total time: 0.145 Lookup time: 0.012 Connect time: […]

RHEL add global proxy

Testing whether a proxy is set This command will show if there is a proxy server configured on the system: Raw echo $http_proxy Proxy setting for command line programs The http_proxy environment variable is used to specify proxy settings to client programs such as curl and wget. No username and password required: Raw export http_proxy=http://SERVER:PORT/ Username and password authentication: Raw […]

EPOCH time – Nagios Time convert

The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z). to convert epoch time: perl -le ‘print scalar localtime $ARGV[0]’ 1510686308 Tue Nov 14 14:05:08 2017 to See nagios logs in Human Readable […]

Categories

Best Buy Co, Inc.
Best Buy Co, Inc.
Best Buy Co, Inc.