mirror of
https://git.freebsd.org/ports.git
synced 2025-06-18 19:20:36 -04:00
interface and disk statistics every 5 seconds. It sends this data on to symux for further processing. symon has been designed to inflict minimal performance and security impact -- it can be run as nobody on the system it monitors. symux is a non-priviledged daemon that listens to incoming symon traffic. symux can write the incoming symon streams into rrd files. Clients interested in monitoring machine state can also log into symux and receive data as ascii as it arrives. symon2web is a php script that can show the data stored in the rrd files. PR: ports/78416 Submitted by: Ulrich Spoerlein <q@uni.de>
18 lines
682 B
C
18 lines
682 B
C
--- platform/FreeBSD/sm_proc.c.orig Thu Mar 10 09:29:00 2005
|
|
+++ platform/FreeBSD/sm_proc.c Thu Mar 10 09:27:52 2005
|
|
@@ -181,9 +181,15 @@
|
|
if (proc_kd) {
|
|
if (kvm_read(proc_kd, (unsigned long)pp->ki_paddr, &pproc,
|
|
sizeof(pproc)) == sizeof(pproc)) {
|
|
+#ifdef HAS_RUSAGE_EXT
|
|
+ cpu_uticks += pproc.p_rux.p_uticks; /* user */
|
|
+ cpu_sticks += pproc.p_rux.p_sticks; /* sys */
|
|
+ cpu_iticks += pproc.p_rux.p_iticks; /* int */
|
|
+#else
|
|
cpu_uticks += pproc.p_uticks; /* user */
|
|
cpu_sticks += pproc.p_sticks; /* sys */
|
|
cpu_iticks += pproc.p_iticks; /* int */
|
|
+#endif
|
|
} else {
|
|
warning("while reading kvm: %s", kvm_geterr(proc_kd));
|
|
}
|