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 / portmutex.js
Created January 12, 2012 02:59
node.js process mutual exclusion?
var net = require('net');
var events = require('events');
var util = require('util');
function PortMutex(portnumber, delay) {
events.EventEmitter.call(this);
var self = this;
if (!portnumber)
throw new Error('must provide port number');
@jclulow
jclulow / fixer.ksh
Created February 4, 2012 06:22
[REVIEW] 763 FMD msg URLs should refer to something visible
#!/bin/ksh
WS="/ws/illumos-gate"
# this list generated with:
# git grep -l sun.com.msg | cat -
#
FILE_LIST="
usr/src/cmd/boot/bootadm/bootadm_upgrade.c
usr/src/cmd/fm/dicts/ZFS.po
@jclulow
jclulow / ZZ_output.txt
Created February 13, 2012 09:11
git outgoing
$ git outgoing
commit 6997d1f03b6ee3427a242970a53b6814b6252605
Author: Joshua M. Clulow <josh@sysmgr.org>
Date: Tue Nov 29 10:20:35 2011 +1100
description:
1815 sed -i "" no longer works
modified:
usr/src/cmd/sed/main.c
@jclulow
jclulow / fib.js
Created March 12, 2012 00:54 — forked from ry/fib.js
a proper fibonacci server in node. it will light up all your cores.
var os = require('os');
var http = require('http')
var fork = require('child_process').fork;
function fib(n) {
if (n < 2) {
return 1;
} else {
return fib(n - 2) + fib(n - 1);
}
@jclulow
jclulow / a.c
Created April 13, 2012 07:18
toying with ::findleaks and umem
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
void
strmess(const char *in)
{
static char *y;
@jclulow
jclulow / do_rsync.js
Created April 16, 2012 06:12
single-user ssh+rsync-based webrev@ to replace cr.illumos.org
#!/opt/local/bin/node
var fs = require('fs');
var util = require('util');
var ins = util.inspect;
var exit = process.exit;
var path = require('path');
var spawn = require('child_process').spawn;
function log(str) {
@jclulow
jclulow / ptree.sh
Created April 19, 2012 05:23
ptree for linux
#!/bin/bash
if [[ $# -gt 0 ]]; then
if expr $1 : '^[0-9]*$' > /dev/null; then
ARGS="-p $1"
shift
while [[ $# -gt 0 ]]; do
ARGS="${ARGS},$1"
shift
done
@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 / 00_output.txt
Created April 24, 2012 05:23
FORWARD(S) PROGRESS!
*** DBOOT DONE -- back to asm to jump to kernel
*** Entered Solaris in _start() cmdline is: 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
next_phys is 2ca3000
next_virt is 2ca3000
Initializing boot time memory management...done