...

Source file src/github.com/shirou/gopsutil/load/load_openbsd.go

Documentation: github.com/shirou/gopsutil/load

     1  // +build openbsd
     2  
     3  package load
     4  
     5  import (
     6  	"unsafe"
     7  
     8  	"golang.org/x/sys/unix"
     9  )
    10  
    11  func getForkStat() (forkstat, error) {
    12  	b, err := unix.SysctlRaw("kern.forkstat")
    13  	if err != nil {
    14  		return forkstat{}, err
    15  	}
    16  	return *(*forkstat)(unsafe.Pointer((&b[0]))), nil
    17  }
    18  

View as plain text