pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/py-psutil py-psutil: NetBSD: read info about ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/549390502ad4
branches:  trunk
changeset: 375876:549390502ad4
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Mon Mar 28 21:50:42 2022 +0000

description:
py-psutil: NetBSD: read info about cached data from /proc/meminfo as well

Bump PKGREVISION.

diffstat:

 sysutils/py-psutil/Makefile                        |   3 ++-
 sysutils/py-psutil/distinfo                        |   4 ++--
 sysutils/py-psutil/patches/patch-psutil___psbsd.py |  15 ++++++++++++---
 3 files changed, 16 insertions(+), 6 deletions(-)

diffs (55 lines):

diff -r 16991020b26c -r 549390502ad4 sysutils/py-psutil/Makefile
--- a/sysutils/py-psutil/Makefile       Mon Mar 28 21:45:06 2022 +0000
+++ b/sysutils/py-psutil/Makefile       Mon Mar 28 21:50:42 2022 +0000
@@ -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 -r 16991020b26c -r 549390502ad4 sysutils/py-psutil/distinfo
--- a/sysutils/py-psutil/distinfo       Mon Mar 28 21:45:06 2022 +0000
+++ b/sysutils/py-psutil/distinfo       Mon Mar 28 21:50:42 2022 +0000
@@ -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 -r 16991020b26c -r 549390502ad4 sysutils/py-psutil/patches/patch-psutil___psbsd.py
--- a/sysutils/py-psutil/patches/patch-psutil___psbsd.py        Mon Mar 28 21:45:06 2022 +0000
+++ b/sysutils/py-psutil/patches/patch-psutil___psbsd.py        Mon Mar 28 21:50:42 2022 +0000
@@ -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 @@
          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)



Home | Main Index | Thread Index | Old Index