Skip to content

Instantly share code, notes, and snippets.

View citrus-it's full-sized avatar

Andy Fiddaman citrus-it

View GitHub Profile
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <security/cryptoki.h>
#include <security/pkcs11.h>
int
main()
{
CK_SESSION_HANDLE session;
pfexec bhyve
-H
-B "1,product=OmniOS HVM"
# SmartOS never specifies a hostbridge, amd_hostbridge is needed for at least Free/OpenBSD
# Options are none, hostbridge or amd_hostbridge
# NB: For 'hostbridge' vendor and device are set to a NetApp id
-s 0,amd_hostbridge
# LPC PCI-ISA bridge providing connectivity to com1, com2, and bootrom
bloody# zonecfg -z test info
zonename: test
zonepath: /data/zone/test
brand: pkgsrc
autoboot: false
bootargs:
pool:
limitpriv:
scheduling-class:

On-demand VNICs in OmniOS

In this zone configuration:

  • test0 has a mac-address specified
  • test2 does not have a global-nic attribute configured, so it's a traditional VNIC that needs creating by hand in the GZ
  • test3 has a configured vlan
bloody# zonecfg -z test info net
net:
% git diff
diff --git a/usr/src/cmd/zpool/zpool_main.c b/usr/src/cmd/zpool/zpool_main.c
index 2e8082b681..d0504345ca 100644
--- a/usr/src/cmd/zpool/zpool_main.c
+++ b/usr/src/cmd/zpool/zpool_main.c
@@ -3226,6 +3226,7 @@ print_vdev_stats(zpool_handle_t *zhp, const char *name, nvlist_t *oldnv,
         * print all other top-level devices
         */
        for (uint_t n = 0; n < 3; n++) {

gcc 4

%{ansi:values-Xc.o%s}
%{!ansi:values-Xa.o%s}

illumos gcc7

@citrus-it
citrus-it / locks.md
Last active December 28, 2019 20:23
pfiles locks
bloody# ./locks &
[1] 102240
    Locked (RO): 3
OFD Locked (RO): 4
    Locked (RW): 5
OFD Locked (RW): 6

diff

zonename: tt
zonepath: /data/zone/tt
brand: illumos
autoboot: false
bootargs:
pool:
limitpriv: default
scheduling-class:
reaper# zadm show test
{
   "cloud-init" : "on",
   # - sshkey can also be a path to a file, current attr limit of 256 characters is problematic
   "sshkey" : "ssh-ed25519 AAAAC3N...nl9Hqpi7j4acP8s",
   # password can be a hash or just the desired password
   "password" : "$6$SEeDRaFR$CI8Y/wfMXioIWlrtTLs75iOA4m/./1Vu78d5Plhk6N/T.yctR/s8ojMIjIhyIJB8lwYJAlQXi5GBuh4O0gjY5/",
 export __GNUC=
 export PRIMARY_CC=gcc7,/opt/gcc-7/bin/gcc,gnu
 export PRIMARY_CCC=gcc7,/opt/gcc-7/bin/g++,gnu
-export SHADOW_CCS=gcc4,/opt/gcc-4.4.4/bin/gcc,gnu
-export SHADOW_CCCS=gcc4,/opt/gcc-4.4.4/bin/g++,gnu
+export SHADOW_CCS=gcc10,/opt/gcc-10/bin/gcc,gnu
+export SHADOW_CCCS=gcc10,/opt/gcc-10/bin/g++,gnu