Skip to content

Commit f0ebc37

Browse files
committed
More logging
1 parent d77288b commit f0ebc37

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

internal/checkpointer/checkpointer.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,16 @@ func (c *checkpointer) Restore(ctx context.Context) (*exec.Cmd, func(context.Con
184184
}
185185

186186
// Set up restore command
187-
restoreCmd := exec.CommandContext(ctx, criuPath, "restore", "--shell-job", "--tcp-close", "-v4", "-o", "/tmp/restore.log", "--images-dir", filepath.Join(c.checkpointDir, checkpointSubdirName))
187+
restoreCmd := exec.CommandContext(ctx, criuPath, "restore", "--shell-job", "--tcp-close", "--images-dir", filepath.Join(c.checkpointDir, checkpointSubdirName))
188188

189189
// Set up callback function once restore is started
190190
callback := func(con context.Context) error {
191+
out, err := exec.CommandContext(con, "ps", "aux").Output()
192+
if err != nil {
193+
fmt.Println(err.Error())
194+
}
195+
fmt.Println(out)
196+
fmt.Println(strconv.Itoa(restoreCmd.Process.Pid))
191197
// Toggle CUDA on for the restored process
192198
cmd := exec.CommandContext(con, cudaCheckpointPath, "--toggle", "--pid", strconv.Itoa(restoreCmd.Process.Pid))
193199
cmd.Stdout = os.Stdout

0 commit comments

Comments
 (0)