Query: kvm_getcptime
OS: freebsd
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
KVM_GETCPTIME(3) BSD Library Functions Manual KVM_GETCPTIME(3)NAMEkvm_getcptime -- fetch global CPU time statisticsLIBRARYKernel Data Access Library (libkvm, -lkvm)SYNOPSIS#include <sys/param.h> #include <sys/resource.h> #include <sys/sysctl.h> #include <kvm.h> int kvm_getcptime(kvm_t *kd, long *cp_time);DESCRIPTIONThe kvm_getcptime() function stores the global CPU time statistics from the kernel kd in the array of counters pointed to by cp_time. Note that cp_time should point to an array of CPUSTATES long integers. The format of the counters is identical to that output by the kern.cp_time sysctl.CACHINGThis function caches the nlist values for various kernel variables which it reuses in successive calls. You may call the function with kd set to NULL to clear this cache.RETURN VALUESThe kvm_getcptime function returns 0 on success and -1 on failure. If an error occurs, then an error message may be retrieved via kvm_geterr(3).SEE ALSOkvm(3)BSDAugust 19, 2008 BSD
Related Man Pages |
---|
kvm_close(3) - netbsd |
kvm_getkernelname(3) - netbsd |
kvm_getfiles(3) - freebsd |
kvm_dpcpu_setcpu(3) - freebsd |
kvm_counter_u64_fetch(3) - freebsd |
Similar Topics in the Unix Linux Community |
---|
Unix File Permissions |
FreeBSD Kernel Internals, Dr. Marshall Kirk McKusick |
Memory Leaks |
UNIX Environment Setup - (Just starting!) |