Skip to content
Permalink
Browse files

merge _psutil_openbsd.c into _psutil_bsd.c

  • Loading branch information...
giampaolo committed Nov 12, 2015
1 parent a7f4fe2 commit b4625abc5d131d751d84b7ab40a9c31a23e3b296
Showing with 232 additions and 2,496 deletions.
  1. +2 −3 psutil/_psbsd.py
  2. +230 −74 psutil/_psutil_bsd.c
  3. +0 −2,419 psutil/_psutil_openbsd.c
@@ -111,9 +111,8 @@ def virtual_memory():

def swap_memory():
"""System swap memory as (total, used, free, sin, sout) namedtuple."""
if OPENBSD:
PAGESIZE = 1
total, used, free, sin, sout = [x * PAGESIZE for x in cext.swap_mem()]
pagesize = 1 if OPENBSD else PAGESIZE
total, used, free, sin, sout = [x * pagesize for x in cext.swap_mem()]
percent = usage_percent(used, total, _round=1)
return _common.sswap(total, used, free, percent, sin, sout)

0 comments on commit b4625ab

Please sign in to comment.
You can’t perform that action at this time.