[lkml]   [2018]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: turbostat-17.06.23 floating point exception
On Fri, Oct 12, 2018 at 07:03:41PM -0400, Len Brown wrote:
> > Why would the cpu topology report 0 cpus? I added a debug entry to
> > cpu_usage_stat and /proc/stat showed it as an extra column. Then
> > fscanf parsing in for_all_cpus() failed, causing the SIGFPE.
> >
> > This is not an issue. Thanks.
> Yes, it is true that turbostat doesn't check for systems with 0 cpus.
> I'm curious how you provoked the kernel to claim that. If it is
> something others might do, we can have check for it and gracefully
> exit.

int for_all_proc_cpus(int (func)(int))
retval = fscanf(fp, "cpu %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d\n");
This fails due to an extra debug entry in /proc/stat
(total of 11 columns). I was measuring time in a hot
function and decided to add this time in an extra
cpu_usage_stat. This was an experiment though.


 \ /
  Last update: 2018-10-19 03:29    [W:0.041 / U:2.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site