From owner-freebsd-stable Fri Jul 14 21:59:56 2000 Delivered-To: freebsd-stable@freebsd.org Received: from gndrsh.dnsmgr.net (GndRsh.dnsmgr.net [198.145.92.4]) by hub.freebsd.org (Postfix) with ESMTP id 7E8FF37C2F0 for ; Fri, 14 Jul 2000 21:59:51 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.9.3/8.9.3) id VAA18595; Fri, 14 Jul 2000 21:59:47 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <200007150459.VAA18595@gndrsh.dnsmgr.net> Subject: Re: Hardware Info In-Reply-To: from Andy at "Jul 14, 2000 11:45:19 pm" To: deimos@lewman.com (Andy) Date: Fri, 14 Jul 2000 21:59:46 -0700 (PDT) Cc: stable@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Fri, 14 Jul 2000, Mike Smith wrote: > > > > I use the dmesg.boot as allocated resources, but without counters > > > how do you know how much they have been used? Sure you can estimate, but > > > is there something such as vmstat -i for all allocated resources? > > > > Can you be more specific about "how much they have been used"? > > vmstat -i generates the following on my system: > > interrupt total rate > clk0 irq0 19762681 99 > rtc0 irq8 25293658 127 > pci irq10 418418 2 > wdc0 irq14 964519 4 > Total 46439276 234 > > Is it possible to include DMA, I/O, and other counts in the > output? Possible, humm..., well, let me see... hummm... you could get I/O port usage statistics on an X86 arch machine by using the I/O access protection bits to cause a trap every time an I/O instruction was executed, count the event in an array and then allow the I/O to complete. Technical possibility of doing this in FreeBSD is near zero, it's overhead would be huge and IIRC you can't use the IOPL stuff in kernel mode, which is where FreeBSD does almost all of it's I/O. (I think the exception here is XFree86 which opens /dev/io such that it has direct I/O access from userland to execute io instructions to the video hardware.) For the DRQ counts I don't know of any way to count actual drq cycles, as those occur in hardware external to the CPU, but you could instrument isa/isa_dma.c to count things like isa_dmastart and isa_dmadone calls, and given that these have the bytes transfered you could come up with the drq cycle counts. > And before someone states the obvious, I'm not an expert on > resource usage in BSD, and my c skills are lacking to the point where > reading the source would take me a long time. For the drq cycles start hacking around in sys/i386/isa/isa_dma.c. -- Rod Grimes - KD7CAX @ CN85sl - (RWG25) rgrimes@gndrsh.dnsmgr.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message