-
jelmdIs there a way to obtain queue values `kstat unix::sysinfo` without using kstat_* functions (in C)? I.e. getting the instant value instead of the "average"?
-
jbki believe those represent the actual struct in the kernel that's updated by the kernel
-
jbk(I.e. i don't think it's processed before read by kstat)
-
jelmdkernel updates it every second via clock tick. thought on something like getloadavg().
-
richlowejelmd: you're wanting to read sysinfo.runque directly? You could do it via kvm if you were so inclined I guess, but I wouldn't.
-
richlowealso, `runque` is very fun to say, I don't care if it's meant to be two words
-
jelmdrichlowe: yes, directly.
-
richlowethe only way I know of is libkvm which is really not great
-
richloweI'm not immediately sure what avoiding the kstat is gaining you though.
-
jelmdActually making the stats available via http (prometheus export format). If several clients query it (even if de-multiplexed) the average they get is not really the "same" if one tries to keep it simple, i.e. not tracking clients and just using the prev snapshot to calc the average.
-
jelmdYes, libkvm looks a little bit too complicated for now.