ber_sockbuf_ctrl - Linux


ber_sockbuf_ctrl allows the manipulation of socket buffer and thread pool options for the Berkeley Socket (BSD) library used in networking applications. It provides fine-grained control over network performance and resource allocation.


ber_sockbuf_ctrl [-g] [-s] [[-qV] OPTION [ARG]]...


  • -g (get): Display current settings.
  • -s (set): Set options as specified.
  • -q (query): Display the supported options and their descriptions.
  • -V (version): Display version information.


  • rmem_default: Default receive buffer size (in bytes).
  • rmem_min: Minimum receive buffer size (in bytes).
  • rmem_max: Maximum receive buffer size (in bytes).
  • wmem_default: Default send buffer size (in bytes).
  • wmem_min: Minimum send buffer size (in bytes).
  • wmem_max: Maximum send buffer size (in bytes).
  • threads: Number of threads in the socket thread pool.
  • thread_min: Minimum number of threads in the pool.
  • thread_max: Maximum number of threads in the pool.


Get Buffer Size Defaults

ber_sockbuf_ctrl -g rmem_default

Set Buffer Sizes

ber_sockbuf_ctrl -s rmem_min 64K wmem_max 2MB

Query Supported Options

ber_sockbuf_ctrl -q

Common Issues

  • Incorrect option value: Ensure that the specified option values are within the supported ranges.
  • Invalid option: Double-check the option name and spelling.


ber_sockbuf_ctrl can be used in conjunction with other networking commands, such as:

  • ss: Monitor socket connections.
  • netstat: Display network statistics.

Related Commands