bin@primate.wisc.edu (Brain in Neutral) (07/01/89)
On a VAX, you can nlist "_cp_time" to get the info necessary to grab cpu time state info from a running system. What's the symbol for doing this on a MIPS M/120 (running RISC/os 4.0)? Do you use "sysinfo" and calculate the offset of the cpu field within a struct sysinfo? Paul DuBois dubois@primate.wisc.edu
wje@orac (William J. Earl) (07/06/89)
In article <397@indri.primate.wisc.edu>, bin@primate (Brain in Neutral) writes: > > On a VAX, you can nlist "_cp_time" to get the info necessary to grab > cpu time state info from a running system. What's the symbol for > doing this on a MIPS M/120 (running RISC/os 4.0)? Do you use "sysinfo" > and calculate the offset of the cpu field within a struct sysinfo? Yes, use the "cpu" field of "sysinfo" in place of the "_cp_time" array. Note, however, that the number and numeric order of the CPU states is different in RISC/os 4.0 than in 4.3 BSD. (There five states in RISC/os, namely, in order, "idle", "user", "system", "wait", and "sxbrk".)