Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jul 2000 21:59:46 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net>
To:        deimos@lewman.com (Andy)
Cc:        stable@FreeBSD.ORG
Subject:   Re: Hardware Info
Message-ID:  <200007150459.VAA18595@gndrsh.dnsmgr.net>
In-Reply-To: <Pine.BSF.4.21.0007142342290.6950-100000@lowrider.lewman.org> from Andy at "Jul 14, 2000 11:45:19 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007150459.VAA18595>