disk logging and sar

Conor P. Cahill cpcahil at virtech.uucp
Tue Jan 9 10:31:47 AEST 1990


In article <1990Jan8.145201.4251 at virtech.uucp>, jje at virtech.uucp (Jeremy J. Epstein) writes:
> In article <9 at cimcor.MN.ORG>, mike at cimcor.MN.ORG (Michael Grenier) writes:
> > I'd like to enable the 'sar -d' command for some block disk
> > drivers I'm writing. How do I do this?
> > Right now, sar -d doesn't give me anything.
> 
> Before you can use sar to show data, you must have collected the
> data using sadc(1M).  The sadc(1M) man page gives some suggested
> cron entries to generate the data at 20 minute intervals (too long
> when debugging, but OK for normal monitoring).  Make sure that you
> put the commands in the crontab file for 'sys', and set the permissions
> for /usr/adm/sa appropriately.  Also, you probably want to initialize
> sadc at boot time so you get a zero-point.

Not being one to be nit-picky, but sar can be used without first having
run sadc.  If you run sar in interactive mode it will automatically run
the sadc as a child process and capture the output.  The following
command will run sar for a period of 5 seconds making a sample every second:

	sar -d 1 5

For example:

	virtech virtech 3.2 2 i386    01/08/90

	18:28:03  device   %busy   avque   r+w/s  blks/s  avwait  avserv

	18:28:04
	18:28:05
	18:28:06
	18:28:07
	18:28:08
	Average 

Note that for the disk statistics no data is output.  I think the problem
is caused by the drivers not updating the appropriate kernel structures.

-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+



More information about the Comp.unix.i386 mailing list