]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit072119606a239557bf8532c70af9c211d1028dff
treed970ce934120a23f0848de3a5e4c2fd24ec5c133
parent8aa2ed0b2839718b9147bb0119a8012217d25a8b
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