Module Name: src
Committed By: sevan
Date: Tue Dec 11 02:29:11 UTC 2018
Modified Files:
src/lib/libkvm: kvm_getloadavg.3
Log Message:
Clarify the difference to getloadavg(3).
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libkvm/kvm_getloadavg.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libkvm/kvm_getloadavg.3
diff -u src/lib/libkvm/kvm_getloadavg.3:1.11 src/lib/libkvm/kvm_getloadavg.3:1.12
--- src/lib/libkvm/kvm_getloadavg.3:1.11 Tue Mar 10 23:49:07 2009
+++ src/lib/libkvm/kvm_getloadavg.3 Tue Dec 11 02:29:11 2018
@@ -1,4 +1,4 @@
-.\" $NetBSD: kvm_getloadavg.3,v 1.11 2009/03/10 23:49:07 joerg Exp $
+.\" $NetBSD: kvm_getloadavg.3,v 1.12 2018/12/11 02:29:11 sevan Exp $
.\"
.\" Copyright (c) 1992, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,12 +29,12 @@
.\"
.\" @(#)kvm_getloadavg.3 8.1 (Berkeley) 6/4/93
.\"
-.Dd August 18, 2002
+.Dd December 11, 2018
.Dt KVM_GETLOADAVG 3
.Os
.Sh NAME
.Nm kvm_getloadavg
-.Nd get system load averages
+.Nd get system load averages, from live or dead kernels
.Sh LIBRARY
.Lb libkvm
.Sh SYNOPSIS
@@ -46,15 +46,20 @@
The
.Fn kvm_getloadavg
function returns the number of processes in the system run queue
-of the kernel indicated by
-.Fa kd ,
-averaged over various periods of time.
+of the kernel or core file, indicated by
+.Fa kd .
Up to
.Fa nelem
samples are retrieved and assigned to successive elements of
.Fa loadavg Ns Bq .
The system imposes a maximum of 3 samples, representing averages
over the last 1, 5, and 15 minutes, respectively.
+On a live system, the load average is obtained by calling
+.Xr getloadavg 3 .
+If performing post mortem on a kernel core file,
+.Nm
+obtains the system load average at the time of death from the core file
+directly.
.Sh RETURN VALUES
If the load average was unobtainable, \-1 is returned; otherwise,
the number of samples actually retrieved is returned.