Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jul 2007 18:31:20 GMT
From:      "Constantine A. Murenin" <cnst@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 124277 for review
Message-ID:  <200707281831.l6SIVKDW071679@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707281831.l6SIVKDW071679>