Skip to content

Instantly share code, notes, and snippets.

View bdha's full-sized avatar
☂️
ಠ_ಠ

Bryan Horstmann-Allen bdha

☂️
ಠ_ಠ
View GitHub Profile
[root@gp1 (us-east-1) ~]# vmadm list | grep damson
7913a1eb-91c1-6f60-9c28-c1e7449fb4b1 LX 2048 running damson0.dev
b8a1392c-9b92-ca47-a433-cd3928ba7e56 LX 2048 running damson1.dev
f79b1c8f-75e7-4c12-9e0e-daceb8b99d9b LX 2048 running damson2.dev
# uname -a
SunOS damson0.dev.helium.systems 5.11 joyent_20150430T051511Z i86pc i386 i86pc
# zonename
7913a1eb-91c1-6f60-9c28-c1e7449fb4b1
[20150625-02:47:45]::[root@lx-test]:[~]# /native/usr/sbin/dtrace -n 'syscall:::entry /execname == "snapboard"/ { @num[probefunc] = count(); }'
dtrace: description 'syscall:::entry ' matched 233 probes
^C
lwp_continue 2
lwp_create 2
mprotect 2
processor_bind 2
schedctl 2
yield 2
--- /root/daemontools.rb.orig 2009-04-06 18:03:04.355682000 -0400
+++ daemontools.rb 2009-04-07 18:14:44.624793744 -0400
@@ -34,8 +34,7 @@
"""
- commands :svc => "/usr/bin/svc"
- commands :svstat => "/usr/bin/svstat"
+ commands :svc => "/usr/bin/svc", :svstat => "/usr/bin/svstat"
[20090407-18:23:35]::[root@iapetus]:[~]$ /usr/pkg/bin/puppetd --verbose --logdest=syslog --test --server control.pobox.com --factsync
info: Loading fact zonename
info: Loading fact location
info: Loading fact hardware_platform
info: Retrieving facts
notice: /File[/var/puppet/facts]/checksum: checksum changed '{mtime}Mon Apr 06 04:30:29 -0400 2009' to '{mtime}Mon Apr 06 04:30:30 -0400 2009'
info: Loading fact zonename
info: Loading fact location
info: Loading fact hardware_platform
/usr/pkg/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27: command not found: /bin/zonename
[20090408-18:03:31]:[shoal]:[bda@lab]:[~/Projects/pobox/mon/mon.d]$ cat fmdump.monitor
#!/icg/bin/perl
use strict;
use warnings;
use Sys::Hostname;
use IPC::Run qw/run new_chunker timeout/;
unless ( $^O eq "solaris" ) { exit 0; }
# 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.
#
# Determine which init system we're using and load daemontools for it.
init_system = File.readlink("/proc/1/exe")
case init_system
when /upstart/
log "Using upstart"
cookbook_file "/etc/init/svscanboot.conf" do
source "upstart.svc"
owner "root"
group "root"
# Grab any zfs data from "zfs get"
#zfs = Mash.new
#popen4("zfs get -p -H all") do |pid, stdin, stdout, stderr|
# stdin.close
# stdout.each do |line|
# next unless (line =~ /^([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)$/)
# filesystem = $1
# zfs[filesystem] = Mash.new unless zfs.has_key?(filesystem)
# zfs[filesystem][:values] = Mash.new unless zfs[filesystem].has_key?('values')
# zfs[filesystem][:sources] = Mash.new unless zfs[filesystem].has_key?('sources')
#!/bin/bash
if ! [ $3 ] ; then
echo "$0 <SOURCE POOL/DATASET> <TARGET_HOST> <TARGET POOL/DATASET>"
exit 1
fi
SRC=$1
TARGET_HOST=$2
DST=$3
[root@00-0c-29-a1-8b-9d ~]# cat /etc/motd
- SmartOS Live Image v0.147+ build: 20120113T013514Z
[root@00-0c-29-a1-8b-9d ~]# uname -a
SunOS 00-0c-29-a1-8b-9d 5.11 joyent_20120113T013514Z i86pc i386 i86pc
[root@00-0c-29-a1-8b-9d ~]# zlogin test1
[Connected to zone 'test1' pts/3]
Last login: Tue Jan 24 04:03:39 on pts/3
OpenIndiana (powered by illumos) SunOS 5.11 oi_151a September 2011
root@test1:~# cat /etc/release
OpenIndiana Development oi_151a X86