In the last episode (Mar 29), Russell Francis said: > I was wondering if there is a way to determine the context switching > rate? > > In /usr/include/sys/vmmeter.h the structure > > struct vmmeter { > u_int v_swtch; /* context switches */ > ... > } > > looks like what I want but I can't find a function which returns this > data to a user land application. Is this possible? If so how?
Take a look at /usr/src/usr.sbin/vmstat.c. You'll want to use sysctl() to pull the vm.vmmeter data block, which is of type "struct vmmeter". -- Dan Nelson [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message