Skip to content

Instantly share code, notes, and snippets.

View jlevon's full-sized avatar

John Levon jlevon

View GitHub Profile
@jlevon
jlevon / gist:c6774e2017b2287736f7914a66ed79c4
Last active May 29, 2018 15:27
FSS not working properly?
# zonecfg -z $build "info brand ; info cpu-shares ; info capped-cpu" ; zonecfg -z $build2 "info brand ; info cpu-shares ; info capped-cpu"
brand: joyent
[cpu-shares: 20000]
brand: joyent
[cpu-shares: 10000]
[root@lava ~]# prctl -n zone.cpu-shares $(ps -z $build -o pid | tail -1)
process: 13350: /bin/bash ./busy 200
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
@jlevon
jlevon / cr3.md
Last active June 13, 2018 12:18
unfortunate cr3...

Let's do a little dtracing:

# cat repro
#!/bin/bash

dtrace -n 'hilevel_intr_prolog:entry { c++; }'
[root@00-30-48-cf-be-f0 /zones/jlevon]# ./repro
dtrace: description 'hilevel_intr_prolog:entry ' matched 1 probe
white space nits:
usr/src/uts/intel/ia32/os/sysi86.c:28: space tab sequences
usr/src/uts/intel/ia32/os/sysi86.c:401: space tab sequences
usr/src/uts/intel/ia32/os/sysi86.c:402: space tab sequences
usr/src/uts/intel/ia32/os/sysi86.c:408: space tab sequences
usr/src/uts/intel/sys/x86_archext.h:93: space tab sequences
usr/src/uts/intel/sys/x86_archext.h:312: space tab sequences
usr/src/uts/intel/sys/x86_archext.h:315: space tab sequences
usr/src/uts/intel/sys/x86_archext.h:329: space tab sequences
usr/src/uts/common/sys/proc.h:156: space tab sequences
tl;dr: turn off the second socket if you want consistent results
for comparisons.
My system is two socket, with 2 8-vcpu bhyve guests. This script:
https://github.com/jlevon/grot/blob/master/bhyve-pin
will bind a VM to specific CPUs in a socket (nothing else should be
running other than the VMs under test). It's not smart enough to pick
idle CPUs, it's pretty hard coded (and make sure your system has CPUs in
@jlevon
jlevon / foo.md
Last active January 16, 2019 16:05
@jlevon
jlevon / newboot-tests.md
Last active February 11, 2019 17:43
newboot versioning test matrix

Intro

Tests we need to do due to version skew between gz-tools (things such as sdc-usbkey) and the PI / boot version.

Note: when we deploy a new CN, there are four elements

  1. BIOS boot mode: either legacy or EFI

  2. the USB key that's in the CN. Either grub or loader.

@jlevon
jlevon / fma-testing.txt
Created February 1, 2019 09:32
Testing done for FMA-related changes
Tested by Rob Johnston as follows:
- verified fmd was up
- ran "fmadm config" and fmstat, which exercises the RPC code path in fmd
- manually triggered the usage messages for smtp-notify and snmp-notify
- enabled smtp-notify service
- configured notifications for SMF services going into maintenance
- forced the intr service to fail
- ran fmadm faulty to verify a faulty was diagnoses
- verified root got an email notification
@jlevon
jlevon / newboot-flagday.md
Last active June 18, 2020 15:51
Flag day: OS-7260 SmartOS should support booting with loader
@jlevon
jlevon / default.configure.env
Created April 15, 2019 14:11
Example new configure.env for smartos-live
# ships as "default.configure.env"
# - if no configure.env is found, we use this (no need to cp if default)
# - we stop sourcing all configure.* - post your changes, it's no longer
# useful/necessary.
# we have these contents as default argument in our jenkins builds
# gerrit user can over-ride this, or individually below?
ORIGIN="https://github.com/joyent/"
# can we process these by parsing "env" or somesuch automatically??