Skip to content

Conversation

@copybara-service
Copy link

@copybara-service copybara-service bot commented Nov 25, 2025

runsc: implement -h and -help flags

This is consistent with runc; see containers/podman#27528.

Before this change:

$ ./runsc --help
Usage of ./runsc:
$ echo $?
2
$ ./runsc ps --help
<container-id> [ps options]  -format="table": output format. Select one of: table or json (default: table)
$ echo $?
2

After this change:

$ ./runsc --help
Usage: runsc <flags> <subcommand> <subcommand args>

runsc is the gVisor container runtime.

Functionality is provided by subcommands. For help with a specific subcommand,
use "runsc help <subcommand>".

Subcommands:
        checkpoint       checkpoint current state of container (experimental)
        create           create a secure container
        delete           delete resources held by a container
        do               Simplistic way to execute a command inside the sandbox. It's to be used for testing only.
        events           display container events such as OOM notifications, cpu, memory, and IO usage statistics
        exec             execute new process inside the container
        flags            describe all known top-level flags
        help             Print help documentation.
        kill             sends a signal to the container
        list             list containers started by runsc with the given root
        pause            pause suspends all processes in a container
        port-forward     port forward to a secure container
        ps               ps displays the processes running inside a container
        restore          restore a saved state of container (experimental)
        resume           Resume unpauses a paused container
        run              create and run a secure container
        spec             create a new OCI bundle specification file
        start            start a secure container
        state            get the state of a container
        tar              creates tar archives from container filesystems
        wait             wait on a process inside a container

Subcommands for debug:
        debug            shows a variety of debug information
        read-control     read a cgroups control value inside the container
        statefile        shows information about a statefile
        symbolize        Convert synthetic instruction pointers from kcov into positions in the runsc source code. Only used when Go coverage is enabled.
        usage            Usage shows application memory usage across various categories in bytes.
        write-control    write a cgroups control value inside the container

Subcommands for helpers:
        cpu-features     list CPU features supported on current machine
        install          adds a runtime to docker daemon configuration
        mitigate         mitigate mitigates the underlying system against side channel attacks
        nvproxy          shows information about nvproxy support
        trace            manages trace sessions for a given sandbox
        uninstall        removes a runtime from docker daemon configuration

Subcommands for internal use only:
        boot             launch a sandbox process
        gofer            launch a gofer process that proxies access to container files
        umount           umount the specified directory lazily when one byte is read from sync-fd

Subcommands for metrics:
        export-metrics   export metric data for the sandbox
        metric-metadata  export metric metadata of metrics registered in this build, in text proto format
        metric-server    implements Prometheus metrics HTTP endpoint

Additional help topics (Use "runsc help <topic>" to see help on the topic):
        platforms        Print a list of available platforms.
        syscalls         Print compatibility information for syscalls.

Use "runsc flags" for a list of top-level flags
$ echo $?
0
$ ./runsc ps --help
<container-id> [ps options]  -format="table": output format. Select one of: table or json (default: table)
  -h=false: equivalent to the 'help' flag
  -help=false: show this message and exit
$ echo $?
0

@copybara-service copybara-service bot added the exported Issue was exported automatically label Nov 25, 2025
@copybara-service copybara-service bot force-pushed the test/cl836395969 branch 15 times, most recently from 8d20968 to b061dd5 Compare November 26, 2025 21:34
@copybara-service copybara-service bot closed this Nov 26, 2025
@copybara-service copybara-service bot deleted the test/cl836395969 branch November 26, 2025 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants