Now retrieving path to rapl throttle script by reading value of an environment variable. Also, stored the RAPL_PKG_Throttle.py script in a directory called scripts/. The location of this needs to be stored in an environment variable named RAPL_PKG_THROTTLE_LOCATION.
This commit is contained in:
parent
dcf67661e9
commit
c2b42c2662
3 changed files with 41 additions and 3 deletions
|
@ -33,7 +33,7 @@ func Cap(host, username string, percentage float64) error {
|
|||
return errors.Wrap(err, "Failed to create session")
|
||||
}
|
||||
|
||||
err = session.Run("sudo /misc/shared_data/rdelval1/RAPL_PKG_Throttle.py " + strconv.FormatFloat(percentage, 'f', 2, 64))
|
||||
err = session.Run("sudo " + os.Getenv(elekEnv.RaplThrottleScriptLocation) + "/RAPL_PKG_Throttle.py" + strconv.FormatFloat(percentage, 'f', 2, 64))
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Failed to run RAPL script")
|
||||
}
|
||||
|
|
Reference in a new issue