Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Mar 2026 01:55:04 +0000
From:      Vladimir Druzenko <vvd@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Cc:        Jishan Alam <jishanalam9128@gmail.com>
Subject:   git: 726855d4b457 - main - sysutils/whowatch: Update 1.8.6.2 => 1.8.6.3
Message-ID:  <69c9d7f8.20ddc.5cca6a0f@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=726855d4b457db969e86a59d391ccd71f83289f6

commit 726855d4b457db969e86a59d391ccd71f83289f6
Author:     Jishan Alam <jishanalam9128@gmail.com>
AuthorDate: 2026-03-30 01:53:58 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-03-30 01:53:58 +0000

    sysutils/whowatch: Update 1.8.6.2 => 1.8.6.3
    
    Changelog:
    - Improve RAM stats
    - Fix MAXPATHLEN import causing build failure
    https://github.com/Zedai00/whowatch/releases/tag/1.8.6.3
    
    PR:             294097
    Sponsored by:   UNIS Labs
---
 sysutils/whowatch/Makefile                         |   2 +-
 sysutils/whowatch/distinfo                         |   6 +-
 .../whowatch/files/patch-src_sysinfo__freebsd.c    | 121 ---------------------
 3 files changed, 4 insertions(+), 125 deletions(-)

diff --git a/sysutils/whowatch/Makefile b/sysutils/whowatch/Makefile
index c317d3b79b4f..3993123c7742 100644
--- a/sysutils/whowatch/Makefile
+++ b/sysutils/whowatch/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	whowatch
-DISTVERSION=	1.8.6.2
+DISTVERSION=	1.8.6.3
 CATEGORIES=	sysutils
 
 MAINTAINER=	jishanalam9128@gmail.com
