Skip to content

Instantly share code, notes, and snippets.

View jclulow's full-sized avatar
🌃
Cats & kittens grab your mittens; taking you through the night & into the mystic

Joshua M. Clulow jclulow

🌃
Cats & kittens grab your mittens; taking you through the night & into the mystic
View GitHub Profile
@jclulow
jclulow / sample1.md
Created January 10, 2012 08:02
getting there.

Solaris Modular Debugger Guide

The Modular Debugger (MDB) is a highly extensible, general purpose debugging tool for the Solaris Operating System (Solaris OS). The Solaris Modular Debugger Guide describes how to use MDB to debug complex software systems, with a particular emphasis on the facilities available for debugging the Solaris kernel and associated device drivers and modules. It also includes a complete reference for and discussion of the MDB language syntax, debugger features, and MDB Module Programming API.

This Solaris release supports systems that use the SPARC and x86 families of processor architectures: UltraSPARC, SPARC64, AMD64, Pentium, and Xeon EM64T. In this document the term "x86" refers to 64-bit and 32-bit systems manufactured using processors compatible with the AMD64 or Intel Xeon/Pentium product families. For supported systems, see the Solaris OS Hardware Compatibility Lists at http://www.sun.com/bigadmin/hcl/ . This docume

@jclulow
jclulow / 00_info.md
Created May 5, 2012 23:46
SmartOS rc.local

So, to get something like /etc/rc.local you can use the custom SMF import facility. (See the source for more information about how this actually works.)

/opt is mounted out of zones/opt by default. You can create a directory /opt/custom/smf and populate it with SMF manifests. Any manifests you put in there will be imported by SmartOS when it boots. Below is an example SMF manifest that simply starts /opt/custom/bin/postboot, a self-explanatory shell script that you can use like /etc/rc.local.

Note that it would likely be better to customise and respin your own images, as putting a bunch of platform state in the zones pool undoes some of the benefits of the ramdisk platform architecture that SmartOS has.

diff --git a/oxide/build.sh b/oxide/build.sh
index 470617f..aa4002e 100755
--- a/oxide/build.sh
+++ b/oxide/build.sh
@@ -1,19 +1,21 @@
#!/bin/bash
set -e
+TOP=$(cd "$(dirname "$0")" && pwd)
@jclulow
jclulow / help_printf.txt
Created May 10, 2012 09:24
::help printf
leftwing@onbld0 illumos-gate $ proto/root_i386/usr/bin/mdb
> ::help printf
NAME
printf - print and format the member(s) of a data structure
SYNOPSIS
[ addr ] ::printf format type member ...
DESCRIPTION
.\"
.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
.\" permission to reproduce portions of its copyrighted documentation.
.\" Original documentation from The Open Group can be obtained online at
.\" http://www.opengroup.org/bookstore/.
.\"
.\" The Institute of Electrical and Electronics Engineers and The Open
.\" Group, have given us permission to reprint portions of their
.\" documentation.
.\"
commit 69efc6ac97d9e8c5164bdb5942aa5f5a33e785a0
Author: Joshua M. Clulow <josh@sysmgr.org>
Date: Sat Jul 27 19:05:00 2019 +0000
vim: make unfocused status bar visible
diff --git a/vim/colors/tir_black.vim b/vim/colors/tir_black.vim
index 00a2b0c..6c01392 100644
--- a/vim/colors/tir_black.vim
+++ b/vim/colors/tir_black.vim
@jclulow
jclulow / illumos-rolling.xml
Created June 6, 2021 20:09
osinfo file for illumos
<?xml version="1.0"?>
<libosinfo version="0.0.1">
<!-- Licensed under the GNU General Public License version 2 or later.
See http://www.gnu.org/licenses/ for a copy of the license text -->
<os id="http://illumos.org/illumos/rolling">
<short-id>illumos</short-id>
<name>illumos</name>
<vendor>illumos</vendor>
<family>illumos</family>
<release-status>rolling</release-status>
@jclulow
jclulow / awk.js
Created November 10, 2011 05:18
Awk in Javascript?
/*
* map predicate to code...
* /regex/ --> function (groups, next)
* ^ ^ function to call if we should
* | \---skip remaining predicates for this line
* \- e.g. groups[1] is first regex group, etc
*/
function line(predicate, codeblock) {
return ({ predicate: predicate, codeblock: codeblock });
@jclulow
jclulow / 00_output.txt
Created April 24, 2012 02:09
MAGICAL BOOT FAIRIES
Solaris prekernel set: http://store0.sys.syd.distra.com/tmp/ipxe/platform0/i86pc/kernel/amd64/unix -B console=ttya,kbm_debug=true,prom_debug=true,map_debug=true -kdv
(uintptr_t)bi is 0xc10100
target_kernel_text is 0xfffffffffb800000
Entered init_mem_alloc()
(uintptr_t)mb_info is 0x9c978
Finding Modules
next_avail_addr is 0xc12000
@jclulow
jclulow / README.md
Created December 16, 2011 07:31
oddball ps behaviour

So, ps is running somewhat slowly...

asgard # time ps -ef | wc -l
     173

real    0m10.195s
user    0m0.023s
sys     0m9.779s