diff options
author | wiz <wiz@pkgsrc.org> | 2022-03-28 21:50:42 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2022-03-28 21:50:42 +0000 |
commit | 8cfbf5f77b27654752aafb3fa012caa0b21efefc (patch) | |
tree | fbc3825a1214f0dcbfdff47acc0fbf3aafe1e22a /sysutils | |
parent | 99c2983ca37df22369711f9bbb4f3f1dde8ae216 (diff) | |
download | pkgsrc-8cfbf5f77b27654752aafb3fa012caa0b21efefc.tar.gz |
py-psutil: NetBSD: read info about cached data from /proc/meminfo as well
Bump PKGREVISION.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/py-psutil/Makefile | 3 | ||||
-rw-r--r-- | sysutils/py-psutil/distinfo | 4 | ||||
-rw-r--r-- | sysutils/py-psutil/patches/patch-psutil___psbsd.py | 15 |
3 files changed, 16 insertions, 6 deletions
diff --git a/sysutils/py-psutil/Makefile b/sysutils/py-psutil/Makefile index d9bb5abbf01..50a89241ebb 100644 --- a/sysutils/py-psutil/Makefile +++ b/sysutils/py-psutil/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.41 2022/01/10 17:05:27 adam Exp $ +# $NetBSD: Makefile,v 1.42 2022/03/28 21:50:42 wiz Exp $ DISTNAME= psutil-5.9.0 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} +PKGREVISION= 1 CATEGORIES= sysutils python MASTER_SITES= ${MASTER_SITE_PYPI:=p/psutil/} diff --git a/sysutils/py-psutil/distinfo b/sysutils/py-psutil/distinfo index f60892813b9..79ef3ae3b44 100644 --- a/sysutils/py-psutil/distinfo +++ b/sysutils/py-psutil/distinfo @@ -1,6 +1,6 @@ -$NetBSD: distinfo,v 1.42 2022/01/10 17:05:27 adam Exp $ +$NetBSD: distinfo,v 1.43 2022/03/28 21:50:42 wiz Exp $ BLAKE2s (psutil-5.9.0.tar.gz) = 501fc17925b848927fb19d596c1b70b89073846d8edbe4c8d820f2f2d8a8cdc5 SHA512 (psutil-5.9.0.tar.gz) = b521cfce51e90fdf87ba19bf8069877e3210aede92c17460ea0b00324a36e133168e4bff550462d07ab6d93c597c6560d68954340031ff43168d54a8e5d4c4e7 Size (psutil-5.9.0.tar.gz) = 478322 bytes -SHA1 (patch-psutil___psbsd.py) = da61606aee2366181935c10873d0627d0cb80f3f +SHA1 (patch-psutil___psbsd.py) = 89b126422c58c119a09052cc886ef97d22d87d27 diff --git a/sysutils/py-psutil/patches/patch-psutil___psbsd.py b/sysutils/py-psutil/patches/patch-psutil___psbsd.py index bd445f0456e..7d707384403 100644 --- a/sysutils/py-psutil/patches/patch-psutil___psbsd.py +++ b/sysutils/py-psutil/patches/patch-psutil___psbsd.py @@ -1,10 +1,10 @@ -$NetBSD: patch-psutil___psbsd.py,v 1.5 2019/11/06 15:48:23 adam Exp $ +$NetBSD: patch-psutil___psbsd.py,v 1.6 2022/03/28 21:50:43 wiz Exp $ Stop using SDEAD as it is no longer available. ---- psutil/_psbsd.py.orig 2019-06-28 13:13:13.000000000 +0000 +--- psutil/_psbsd.py.orig 2021-12-15 09:34:00.000000000 +0000 +++ psutil/_psbsd.py -@@ -58,7 +58,7 @@ elif OPENBSD or NETBSD: +@@ -61,7 +61,7 @@ elif OPENBSD: # equivalent. Also it appears there's no equivalent of # psutil.STATUS_DEAD. SDEAD really means STATUS_ZOMBIE. # cext.SZOMB: _common.STATUS_ZOMBIE, @@ -13,3 +13,12 @@ Stop using SDEAD as it is no longer available. cext.SZOMB: _common.STATUS_ZOMBIE, # From http://www.eecs.harvard.edu/~margo/cs161/videos/proc.h.txt # OpenBSD has SRUN and SONPROC: SRUN indicates that a process +@@ -189,6 +189,8 @@ def virtual_memory(): + buffers = int(line.split()[1]) * 1024 + elif line.startswith(b'MemShared:'): + shared = int(line.split()[1]) * 1024 ++ elif line.startswith(b'Cached:'): ++ cached = int(line.split()[1]) * 1024 + avail = inactive + cached + free + used = active + wired + cached + percent = usage_percent((total - avail), total, round_=1) |