# LibTmux::Async::Server#snapshot

- **Module:** LibTmux::Async
- **Package:** libtmux-async
- **Language:** Ruby
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ruby/blob/da7b6191b9439e3c84fa1c9eeaa9168263ee7af4/gems/libtmux/lib/libtmux/server.rb#L337
- **Public owner:** LibTmux::Server#snapshot
- **Page:** https://libtmux.org/en/ruby/v0.1.1/reference/libtmux-async-server-snapshot/

```
def snapshot: (
  ?timeout: ::Numeric,
  ?cancel: untyped,
  ?clients: bool,
  ?max_bytes: ::Integer,
  ?max_rows: ::Integer,
  ?max_field_bytes: ::Integer
) -> ::LibTmux::Snapshot
```

Behavior: Snapshot acquisition.

Behavior contract: Snapshot acquisition.

## Parameters

- `timeout` (`::Numeric`)
- `cancel` (`untyped`)
- `clients` (`bool`)
- `max_bytes` (`::Integer`)
- `max_rows` (`::Integer`)
- `max_field_bytes` (`::Integer`)

## tmux command

The tmux commands behind `snapshot`.

- [`list-clients`](/en/tmux/latest/manual/list-clients/)
- [`list-panes`](/en/tmux/latest/manual/list-panes/) `-a` server scope, [`cmd_list_panes_server`](/en/tmux/latest/reference/c-function-cmd-list-panes-c-cmd_list_panes_server/) (source: `gems/libtmux/lib/libtmux/capture.rb:93`)
- [`list-sessions`](/en/tmux/latest/manual/list-sessions/)
- [`list-windows`](/en/tmux/latest/manual/list-windows/) `-a` server scope, [`cmd_list_windows_exec`](/en/tmux/latest/reference/c-function-cmd-list-windows-c-cmd_list_windows_exec/) (source: `gems/libtmux/lib/libtmux/capture.rb:84`)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_list_clients_entry`](/en/tmux/latest/reference/c-variable-cmd_list_clients_entry/) (attribute)
- [`cmd_list_clients_exec`](/en/tmux/latest/reference/c-function-cmd-list-clients-c-cmd_list_clients_exec/) (function)
- [`cmd_list_panes_entry`](/en/tmux/latest/reference/c-variable-cmd_list_panes_entry/) (attribute)
- [`cmd_list_panes_server`](/en/tmux/latest/reference/c-function-cmd-list-panes-c-cmd_list_panes_server/) (function)
- [`cmd_list_sessions_entry`](/en/tmux/latest/reference/c-variable-cmd_list_sessions_entry/) (attribute)
- [`cmd_list_sessions_exec`](/en/tmux/latest/reference/c-function-cmd-list-sessions-c-cmd_list_sessions_exec/) (function)
- [`cmd_list_windows_entry`](/en/tmux/latest/reference/c-variable-cmd_list_windows_entry/) (attribute)
- [`cmd_list_windows_exec`](/en/tmux/latest/reference/c-function-cmd-list-windows-c-cmd_list_windows_exec/) (function)

## Guides

Pages that discuss `snapshot`.

- [Server bindings](/en/ruby/v0.1.1/guides/core/)
