Starting with OpenBSD 6.1, access to kvm device is restricted by default,
and processes plugin doesnt need specific privileges on it.
Fixes 'permission denied' error messages with the kern.allowkmem sysctl
defaulting to 0.
ps_list_reset();
/* Open the kvm interface, get a descriptor */
- kd = kvm_open(NULL, NULL, NULL, 0, errbuf);
+ kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf);
if (kd == NULL) {
ERROR("processes plugin: Cannot open kvm interface: %s", errbuf);
return (0);