From owner-p4-projects@FreeBSD.ORG Sat Jul 28 18:31:22 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5342B16A41B; Sat, 28 Jul 2007 18:31:22 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 236D216A417 for ; Sat, 28 Jul 2007 18:31:22 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0B1D713C481 for ; Sat, 28 Jul 2007 18:31:22 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l6SIVLs2071683 for ; Sat, 28 Jul 2007 18:31:21 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l6SIVKDW071679 for perforce@freebsd.org; Sat, 28 Jul 2007 18:31:20 GMT (envelope-from cnst@FreeBSD.org) Date: Sat, 28 Jul 2007 18:31:20 GMT Message-Id: <200707281831.l6SIVKDW071679@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 124277 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jul 2007 18:31:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=124277 Change 124277 by cnst@dale on 2007/07/28 18:30:44 add 'sensors' display to systat(1) Obtained from: OpenBSD + applied local modifications & FreeBSDisms Affected files ... .. //depot/projects/soc2007/cnst-sensors/usr.bin.systat/Makefile#2 edit .. //depot/projects/soc2007/cnst-sensors/usr.bin.systat/cmdtab.c#2 edit .. //depot/projects/soc2007/cnst-sensors/usr.bin.systat/extern.h#2 edit .. //depot/projects/soc2007/cnst-sensors/usr.bin.systat/sensors.c#1 add .. //depot/projects/soc2007/cnst-sensors/usr.bin.systat/systat.1#2 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/usr.bin.systat/Makefile#2 (text+ko) ==== @@ -5,7 +5,7 @@ PROG= systat SRCS= cmds.c cmdtab.c devs.c fetch.c iostat.c keyboard.c main.c \ - mbufs.c netcmds.c netstat.c pigs.c swap.c icmp.c \ + mbufs.c netcmds.c netstat.c pigs.c sensors.c swap.c icmp.c \ mode.c ip.c tcp.c \ vmstat.c convtbl.c ifcmds.c ifstat.c ==== //depot/projects/soc2007/cnst-sensors/usr.bin.systat/cmdtab.c#2 (text+ko) ==== @@ -82,6 +82,9 @@ { "ifstat", showifstat, fetchifstat, labelifstat, initifstat, openifstat, closeifstat, cmdifstat, 0, CF_LOADAV }, + { "sensors", showsensors, fetchsensors, labelsensors, + initsensors, opensensors, closesensors, 0, + 0, CF_LOADAV }, { NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0 } }; struct cmdtab *curcmd = &cmdtab[0]; ==== //depot/projects/soc2007/cnst-sensors/usr.bin.systat/extern.h#2 (text+ko) ==== @@ -82,6 +82,7 @@ void closembufs(WINDOW *); void closenetstat(WINDOW *); void closepigs(WINDOW *); +void closesensors(WINDOW *); void closeswap(WINDOW *); void closetcp(WINDOW *); int cmdifstat(const char *, const char *); @@ -105,6 +106,7 @@ void fetchmbufs(void); void fetchnetstat(void); void fetchpigs(void); +void fetchsensors(void); void fetchswap(void); void fetchtcp(void); void getsysctl(const char *, void *, size_t); @@ -119,6 +121,7 @@ int initmbufs(void); int initnetstat(void); int initpigs(void); +int initsensors(void); int initswap(void); int inittcp(void); int keyboard(void); @@ -134,6 +137,7 @@ void labelnetstat(void); void labelpigs(void); void labels(void); +void labelsensors(void); void labelswap(void); void labeltcp(void); void load(void); @@ -149,6 +153,7 @@ WINDOW *openmbufs(void); WINDOW *opennetstat(void); WINDOW *openpigs(void); +WINDOW *opensensors(void); WINDOW *openswap(void); WINDOW *opentcp(void); int prefix(const char *, const char *); @@ -167,6 +172,7 @@ void showmbufs(void); void shownetstat(void); void showpigs(void); +void showsensors(void); void showswap(void); void showtcp(void); void status(void); ==== //depot/projects/soc2007/cnst-sensors/usr.bin.systat/systat.1#2 (text+ko) ==== @@ -101,6 +101,7 @@ .Ic mbufs , .Ic netstat , .Ic pigs , +.Ic sensors , .Ic swap , .Ic tcp , or @@ -286,6 +287,11 @@ .It Ic mbufs Display, in the lower window, the number of mbufs allocated for particular uses, i.e., data, socket structures, etc. +.It Ic sensors +Display, in the lower window, +the current values of available hardware sensors, +in a format similar to that of +.Xr sysctl 8 . .It Ic vmstat Take over the entire display and show a (rather crowded) compendium of statistics related to virtual memory usage, process scheduling, @@ -607,6 +613,7 @@ .Xr udp 4 , .Xr gstat 8 , .Xr iostat 8 , +.Xr sysctl 8 , .Xr vmstat 8 .Sh HISTORY The