* CPU load and Disk I/O and load
@ 2000-04-17 4:00 Raj Calisa
2000-04-17 4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Raj Calisa @ 2000-04-17 4:00 UTC (permalink / raw)
Hi all,
I work on Digital Unix V4.0D. I need to write a program that
determines the load on the CPU and also gather disk I/O
statistics. From these two things, I need to determine if
the system is loaded or not based some some user defined
threshold(s).
I figured that I need to use the table(2) system call. Does the
load average that is returned by table() reflect (at least to
some extent) the load on the CPU? If not what else determines
it?
For disk statistics, I am not sure how to interpret
tbl_dkinfo struct. Any help in this is appreciated.
thanks.
raj...
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: CPU load and Disk I/O and load
2000-04-17 4:00 CPU load and Disk I/O and load Raj Calisa
@ 2000-04-17 4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
2000-04-17 4:00 ` mitsura
2000-04-28 4:00 ` Dennis J. Sylvester
2 siblings, 0 replies; 4+ messages in thread
From: Alan Rollow - Dr. File System's Home for Wayward Inodes. @ 2000-04-17 4:00 UTC (permalink / raw)
In article <38FA916C.11B07EC0@ot.com.au>, Raj Calisa <rajc@ot.com.au> writes:
>I work on Digital Unix V4.0D. I need to write a program that
>determines the load on the CPU and also gather disk I/O
>statistics. From these two things, I need to determine if
>the system is loaded or not based some some user defined
>threshold(s).
As someone else suggested, you might want to look at existing
utilities to see if they meet your needs. If the problem is
one of formatting the data differently, then look at the programs
which collect this data and which also have sources available.
You might also want to look at collect and Monitor which should
be on the Freeware CDROM. A newer version of Monitor is available
on gatekeeper.dec.com:/pub/DEC/monitor.alpha.tar.Z.
>I figured that I need to use the table(2) system call. Does the
>load average that is returned by table() reflect (at least to
>some extent) the load on the CPU? If not what else determines
>it?
What do you consider CPU load? The stats available from table(2)
using the code TBL_SYSINFO record time spent in the different CPU
modes; user, nice, kernel, wait and idle. Older versions of the
operating system only had one of these structures available for
multi-CPU systems. I've read that V5 presents this data on a
per-CPU basis, but I don't know what V4 does.
The load average is described in the uptime manual page. It is
a pretty good measure of overall system load, but systems are
complex and one measurement rarely describes everything that
contributes to load.
>For disk statistics, I am not sure how to interpret
>tbl_dkinfo struct. Any help in this is appreciated.
Up to the number of disks that the interface supports, each
disk on the system is allocated one of these data structures.
The first entry of the table, records the number of entries
in the table (which may be a fixed value and thus, next to
useless). The unit and name fields correspond to the disk
for which statistics are being collected. Through V4, I
don't believe this unit information reflects SCSI targets
that support multiple logical units making it appears that
there are multiple entries per disk. You have to go deeper
into the kernel to see which logical unit corresponds to
which table entry. You can look at the Monitor sources to
see how it does this.
I believe di_busy is simply a flag to indicate that the
entry represents an active disk. The di_xfer and di_wds
field represent number of transfers completed and number
of "words" transferred by the disk. I think the "word"
size of this data structure is 64 bytes. It is easy enough
to verify with a simple controlled I/O test.
I suspect the di_seek field only gets counted for disks
that require an explicit seek operation to access a given
logical block. Most modern storage protocols hide the seek
insides an I/O request for the block. Generally you'll see
this field as zero. I don't recall what the di_time field
counts. Some modern versions do fill in the later stats,
which are as described in the include file.
>
>thanks.
>
>raj...
>
--
Alan Rollow alan@nabeth.cxo.dec.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: CPU load and Disk I/O and load
2000-04-17 4:00 CPU load and Disk I/O and load Raj Calisa
2000-04-17 4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
@ 2000-04-17 4:00 ` mitsura
2000-04-28 4:00 ` Dennis J. Sylvester
2 siblings, 0 replies; 4+ messages in thread
From: mitsura @ 2000-04-17 4:00 UTC (permalink / raw)
Why not use 'iostat', 'top' or 'syd'? Top and syd can be found
on Compaq's public ftp site
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: CPU load and Disk I/O and load
2000-04-17 4:00 CPU load and Disk I/O and load Raj Calisa
2000-04-17 4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
2000-04-17 4:00 ` mitsura
@ 2000-04-28 4:00 ` Dennis J. Sylvester
2 siblings, 0 replies; 4+ messages in thread
From: Dennis J. Sylvester @ 2000-04-28 4:00 UTC (permalink / raw)
Go to Compaq/s site and get 'collect'. It's a great utility and will
gather almost all the data you need as well as being very configurable.
It also has a playback feature that is very useful.
Raj Calisa wrote:
> Hi all,
>
> I work on Digital Unix V4.0D. I need to write a program that
> determines the load on the CPU and also gather disk I/O
> statistics. From these two things, I need to determine if
> the system is loaded or not based some some user defined
> threshold(s).
>
> I figured that I need to use the table(2) system call. Does the
> load average that is returned by table() reflect (at least to
> some extent) the load on the CPU? If not what else determines
> it?
>
> For disk statistics, I am not sure how to interpret
> tbl_dkinfo struct. Any help in this is appreciated.
>
> thanks.
>
> raj...
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-04-28 4:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-17 4:00 CPU load and Disk I/O and load Raj Calisa
2000-04-17 4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
2000-04-17 4:00 ` mitsura
2000-04-28 4:00 ` Dennis J. Sylvester
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox