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
$ sudo pstack 73415 | |
73415: /opt/local/sbin/nginx -c /opt/local/etc/nginx/nginx.conf | |
fffffd7fff2704ca sigsuspend (fffffd7fffdffab0) | |
0000000000447590 ngx_master_process_cycle () + 340 | |
0000000000428fe8 main () + a4e | |
0000000000427dbc _start () + 6c |
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/sbin/dtrace -s | |
/* | |
* mysql_pid_slow.d Trace queries slower than specified ms. | |
* | |
* USAGE: ./mysql_pid_slow.d -p mysqld_PID min_ms | |
* | |
* TESTED: these pid-provider probes may only work on some mysqld versions. | |
* 5.0.51a: ok | |
*/ |
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 | |
APP_NAME="<app name>" | |
API_TOKEN="<api token>" | |
TIME=$(date +%s) | |
curl --user $APP_NAME:$API_TOKEN \ | |
-H "Accept: application/json" \ | |
-X POST \ | |
--data-binary "{\"category\": \"Deployment\",\"title\":\"Deployed $APP_NAME\",\"description\":\"Deployed revision X.X.X\",\"start\": $TIME,\"stop\":$TIME}" \ |
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 | |
set -e | |
apt-get install -y software-properties-common | |
apt-add-repository -y ppa:zfs-native/stable | |
apt-get update | |
apt-get install -y ubuntu-zfs | |
# load zfs kernel module |
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
disk_used L `df / | tail -1 | awk '{print $2}'` | |
disk_free L `df / | tail -1 | awk '{print $3}'` |
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
> ::status | |
debugging crash dump vmcore.0 (64-bit) from 00-14-4f-23-fb-24 | |
operating system: 5.11 joyent_20121101T182015Z (i86pc) | |
image uuid: (not set) | |
panic message: | |
BAD TRAP: type=e (#pf Page fault) rp=ffffff00094b99a0 addr=80 occurred in module "un | |
ix" due to a NULL pointer dereference | |
dump content: kernel pages only | |
> $c | |
mutex_enter+0xb() |
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 | |
## Generated by Chef for <%= @node[:fqdn] %> | |
if [ -f /tmp/dns_master-slave ]; then | |
exit 0 | |
fi | |
TTL=3600 | |
ZONE=`hostname | awk -F"." '{print $2"."$3"."$4}'` | |
KEYFILE="/root/keys/ddns.private" |
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
## may be deprecated by https://github.com/wanelo-chef/nad | |
#!/bin/bash | |
git clone git://github.com/circonus-labs/nad.git | |
cd ./nad && make install | |
cd /opt/omni/etc/node-agent.d |
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
# This document describes updating the SmartOS boot_archive and /usr volumes. | |
# | |
# The boot_archive effectively contains /. If you want to make changes to SMF | |
# or so forth, you need to update the boot_archive. | |
# | |
# If you want to add things to /usr, such as drivers, you will need to update | |
# usr.lgz. It is compressed, so note the lofiadm -U and -C calls below. Once | |
# you have updated usr.lgz you will need to copy it back to the mounted | |
# boot_arhive. | |
# |
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
<?xml version="1.0"?> | |
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> | |
<service_bundle type='manifest' name='chef-client'> | |
<service | |
name='application/management/chef-client' | |
type='service' | |
version='1'> |