From e09858229410af502ff0b0b3ce000d0495641353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Tue, 18 Jun 2024 01:48:52 +0900 Subject: =?UTF-8?q?FreeBSD:=20=E3=83=A1=E3=83=A2=E3=83=AA=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/memory.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/memory.c b/src/memory.c index 833fa97..371e05c 100644 --- a/src/memory.c +++ b/src/memory.c @@ -31,6 +31,8 @@ void display_memory() { memused = run_mem_command("vmstat | awk 'END {printf $3}' | sed 's/M//'"); memtotal = run_mem_command("sysctl -n hw.physmem") / 1024LL / 1024LL; #elif defined(__FreeBSD__) || defined(__DragonFly__) + memused = run_mem_command("top | grep \"Mem:\" | awk '{print $2}' | " + "sed 's/M//'"); memtotal = run_mem_command("sysctl -n hw.physmem") / 1024LL / 1024LL; #elif defined(__NetBSD__) memused = run_mem_command("top | grep \"Memory:\" | awk '{print $2}' | " -- cgit v1.2.3