Implemented a scheduling tracer. Logs time date and host:task-ID. Made log prefix more global since it needs to be constant for all log files generated.
This commit is contained in:
parent
ab9fda5513
commit
b73c30a8bf
4 changed files with 9 additions and 8 deletions
|
@ -61,13 +61,12 @@ func StartLogAndDynamicCap(quit chan struct{}, logging *bool, prefix string, hiT
|
|||
const pcpCommand string = "pmdumptext -m -l -f '' -t 1.0 -d , -c config"
|
||||
cmd := exec.Command("sh", "-c", pcpCommand)
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
|
||||
startTime := time.Now().Format("20060102150405")
|
||||
|
||||
if hiThreshold < loThreshold {
|
||||
log.Println("High threshold is lower than low threshold!")
|
||||
}
|
||||
|
||||
logFile, err := os.Create("./" + prefix + startTime + ".pcplog")
|
||||
logFile, err := os.Create("./" + prefix + ".pcplog")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
|
|
@ -13,9 +13,8 @@ func Start(quit chan struct{}, logging *bool, prefix string) {
|
|||
const pcpCommand string = "pmdumptext -m -l -f '' -t 1.0 -d , -c config"
|
||||
cmd := exec.Command("sh", "-c", pcpCommand)
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
|
||||
startTime := time.Now().Format("20060102150405")
|
||||
|
||||
logFile, err := os.Create("./" + prefix + startTime + ".pcplog")
|
||||
logFile, err := os.Create("./" + prefix + ".pcplog")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
|
Reference in a new issue