diff options
Diffstat (limited to 'cputemp2maxfreq.c')
-rw-r--r-- | cputemp2maxfreq.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cputemp2maxfreq.c b/cputemp2maxfreq.c index 88d9a5d..dd58e16 100644 --- a/cputemp2maxfreq.c +++ b/cputemp2maxfreq.c @@ -23,6 +23,7 @@ struct s_config config={ 10, // Interval "stdout", // Logger name &logger_stdout, // Logger function + 0, // Don't log measurement data }; struct s_cpudata cpudata; @@ -49,6 +50,7 @@ int main(int argc,char **argv) config.logger("Fallback frquency: %ld",config.fallback_freq); config.logger("Interval: %d",config.interval); config.logger("Logger: %s (%p)",config.logger_name,config.logger); + config.logger("Log measurement data: %d",config.log_data); if ((config.max_temp<VALID_TEMP_MIN) || (config.max_temp>VALID_TEMP_MAX)) { @@ -134,6 +136,10 @@ int main(int argc,char **argv) } DEBUG1_MAIN("Data: %ld %ld %ld %ld %ld\n",cpudata.cur_temp,config.max_temp,cpudata.max_freq,cpudata.scale_max,cpudata.cur_freq); + if (config.log_data>0) + { + config.logger("CPU Temperature: %ld, CPU Frequency: %ld",cpudata.cur_temp/1000,cpudata.cur_freq); + } // Check if we should increase if ((cpudata.cur_temp<config.max_temp) && (cpudata.scale_max<cpudata.max_freq)) |