diff --git a/sysutils/whowatch/distinfo b/sysutils/whowatch/distinfo
index 234467f6c041..cc2e1d6cc261 100644
--- a/sysutils/whowatch/distinfo
+++ b/sysutils/whowatch/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1771524150
-SHA256 (Zedai00-whowatch-1.8.6.2_GH0.tar.gz) = b496a0ac8ec1b0fd282cfe3431eee34a0a6275b9fc93d95bb9cdb65f8cd70c39
-SIZE (Zedai00-whowatch-1.8.6.2_GH0.tar.gz) = 52538
+TIMESTAMP = 1774717110
+SHA256 (Zedai00-whowatch-1.8.6.3_GH0.tar.gz) = 491aedd57a8bbfd41000ee121ad5db236ff131196df0774ee7b5bbc5c7553703
+SIZE (Zedai00-whowatch-1.8.6.3_GH0.tar.gz) = 52997
diff --git a/sysutils/whowatch/files/patch-src_sysinfo__freebsd.c b/sysutils/whowatch/files/patch-src_sysinfo__freebsd.c
deleted file mode 100644
index 08642fe6262a..000000000000
--- a/sysutils/whowatch/files/patch-src_sysinfo__freebsd.c
+++ /dev/null
@@ -1,121 +0,0 @@
---- src/sysinfo_freebsd.c.orig	2026-02-19 17:57:59 UTC
-+++ src/sysinfo_freebsd.c
-@@ -5,10 +5,12 @@
- #include <libgeom.h>
- #include <libutil.h>
- #include <machine/param.h>
-+#include <paths.h>
- #include <stdint.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <sys/fcntl.h>
- #include <sys/filedesc.h>
- #include <sys/linker.h>
- #include <sys/mount.h>
-@@ -60,6 +62,25 @@ int sys_cpu_info(struct cpu_info_t *cur_cpu_info) {
-   return 0;
- }
- 
-+static uint64_t round1024(uint64_t val) {
-+  return (val + 512) >> 10;
-+}
-+
-+static void sys_mem_info_print(char* name, uint64_t val, int pagesize, int isPages) {
-+  uint64_t GiB, MiB, KiB, Bytes, Pages;
-+  if (isPages) {
-+    Pages = val;
-+    Bytes = Pages * pagesize;
-+  } else {
-+    Bytes = val;
-+    Pages = (pagesize <= 0 ? 0 : Bytes / pagesize);
-+  }
-+  KiB = round1024(Bytes);
-+  MiB = round1024(KiB);
-+  GiB = round1024(MiB);
-+  println("%s|%5llu|%8llu|%11llu|%14llu|%11llu\n", name, GiB, MiB, KiB, Bytes, Pages);
-+}
-+
- // stole it from top
- #define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var))
- static void getsysctl(const char *name, void *ptr, size_t len) {
-@@ -67,42 +88,54 @@ static void getsysctl(const char *name, void *ptr, siz
- 
-   sysctlbyname(name, ptr, &nlen, NULL, 0);
- }
--static int pageshift;
--#define pagetok(size) ((size) << pageshift)
- 
- void sys_mem_info(void) {
- 
--  uint64_t physmem;
--  int pagesize, v_free, v_active, v_inactive, v_cache, swap_total, swap_used;
-+  uint64_t realmem, physmem, v_bufspace, swap_total_sysctl, swap_total = 0, swap_used = 0;
-+  unsigned int pagesize, v_free, v_active, v_inactive, v_laundry, v_wire;
-+  struct kvm_swap swapary[1];
-+  static kvm_t *kd = NULL;
-+  int n;
- 
--  GETSYSCTL("hw.pagesize", pagesize);
--
--  pageshift = 0;
--  int ps = pagesize;
--  while (ps > 1) {
--    pageshift++;
--    ps >>= 1;
-+  if (kd == NULL) {
-+    kd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, "kvm_open");
-   }
--  pageshift -= 10; // LOG1024
-+  if (kd != NULL) {
-+    n = kvm_getswapinfo(kd, swapary, 1, 0);
-+    if (n >= 0 && swapary[0].ksw_total != 0) {
-+      swap_total = swapary[0].ksw_total;
-+      swap_used = swapary[0].ksw_used;
-+    }
-+  }
- 
-+  GETSYSCTL("hw.pagesize", pagesize);
-   GETSYSCTL("vm.stats.vm.v_free_count", v_free);
-   GETSYSCTL("vm.stats.vm.v_active_count", v_active);
-   GETSYSCTL("vm.stats.vm.v_inactive_count", v_inactive);
--  GETSYSCTL("vm.stats.vm.v_cache_count", v_cache);
--  GETSYSCTL("vm.swap_total", swap_total);
--  GETSYSCTL("vm.swap_reserved", swap_used);
-+  GETSYSCTL("vm.stats.vm.v_laundry_count", v_laundry);
-+  GETSYSCTL("vm.stats.vm.v_wire_count", v_wire);
-+  GETSYSCTL("vfs.bufspace", v_bufspace);
-+  GETSYSCTL("vm.swap_total", swap_total_sysctl);
-+  GETSYSCTL("hw.realmem", realmem);
-   GETSYSCTL("hw.physmem", physmem);
- 
--  println("MemTotal: %llu kB\n", physmem / 1024);
--  println("MemFree: %llu kB\n", pagetok(v_free));
--  println("MemAvailable: %llu kB\n",
--          (uint64_t)(v_free + v_inactive + v_cache) * pagesize / 1024);
--  println("Active: %llu kB\n", (uint64_t)v_active * pagesize / 1024);
--  println("Inactive: %llu kB\n", (uint64_t)v_inactive * pagesize / 1024);
--  println("Cached: %llu kB\n", (uint64_t)v_cache * pagesize / 1024);
--  println("SwapTotal: %llu kB\n", (uint64_t)swap_total / 1024);
--  println("SwapUsed: %llu kB\n", (uint64_t)swap_used / 1024);
--  println("SwapFree: %llu kB\n", (uint64_t)(swap_total - swap_used) / 1024);
-+  pagesize = (pagesize <= 0 ? 1 : pagesize);
-+
-+  println("PageSize: %u Bytes\n", pagesize);
-+  println(           "Name          | GiB |   MiB  |    KiB    |     Bytes    |   Pages\n");
-+  sys_mem_info_print("RealMemTotal  ", realmem,                pagesize, 0);
-+  sys_mem_info_print("PhysMemTotal  ", physmem,                pagesize, 0);
-+  sys_mem_info_print("MemFree       ", v_free,                 pagesize, 1);
-+  sys_mem_info_print("MemAvailable  ", v_free + v_inactive + v_laundry + v_bufspace / pagesize, pagesize, 1);
-+  sys_mem_info_print("Active        ", v_active,               pagesize, 1);
-+  sys_mem_info_print("Inactive      ", v_inactive,             pagesize, 1);
-+  sys_mem_info_print("Laundry       ", v_laundry,              pagesize, 1);
-+  sys_mem_info_print("Wired         ", v_wire,                 pagesize, 1);
-+  sys_mem_info_print("Buffers       ", v_bufspace,             pagesize, 0);
-+  sys_mem_info_print("SwapTotal Real", swap_total_sysctl,      pagesize, 0);
-+  sys_mem_info_print("SwapTotal Phys", swap_total,             pagesize, 1);
-+  sys_mem_info_print("SwapUsed      ", swap_used,              pagesize, 1);
-+  sys_mem_info_print("SwapFree      ", swap_total - swap_used, pagesize, 1);
- }
- 
- long long sys_open_files() {


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69c9d7f8.20ddc.5cca6a0f>