]> git.baikalelectronics.ru Git - kernel.git/commit
tools/power turbostat: on SIGUSR1: sample, print and continue
authorLen Brown <len.brown@intel.com>
Sat, 15 Jul 2017 19:51:26 +0000 (15:51 -0400)
committerLen Brown <len.brown@intel.com>
Fri, 1 Jun 2018 16:13:04 +0000 (12:13 -0400)
commit58123d0fbaa8bf67980b67422b0d10a4e336f722
treed970ce934120a23f0848de3a5e4c2fd24ec5c133
parent259b687d7740de8e41667a288356107f82a5cf46
tools/power turbostat: on SIGUSR1: sample, print and continue

Interval-mode turbostat now catches and discards SIGUSR1.

Thus, SIGUSR1 can be used to tell turbostat to cut short
the current measurement interval.  Turbostat will then start
the next measurement interval using the regular interval length.

This can be used to give turbostat variable intervals.
Invoke turbostat with --interval LARGE_NUMBER_SEC
and have a program that has permission to send it a SIGUSR1
always before LARGE_NUMBER_SEC expires.

It may also be useful to use "--enable Time_Of_Day_Seconds"
to observe the actual interval length.

Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.8
tools/power/x86/turbostat/turbostat.c