This file contains hidden or 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
// +build windows | |
package screen | |
import ( | |
"fmt" | |
"image" | |
"reflect" | |
"syscall" | |
"unsafe" |
This file contains hidden or 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
PKGS="collectd collectd-apache collectd-curl collectd-dns collectd-ipmi collectd-netlink collectd-ping collectd-redis collectd-write_redis" | |
/usr/bin/yum -q -y install ${PKGS} | |
CNFFILE="/etc/collectd.conf" | |
CNFDIR="/etc/collectd.d" | |
BACKUPDIR="/root/collectd.`date +%s`" | |
mkdir -p ${BACKUPDIR} | |
mv -v ${CNFDIR}/* ${BACKUPDIR}/ | |
cp -v ${CNFFILE} ${BACKUPDIR}/ | |
mkdir -p ${CNFDIR}/ |
This file contains hidden or 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
function bad () { | |
# { short_hostname, alarm_name, handler_name} | |
# default: hostname -s, alarmtest, enterprise_mws | |
[ -z ${1} ] && ahost="`hostname -s`" || ahost=${1} | |
[ -z ${2} ] && check="alarmtest" || check="${2}" | |
[ -z ${3} ] && handler="enterprise_mws" || handler="${3}" | |
echo "`date`: badding ${ahost}, ${check}" | |
echo '{ "source": "'${ahost}'", "handlers": [ "'${handler}'" ], "name": "'${check}'", "issued": "'`date +%s`'", "output": "CRITICAL: '${ahost}' is sad.", "status": 2 }' | nc -w1 127.0.0.1 3030 | |
} | |
function good () { |
This file contains hidden or 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/sh | |
# must set: | |
# - slacktoken (token part of slack hook url) | |
# - slackchannel (channel to send to) | |
# - slackbotname (bot name) | |
# - slicon (default bot icon) | |
# - slacknotice (true/false, false - supress sending slack notices) | |
# | |
if [ -z "${slacktoken}" ]; then |
This file contains hidden or 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
$ rpm -qp MegaCli-8.07.14-1.noarch.rpm --scripts | |
postinstall scriptlet (using /bin/sh): | |
touch /opt/MegaRAID/MegaCli/install.log | |
if [ -f /opt/MegaCli ] | |
then | |
echo "Warning! Previous MegaCli package is already installed under /opt directory" | |
fi | |
if [ -f /usr/sbin/MegaCli ] | |
then |
This file contains hidden or 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
{ | |
"client": { | |
"safe_mode": false, | |
"address": "XXIP", | |
"subscriptions": [ | |
"linuxhost", | |
"XXSHORTHOSTNAME", | |
"XXSOME_PRODUCT_HOSTTYPE_IDENTIFIER", | |
"XXANOTHER_PRODUCT_HOSTTYPE_IDENTIFIER" | |
], |
This file contains hidden or 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
- document test/development process for enterprise checks | |
- secure hardware / os platforms for testing |
This file contains hidden or 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
#showtooltip Rebuke | |
/cast [harm] Rebuke [target=targettarget,harm] Rebuke | |
/run local a=UnitCastingInfo("target")_=a and SendChatMessage("Interrupted %t; casting ["..a.."].","SAY") |
This file contains hidden or 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
[root@vultr ~]# hdparm -tT /dev/vda | |
/dev/vda: | |
Timing cached reads: 27278 MB in 2.00 seconds = 13655.17 MB/sec | |
Timing buffered disk reads: 1366 MB in 3.00 seconds = 455.25 MB/sec | |
[root@vultr ~]# hdparm --direct -tT /dev/vda | |
/dev/vda: | |
Timing O_DIRECT cached reads: 872 MB in 2.00 seconds = 435.08 MB/sec | |
Timing O_DIRECT disk reads: 1276 MB in 3.00 seconds = 424.78 MB/sec |
This file contains hidden or 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
--- storage-orig.py 2014-08-25 19:24:37.357155937 -0700 | |
+++ storage.py 2014-08-25 19:26:04.100154924 -0700 | |
@@ -98,22 +98,18 @@ | |
if ':' in host: | |
host = host.split(':',1)[0] | |
- for port in xrange(1025, 65535): | |
- try: | |
- sock = socket.socket() | |
- sock.bind( (host,port) ) |
NewerOlder