You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
purr is the value in /proc/ppc64/lparcfg. old one is the value collected in the last output.
timebase is the value in /proc/cpuinfo. It was 512000000 in my case.
It seems that elapsed's value was wrong. It should be a difference (in second) from the last output timestamp. The timestamp was collected in get_time().
gettimeofday(&t, 0);
se = get_sysentry("time");
sprintf(se->value, "%ld", t.tv_sec + t.tv_usec);
}
t.tv_sec + t.tv_usec is wrong definitely. The unit doesn't same.
If the time is returned in second here, it may cause another problem.
I created a patch, and get_time() returns the time in usec in it.
And, it can be calculated properly with changing into second in get_cpu_physc().
Hi,
physc value in the output of lparstat is always 0.00. This doesn't provide any correct data.
physc is calculated as below.
void get_cpu_physc(struct sysentry *unused_se, char *buf)
{
... snip ...
physc = (new_purr - old_purr)/timebase/elapsed;
sprintf(buf, "%.2f", physc);
purr is the value in /proc/ppc64/lparcfg. old one is the value collected in the last output.
timebase is the value in /proc/cpuinfo. It was 512000000 in my case.
It seems that elapsed's value was wrong. It should be a difference (in second) from the last output timestamp. The timestamp was collected in get_time().
void get_time()
{
struct timeval t;
struct sysentry *se;
}
t.tv_sec + t.tv_usec is wrong definitely. The unit doesn't same.
If the time is returned in second here, it may cause another problem.
I created a patch, and get_time() returns the time in usec in it.
And, it can be calculated properly with changing into second in get_cpu_physc().
Regards,
Masahiro Matsuya
The text was updated successfully, but these errors were encountered: