Skip to content

Instantly share code, notes, and snippets.

View gonzopancho's full-sized avatar

Jim Thompson gonzopancho

View GitHub Profile
#include "targetver.h"
#include <windows.h>
#include <iostream>
#include <tchar.h>
#include <assert.h>
using namespace std;
class VivaMeteringTimeStruct {
public:
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2012 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.3-RELEASE-p12 #0: Tue Nov 12 16:21:01 EST 2013
root@netgate-8_3-amd64.builders.pfsense.org:/usr/obj.netgate/usr/pfSensesrc/src/sys/pfSense_SMP.8 amd64
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Genuine Intel(R) CPU @ 2.40GHz (2401.75-MHz K8-class CPU)
last pid: 1742; load averages: 1.63, 0.61, 0.29 up 0+01:42:59 17:29:11
232 processes: 9 running, 148 sleeping, 75 waiting
CPU: 0.0% user, 0.0% nice, 7.2% system, 7.8% interrupt, 85.1% idle
Mem: 27M Active, 44M Inact, 282M Wired, 20M Buf, 7537M Free
Swap: 3615M Total, 3615M Free
PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND
11 root 155 ki31 0K 128K CPU6 6 99:28 99.99% idle{idle: cpu6}
11 root 155 ki31 0K 128K CPU4 4 98:06 99.97% idle{idle: cpu4}
11 root 155 ki31 0K 128K CPU7 7 99:03 99.45% idle{idle: cpu7}
@gonzopancho
gonzopancho / openvpn.sls
Created March 28, 2015 16:32
OpenVPN saltstack
---
# OpenVPN -- secure connection with the internet
openvpn-rc:
file.managed:
- name: /etc/rc.conf.d/openvpn
- source: salt://openvpn/files/openvpn_rc.conf
- template: jinja
openvpn:
#include "Platform.h"
#include <stdio.h>
void testRDTSC ( void )
{
int64_t temp = rdtsc();
printf("%d",(int)temp);
}
@ CPU_CLK_UNHALTED_CORE [134386 samples]
19.39% [26053] ether_input @ /usr/home/jim/netmap-fwd/netmap-fwd
99.60% [25950] netmap_read
100.0% [25950] event_base_loop @ /usr/local/lib/libevent-2.0.so.5.1.10
100.0% [25950] main @ /usr/home/jim/netmap-fwd/netmap-fwd
100.0% [25950] _start
00.40% [103] event_base_loop @ /usr/local/lib/libevent-2.0.so.5.1.10
100.0% [103] main @ /usr/home/jim/netmap-fwd/netmap-fwd
100.0% [103] _start
@ instruction-retired [52200 samples]
14.66% [7652] in_cksum @ /usr/home/jim/netmap-fwd/netmap-fwd
100.0% [7652] ip_input
100.0% [7652] netmap_read
100.0% [7652] event_base_loop @ /usr/local/lib/libevent-2.0.so.5.1.10
100.0% [7652] main @ /usr/home/jim/netmap-fwd/netmap-fwd
100.0% [7652] _start
12.81% [6686] ip_input @ /usr/home/jim/netmap-fwd/netmap-fwd
Jims-MBP:bhyve jim$ pwd
/Users/jim/lettieri.iet.unipl.it/bhyve
Jims-MBP:bhyve jim$ git log | cat
commit 8e348aeff128b4b9b030593719a70bea28af9b17
Author: Vincenzo Maffione <[email protected]>
Date: Thu May 29 15:41:30 2014 +0200
net_backends: credits
commit 10789205d1befda1eac8f227c798785838fc1fac
jim@x230:~ % sysctl kern.version
kern.version: FreeBSD 11.0-CURRENT #14 r289806: Fri Oct 23 04:55:45 CDT 2015
root@x230:/usr/obj/usr/src/sys/GENERIC-NODEBUG
jim@x230:~ % cat clock.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <errno.h>
requires FreeBSD kernel with
https://github.com/freebsd/freebsd/commit/cac3f209134f9f95a431a8480d1275c640d86d7d#diff-f4318c2cf4a50c29e6990f3e8a8a5286
https://github.com/freebsd/freebsd/commit/7ab2b8809cd93e9b6da4f2284f4a5851deeff012#diff-f4318c2cf4a50c29e6990f3e8a8a5286
or pfense 2.3 snapshot from 8 Jan 2016 or later
1. Launch the first vm with a NIC configured as a vale port:
$ bhyve -A -H -P \
-s 0:0,hostbridge \