diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2016-01-14 01:12:40 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2016-01-14 01:12:40 +0100 |
commit | d025233ef32914afa8be3fba7f21361e20d872cf (patch) | |
tree | 1014864b6a7624151ae828ad7c0a50082483fbef | |
parent | 6ebf9d4919eb8725576df3c392b12adfab67afe1 (diff) | |
download | psutil-d025233ef32914afa8be3fba7f21361e20d872cf.tar.gz |
remove busy_secs fro, netbsb: can't find any way to get them right
-rw-r--r-- | psutil/_psbsd.py | 3 | ||||
-rw-r--r-- | psutil/arch/bsd/openbsd.c | 9 |
2 files changed, 6 insertions, 6 deletions
diff --git a/psutil/_psbsd.py b/psutil/_psbsd.py index b9388b76..beb966a0 100644 --- a/psutil/_psbsd.py +++ b/psutil/_psbsd.py @@ -110,8 +110,7 @@ if FREEBSD: 'busy_time']) else: sdiskio = namedtuple('sdiskio', ['read_count', 'write_count', - 'read_bytes', 'write_bytes', - ]) + 'read_bytes', 'write_bytes']) # set later from __init__.py NoSuchProcess = None diff --git a/psutil/arch/bsd/openbsd.c b/psutil/arch/bsd/openbsd.c index 14e4baa5..ae1ddfb7 100644 --- a/psutil/arch/bsd/openbsd.c +++ b/psutil/arch/bsd/openbsd.c @@ -40,7 +40,8 @@ #include "../../_psutil_common.h" #define PSUTIL_KPT2DOUBLE(t) (t ## _sec + t ## _usec / 1000000.0) -#define PSUTIL_TV2DOUBLE(t) ((t).tv_sec + (t).tv_usec / 1000000.0) +// #define PSUTIL_TV2DOUBLE(t) ((t).tv_sec + (t).tv_usec / 1000000.0) + // a signaler for connections without an actual status int PSUTIL_CONN_NONE = 128; @@ -772,12 +773,12 @@ psutil_disk_io_counters(PyObject *self, PyObject *args) { for (i = 0; i < dk_ndrive; i++) { py_disk_info = Py_BuildValue( - "(KKKKL)", + "(KKKK)", stats[i].ds_rxfer, // num reads stats[i].ds_wxfer, // num writes stats[i].ds_rbytes, // read bytes - stats[i].ds_wbytes, // written bytes - (long long) PSUTIL_TV2DOUBLE(stats[i].ds_time)); // busy time + stats[i].ds_wbytes // write bytes + ); if (!py_disk_info) goto error; if (PyDict_SetItemString(py_retdict, stats[i].ds_name, py_disk_info)) |