home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / bsd / 2642 < prev    next >
Encoding:
Text File  |  1992-07-22  |  2.1 KB  |  42 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!mcsun!sunic!ugle.unit.no!spurv.runit.sintef.no!he
  3. From: Havard.Eidnes@runit.sintef.no (Havard Eidnes)
  4. Subject: iostat -- missing kernel pieces
  5. Message-ID: <1992Jul22.221949.6680@ugle.unit.no>
  6. Originator: he@spurv.runit.sintef.no
  7. Sender: news@ugle.unit.no (NetNews Administrator)
  8. Organization: Computing Center at the University of Trondheim, Norway
  9. Date: Wed, 22 Jul 92 22:19:49 GMT
  10. Lines: 30
  11.  
  12. Hi,
  13.  
  14. this evening's project of 386bsd 0.1 hacking was planned to be a port of
  15. iostat from NET2. I've modified the names.c file in usr.bin/vmstat to read
  16. in the device structs from _isa_devtab_bio, and on "my" system it finds fd0
  17. and as0 just fine.  I noted one odd thing, and that was that the isa_device
  18. struct lacks a id_dk field, which on the other systems names.c support
  19. apparently is to be used as a global index of some sort. I worked around
  20. this by using a local index, and counting it up as I went through the bdev
  21. (?) device table.  The rest of iostat compiled more or less effortlessly.
  22.  
  23. However: iostat does not show any values other than 0 for the "sps", "tps"
  24. or "msps" fields for all drives. These values are supposed to be fetched
  25. from various arrays in the kernel: dk_xfer, dk_wds, dk_seek etc.  After
  26. grepping through the kernel sources, it appears that the only place these
  27. variables are ever mentioned is in the sys/dkstat.h include file -- noone ever
  28. bothers to update these arrays.  I did in particular investigate the device
  29. drivers for wd, as and fd, and came up emptyhanded.
  30.  
  31. Without a global "disk index" in the block (?) device table and without device 
  32. drivers updating these statistics, it appears that it is going to be difficult 
  33. to create an iostat which shows any useful info.
  34.  
  35. Unfortunately, hacking in the global disk index and modifying the device
  36. drivers are currently above my skill level, and I don't have the available
  37. time (sorry -- vacation soon too...), so I'm going to shelve this project
  38. for now.  If someone decides to put in the disk index and the device drivers
  39. are modified accordingly, I'll happily pick it up again. ;-)
  40.  
  41. - Havard
  42.