Skip to content

Instantly share code, notes, and snippets.

View jjelinek's full-sized avatar

Jerry Jelinek jjelinek

  • RackTop Systems
View GitHub Profile
@jjelinek
jjelinek / capping
Last active August 29, 2015 14:16
memcapper
The physical memory limit and the swap cap are two independent and
unrelated limits.
The physical memory limit is a soft cap that controls how many pages of
physical memory can be resident for the zone. Once that value is exceeded
the memory capper will invalidate pages until the RSS of the set of
processes within the zone is below the limit.
The swap cap is a hard limit and is used to control how much anonymous
memory is available. Because anonymous memory is reserved when it is
#include <stdio.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int (*gettod)(int *) = (void *)0xffffffffff600000;
static void
vsyscall()
@jjelinek
jjelinek / gist:9696f311835800c594c8
Created February 2, 2015 23:33
vsyscall probes
2015 Feb 2 23:31:35: cleaned bash (pid 122076)
2015 Feb 2 23:31:35: cleaned bash (pid 122076)
2015 Feb 2 23:31:35: cleaned cat (pid 122078)
2015 Feb 2 23:31:35: cleaned bash (pid 122076)
2015 Feb 2 23:31:35: cleaned init (pid 122074)
2015 Feb 2 23:31:35: cleaned rc.sysinit (pid 122081)
2015 Feb 2 23:31:35: cleaned rc.sysinit (pid 122081)
2015 Feb 2 23:31:35: cleaned hostname (pid 122084)
2015 Feb 2 23:31:35: cleaned modprobe (pid 122086)
2015 Feb 2 23:31:35: cleaned mount (pid 122087)
@jjelinek
jjelinek / gist:9807800
Created March 27, 2014 13:41
zone truss
fbt::zone:entry
/arg0 == 7/
{
printf("%s -> %d\n", probefunc, arg0);
}
fbt::zone_boot:entry
{
printf("%s -> zoneid %d\n", probefunc, arg0);
}
@jjelinek
jjelinek / dtrace destroy
Last active August 29, 2015 13:57
dtrace destroy
#pragma D option quiet
fbt::zfs_domount:entry
{
printf("%s 0x%p %s\n", probefunc, arg0, stringof(arg1));
vfs = (vfs_t *)arg0;
self->vfs = vfs;
}
fbt::zfsvfs_create:entry