Skip to content

Commit

Permalink
Revert "Add ZFS freebsd per dataset stats (#2753)" (#2925)
Browse files Browse the repository at this point in the history
This reverts commit f34aaa6.

Signed-off-by: Caleb Webber <[email protected]>
  • Loading branch information
seeplusplus authored Feb 14, 2024
1 parent d54744a commit 6d18ce7
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 102 deletions.
6 changes: 0 additions & 6 deletions collector/exec_bsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,37 +49,31 @@ func NewExecCollector(logger log.Logger) (Collector, error) {
name: "exec_context_switches_total",
description: "Context switches since system boot. Resets at architecture unsigned integer.",
mib: "vm.stats.sys.v_swtch",
labels: nil,
},
{
name: "exec_traps_total",
description: "Traps since system boot. Resets at architecture unsigned integer.",
mib: "vm.stats.sys.v_trap",
labels: nil,
},
{
name: "exec_system_calls_total",
description: "System calls since system boot. Resets at architecture unsigned integer.",
mib: "vm.stats.sys.v_syscall",
labels: nil,
},
{
name: "exec_device_interrupts_total",
description: "Device interrupts since system boot. Resets at architecture unsigned integer.",
mib: "vm.stats.sys.v_intr",
labels: nil,
},
{
name: "exec_software_interrupts_total",
description: "Software interrupts since system boot. Resets at architecture unsigned integer.",
mib: "vm.stats.sys.v_soft",
labels: nil,
},
{
name: "exec_forks_total",
description: "Number of fork() calls since system boot. Resets at architecture unsigned integer.",
mib: "vm.stats.vm.v_forks",
labels: nil,
},
},
logger: logger,
Expand Down
12 changes: 0 additions & 12 deletions collector/memory_bsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,71 +69,61 @@ func NewMemoryCollector(logger log.Logger) (Collector, error) {
description: "Recently used by userland",
mib: "vm.stats.vm.v_active_count",
conversion: fromPage,
labels: nil,
},
{
name: "inactive_bytes",
description: "Not recently used by userland",
mib: "vm.stats.vm.v_inactive_count",
conversion: fromPage,
labels: nil,
},
{
name: "wired_bytes",
description: "Locked in memory by kernel, mlock, etc",
mib: "vm.stats.vm.v_wire_count",
conversion: fromPage,
labels: nil,
},
{
name: "user_wired_bytes",
description: "Locked in memory by user, mlock, etc",
mib: "vm.stats.vm.v_user_wire_count",
conversion: fromPage,
dataType: bsdSysctlTypeCLong,
labels: nil,
},
{
name: "cache_bytes",
description: "Almost free, backed by swap or files, available for re-allocation",
mib: "vm.stats.vm.v_cache_count",
conversion: fromPage,
labels: nil,
},
{
name: "buffer_bytes",
description: "Disk IO Cache entries for non ZFS filesystems, only usable by kernel",
mib: "vfs.bufspace",
dataType: bsdSysctlTypeCLong,
labels: nil,
},
{
name: "free_bytes",
description: "Unallocated, available for allocation",
mib: "vm.stats.vm.v_free_count",
conversion: fromPage,
labels: nil,
},
{
name: "laundry_bytes",
description: "Dirty not recently used by userland",
mib: "vm.stats.vm.v_laundry_count",
conversion: fromPage,
labels: nil,
},
{
name: "size_bytes",
description: "Total physical memory size",
mib: "vm.stats.vm.v_page_count",
conversion: fromPage,
labels: nil,
},
{
name: "swap_size_bytes",
description: "Total swap memory size",
mib: mibSwapTotal,
dataType: bsdSysctlTypeUint64,
labels: nil,
},
// Descriptions via: top(1)
{
Expand All @@ -142,15 +132,13 @@ func NewMemoryCollector(logger log.Logger) (Collector, error) {
mib: "vm.stats.vm.v_swappgsin",
valueType: prometheus.CounterValue,
conversion: fromPage,
labels: nil,
},
{
name: "swap_out_bytes_total",
description: "Bytes paged out to swap devices",
mib: "vm.stats.vm.v_swappgsout",
valueType: prometheus.CounterValue,
conversion: fromPage,
labels: nil,
},
},
}, nil
Expand Down
6 changes: 0 additions & 6 deletions collector/netisr_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,47 +45,41 @@ func NewNetisrCollector(logger log.Logger) (Collector, error) {
mib: "net.isr.numthreads",
dataType: bsdSysctlTypeUint32,
valueType: prometheus.GaugeValue,
labels: nil,
},
{
name: "maxprot",
description: "netisr maximum protocols",
mib: "net.isr.maxprot",
dataType: bsdSysctlTypeUint32,
valueType: prometheus.GaugeValue,
labels: nil,
},
{
name: "defaultqlimit",
description: "netisr default queue limit",
mib: "net.isr.defaultqlimit",
dataType: bsdSysctlTypeUint32,
valueType: prometheus.GaugeValue,
labels: nil,
},
{
name: "maxqlimit",
description: "netisr maximum queue limit",
mib: "net.isr.maxqlimit",
dataType: bsdSysctlTypeUint32,
valueType: prometheus.GaugeValue,
labels: nil,
},
{
name: "bindthreads",
description: "netisr threads bound to CPUs",
mib: "net.isr.bindthreads",
dataType: bsdSysctlTypeUint32,
valueType: prometheus.GaugeValue,
labels: nil,
},
{
name: "maxthreads",
description: "netisr maximum thread count",
mib: "net.isr.maxthreads",
dataType: bsdSysctlTypeUint32,
valueType: prometheus.GaugeValue,
labels: nil,
},
},
logger: logger,
Expand Down
3 changes: 0 additions & 3 deletions collector/sysctl_bsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ type bsdSysctl struct {

// Post-retrieval conversion hooks
conversion func(float64) float64

// Prometheus labels
labels prometheus.Labels
}

func (b bsdSysctl) Value() (float64, error) {
Expand Down
Loading

0 comments on commit 6d18ce7

Please sign in to comment.