Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!vrdxhq!vsedev!ron From: ron@vsedev.VSE.COM (Ron Flax) Newsgroups: comp.unix.wizards Subject: System V.2 sar, sadc, sysinfo Message-ID: <272@vsedev.VSE.COM> Date: Tue, 18-Nov-86 22:35:58 EST Article-I.D.: vsedev.272 Posted: Tue Nov 18 22:35:58 1986 Date-Received: Wed, 19-Nov-86 02:45:58 EST Reply-To: ron@vsedev.VSE.COM (Ron Flax) Distribution: world Organization: VSE Software Development Lab Lines: 34 Keywords: sar, sadc, sysinfo, devio, hd, hdsk, wnstat I am in the process of writing a screen oriented realtime version of the System V sar(1), System Activity Reporting, utility. I have been successful in getting most of the necessary info out of the sysinfo struct by reading kmem. But I am stumped on where to find the disk i/o stuff. The program that does the work for sar(1) is /usr/lib/sa/sadc, doing a strings on it reveals that several other kernel variables are read, wnstat and wn_cnt under Microport, fp_stat and hdcnt on an Altos 3068, hdstat and hd_cnt on a 3b2. A look at the sar(1m) man page, near the end says that the disk info is stored in: struct sa { . . . long devio[NDEVS][4]; #define IO_OPS 0 #define IO_BCNT 1 #define IO_ACT 2 #define IO_RESP 3 . . . }; and so on... Anyhow the $1,000,000,000.00 question is where (and how??) are they getting the info to fill 'devio'? Anyone with V.2 source have time to look at this code fragment in sadc.c and give me some insight? Please? Thanks! -- ron@vsedev.VSE.COM (Ron Flax) UUCP: ..!seismo!vsedev!ron INET: vsedev.VSE.COM!ron@seismo.CSS.GOV