Cedana
Cedana Daemon
Cedana
Cedana Daemon
  • Cedana Daemon
  • Get started
    • Installation
    • Authentication
    • Configuration
    • Health checks
    • Plugins
    • Feature matrix
  • Guides
    • Managed process/container
    • Checkpoint/restore basics
    • Checkpoint/restore with GPUs
    • Checkpoint/restore runc
    • Checkpoint/restore containerd
    • Checkpoint/restore streamer
    • Checkpoint/restore kata
      • how-to-create-custom-busybox-image
      • how-to-install-criu-in-guest
      • how-to-install-on-aws
      • how-to-make-kernel-criu-compatible
      • how-to-make-rootfs-criu-compatible
      • Checkpoint/Restore kata containers
  • Developer guides
    • Architecture
    • Profiling
    • Testing
    • Writing plugins
  • References
    • CLI
      • cedana
      • cedana attach
      • cedana checkpoint
      • cedana checkpoints
      • cedana completion
      • cedana completion bash
      • cedana completion fish
      • cedana completion powershell
      • cedana completion zsh
      • cedana daemon
      • cedana daemon check
      • cedana daemon start
      • cedana delete
      • cedana dump
      • cedana dump containerd
      • cedana dump job
      • cedana dump process
      • cedana dump runc
      • cedana exec
      • cedana features
      • cedana inspect
      • cedana job
      • cedana job attach
      • cedana job checkpoint
      • cedana job checkpoint inspect
      • cedana job checkpoint list
      • cedana job checkpoints
      • cedana job delete
      • cedana job inspect
      • cedana job kill
      • cedana job list
      • cedana jobs
      • cedana k8s-helper
      • cedana k8s-helper destroy
      • cedana kill
      • cedana manage
      • cedana manage containerd
      • cedana manage process
      • cedana manage runc
      • cedana plugin
      • cedana plugin features
      • cedana plugin install
      • cedana plugin list
      • cedana plugin remove
      • cedana plugins
      • cedana ps
      • cedana query
      • cedana query k8s
      • cedana query runc
      • cedana restore
      • cedana restore job
      • cedana restore process
      • cedana restore runc
      • cedana run
      • cedana run containerd
      • cedana run process
      • cedana run runc
    • API
    • GitHub
Powered by GitBook
On this page
  • Create a new job
  • Manage an existing job
  • Manage an upcoming job
  • List managed jobs
  • Attach I/O
  • View job logs
  • Checkpoint/restore
  • Checkpoint/restore with GPUs

Was this helpful?

Edit on GitHub
  1. Guides

Managed process/container

PreviousFeature matrixNextCheckpoint/restore basics

Last updated 7 days ago

Was this helpful?

The Cedana daemon is designed to manage the entire lifecycle of a process/container, including checkpoint/restore, in the larger Cedana system.

Managed processes/containers are those that are spawned using cedana run (). This command creates a managed job, which can be checkpointed and restored using cedana dump job and cedana restore job subcommands.

By default, jobs are stored in a local DB (in /tmp). You may set the db.path in to change the path to persist it across restarts. If you're authenticated, you may set the db.remote to true in to use a remote DB at your specified Cedana endpoint instead.

Create a new job

To run a new managed job:

cedana run <type> ...

For example, to run a new managed process:

cedana run process --jid <job_id> -- echo "Hello, world!"

The --jid flag is optional, and if not provided, a random job ID will be generated.

Manage an existing job

It's also possible to start managing an existing process/container:

cedana manage <type> ...

For example, to manage an existing process:

cedana manage process <PID> [args...]

Manage an upcoming job

It's also possible to start managing an upcoming process/container:

cedana manage --upcoming <type> ...

For example, to manage an existing runc container:

cedana manage --upcoming runc <container-id> [args...]

List managed jobs

cedana job list
JOB             TYPE      PID  STATUS  GPU  CHECKPOINT  SIZE  LOG
used_gould8     process  5336  halted  yes                    /var/log/cedana-output-used_gould8.log
clean_davinci7  runc     3680  halted  no
easy_tu9        process  3892  halted  yes

cedana ps is a shorthand for cedana job list.

Attach I/O

To attach to the I/O of a job, use the --attach flag:

cedana run <type> --attach ...

This will attach the standard input, output, and error streams to the terminal, including the job's exit status. Press Ctrl+C to detach, and the job will continue running in the background.

If you list the jobs, you will see that the job is attachable:

JOB             TYPE      PID  STATUS  GPU  CHECKPOINT  SIZE  LOG
clean_davinci7  runc     3680  halted  no                     [Attachable]

To attach to the job again, use the cedana job attach subcommand:

cedana job attach <job_id>

Or the generic cedana attach if you want to attach using the job's PID:

cedana attach <PID>

If you want to make a job attachable, but not attach to it immediately, you can use the --attachable flag:

cedana run <type> --attachable ...

View job logs

By default, the jobs stdout/stderr are stored in the /var/log/ directory. If you do cedana job list, you will see the path to the log file.

JOB             TYPE      PID  STATUS  GPU  CHECKPOINT  SIZE  LOG
used_gould8     process  5336  halted  yes                    /var/log/cedana-output-used_gould8.log

If the job has attachable I/O, it will appear as such:

JOB             TYPE      PID  STATUS  GPU  CHECKPOINT  SIZE  LOG
used_gould8     process  5336  halted  yes                    [Attachable]

Checkpoint/restore

Checkpoint/restore with GPUs

Where <type> can be process, containerd, runc, etc. See for all plugins that support running managed jobs.

Where <type> can be process, containerd, runc, etc. See for all plugins that support managing existing jobs.

Where <type> can be process, containerd, runc, etc. See for all plugins that support managing upcoming jobs. The manage command will block and wait for the process/container to become available.

The subcommand cedana job has many subcommands such as list, kill,m delete, etc. Check the for all available subcommands.

You can also pass a custom log path. See for cedana run subcommand.

Once the daemon has started managing a job, it can be checkpointed and restored using the cedana dump job and cedana restore job subcommands. See for more information.

GPU C/R support is also available for managed jobs. Check out the guide for more information.

feature matrix
feature matrix
feature matrix
CLI reference
CLI reference
checkpoint/restore with GPUs
CLI reference
configuration
configuration
managed checkpoint/restore basics