Powercap policy and PCP config from commandline.

Added command line arguments corresponding to powercapping policy
and pcp config file path.
This commit is contained in:
Pradyumna Kaushik 2018-10-04 19:21:45 -04:00
parent b8f2248810
commit c9d4e66236
4 changed files with 22 additions and 17 deletions

View file

@ -20,7 +20,7 @@ import (
func StartPCPLogAndExtremaDynamicCap(quit chan struct{}, logging *bool, hiThreshold, loThreshold float64,
logMType chan elekLogDef.LogMessageType, logMsg chan string, pcpConfigFile string) {
const pcpCommand string = "pmdumptext -m -l -f '' -t 1.0 -d , -c "
var pcpCommand string = "pmdumptext -m -l -f '' -t 1.0 -d , -c " + pcpConfigFile
cmd := exec.Command("sh", "-c", pcpCommand, pcpConfigFile)
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}

View file

@ -33,7 +33,7 @@ func getNextCapValue(curCapValue float64, precision int) float64 {
func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, hiThreshold, loThreshold float64,
logMType chan elekLogDef.LogMessageType, logMsg chan string, pcpConfigFile string) {
const pcpCommand string = "pmdumptext -m -l -f '' -t 1.0 -d , -c "
var pcpCommand string = "pmdumptext -m -l -f '' -t 1.0 -d , -c " + pcpConfigFile
cmd := exec.Command("sh", "-c", pcpCommand, pcpConfigFile)
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}