m5@lynx.uucp (Mike McNally) (01/17/89)
I've been looking at top(1) to try and get the CPU usage percentages to come out better. Upon looking at it, it seems that these values are sucked straight out of the proc structure in the kernel, specifically from the field p_pctcpu. On my Integrated Solutions machine, this value is kept as a fixed-point value in a long, rather than in a float as is apparently done elsewhere. "Top" looks at the value and then scales it using a value defined elsewhere in proc.h, then prints the result. I took away the scaling to see the raw values from the kernel, and they seem totally bogus. Is this stuff supposed to work? -- Mike McNally Lynx Real-Time Systems uucp: {voder,athsys}!lynx!m5 phone: 408 370 2233 Where equal mind and contest equal, go.