fixed a crash on OpenBSD 6.2 when opening kvm #11

version bump
This commit is contained in:
Bjango
2018-03-29 07:59:31 +11:00
parent a161a8be42
commit a8b752c9cf
4 changed files with 12 additions and 4 deletions

4
README
View File

@@ -18,6 +18,10 @@ Requirements
- sqlite3 + development libraries.
- libxml2 + development libraries.
Optional Libraries
- libavahi + development libraries.
- lm_sensors/libsensors4 + development libraries.
We have a package guide available to help you install all the required packages for your OS - https://github.com/bjango/istatserverlinux/wiki/Package-Guide

View File

@@ -1,6 +1,6 @@
# iStat Server
iStat Server is a system monitoring daemon that is used in conjunction with [iStat View for iOS](https://bjango.com/ios/istat/) and [iStat View for Mac](https://bjango.com/mac/istat/) to remotely monitor computers.
iStat Server is a system monitoring daemon that is used in conjunction with [iStat View for iOS](https://bjango.com/ios/istat/) and [iStat View for macOS](https://bjango.com/mac/istat/) to remotely monitor computers.
-----

View File

@@ -103,7 +103,11 @@ void Stats::prepare()
#ifdef HAVE_LIBKVM
kvm_t *kd;
if ((kd = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL)) != NULL)
#if defined(__NetBSD__) || defined(__OpenBSD__)
if ((kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, "kvm_open")) != NULL)
#else
if ((kd = kvm_open(NULL, NULL, NULL, O_RDONLY, "kvm_open")) != NULL)
#endif
{
cpuStats.kd = kd;
loadStats.kd = kd;

View File

@@ -35,8 +35,8 @@
#include <time.h>
#include <stdio.h>
#define SERVER_VERSION 3.02
#define SERVER_BUILD 104
#define SERVER_VERSION 3.03
#define SERVER_BUILD 105
#define PROTOCOL_VERSION 3
#define HISTORY_SIZE 600