/*
 * Metrics for FreeBSD kernel PMDA
 *
 * Copyright (c) 2012 Ken McDonell  All Rights Reserved.
 * 
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * for more details.
 */

/*
 * the domain for the FreeBSD PMDA ...
 */
#ifndef FREEBSD
#define FREEBSD 85
#endif

root {
    hinv
    kernel
    disk
    mem
    network
    swap
}

hinv {
    ncpu	FREEBSD:0:0
    ndisk	FREEBSD:1:0
    physmem	FREEBSD:0:1
    pagesize	FREEBSD:1:3
    cpu
}

hinv.cpu {
    vendor	FREEBSD:0:15
    model	FREEBSD:0:16
    arch	FREEBSD:0:17
}

kernel {
    all
    percpu
}

kernel.all {
    pswitch	FREEBSD:0:22
    syscall	FREEBSD:0:23
    intr	FREEBSD:0:24
    hz		FREEBSD:0:13
    load	FREEBSD:0:2
    cpu
}

kernel.all.cpu {
    user	FREEBSD:0:3
    nice	FREEBSD:0:4
    sys		FREEBSD:0:5
    intr	FREEBSD:0:6
    idle	FREEBSD:0:7
}

kernel.percpu {
    cpu
}

kernel.percpu.cpu {
    user	FREEBSD:0:8
    nice	FREEBSD:0:9
    sys		FREEBSD:0:10
    intr	FREEBSD:0:11
    idle	FREEBSD:0:12
}

disk {
    dev
    all
}

disk.dev {
    read	FREEBSD:2:0
    write	FREEBSD:2:1
    total	FREEBSD:2:2
    read_bytes	FREEBSD:2:3
    write_bytes	FREEBSD:2:4
    total_bytes	FREEBSD:2:5
    blkread	FREEBSD:2:12
    blkwrite	FREEBSD:2:13
    blktotal	FREEBSD:2:14
}

disk.all {
    read	FREEBSD:2:6
    write	FREEBSD:2:7
    total	FREEBSD:2:8
    read_bytes	FREEBSD:2:9
    write_bytes	FREEBSD:2:10
    total_bytes	FREEBSD:2:11
    blkread	FREEBSD:2:15
    blkwrite	FREEBSD:2:16
    blktotal	FREEBSD:2:17
}

mem {
    util
}

mem.util {
    all		FREEBSD:1:4
    used	FREEBSD:1:5
    free	FREEBSD:1:6
    bufmem	FREEBSD:1:7
    cached	FREEBSD:1:8
    wired	FREEBSD:1:9
    active	FREEBSD:1:10
    inactive	FREEBSD:1:11
    avail	FREEBSD:1:12
}

network {
    interface
}

network.interface {
    mtu		FREEBSD:3:0
    up		FREEBSD:3:1
    baudrate	FREEBSD:3:2
    in
    out
    total
}

network.interface.in {
    bytes	FREEBSD:3:3
    packets	FREEBSD:3:4
    mcasts	FREEBSD:3:5
    errors	FREEBSD:3:6
    drops	FREEBSD:3:7
}

network.interface.out {
    bytes	FREEBSD:3:8
    packets	FREEBSD:3:9
    mcasts	FREEBSD:3:10
    errors	FREEBSD:3:11
    collisions	FREEBSD:3:12
}

network.interface.total {
    bytes	FREEBSD:3:13
    packets	FREEBSD:3:14
    mcasts	FREEBSD:3:15
    errors	FREEBSD:3:16
}

swap {
    pagesin	FREEBSD:0:18
    pagesout	FREEBSD:0:19
    in		FREEBSD:0:20
    out		FREEBSD:0:21
    length	FREEBSD:0:25
    used	FREEBSD:0:26
    free	FREEBSD:1:1
}

#undef FREEBSD
