Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.i386 Subject: Re: disk logging and sar Keywords: logging Message-ID: <1990Jan8.233147.5722@virtech.uucp> Date: 8 Jan 90 23:31:47 GMT References: <9@cimcor.MN.ORG> <1990Jan8.145201.4251@virtech.uucp> Organization: Virtual Technologies Inc. Lines: 42 In article <1990Jan8.145201.4251@virtech.uucp>, jje@virtech.uucp (Jeremy J. Epstein) writes: > In article <9@cimcor.MN.ORG>, mike@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 | +-----------------------------------------------------------------------+