mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-21 16:32:59 +02:00
collectd: fix cpufreq graph if virtual cores are offline
the kernel doesn't allow to read the frequency of a offline virtual core if smt is disabled so now no error is reported in this case and NaN submited to the database. Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
diff -Naur collectd-4.10.9.org/src/cpufreq.c collectd-4.10.9/src/cpufreq.c
|
||||
--- collectd-4.10.9.org/src/cpufreq.c 2013-04-08 08:26:17.000000000 +0200
|
||||
+++ collectd-4.10.9/src/cpufreq.c 2024-04-04 15:33:52.705372940 +0200
|
||||
@@ -104,12 +104,9 @@
|
||||
|
||||
if (fgets (buffer, 16, fp) == NULL)
|
||||
{
|
||||
- char errbuf[1024];
|
||||
- WARNING ("cpufreq: fgets: %s",
|
||||
- sstrerror (errno, errbuf,
|
||||
- sizeof (errbuf)));
|
||||
fclose (fp);
|
||||
- return (-1);
|
||||
+ cpufreq_submit (i, NAN);
|
||||
+ break;
|
||||
}
|
||||
|
||||
if (fclose (fp))
|
||||
Reference in New Issue
Block a user