How to view system-level parameters in the Linux operating system

1. How to check the maximum number of TCP connections allowed by the operating system

cat /proc/sys/net/ipv4/tcp_max_tw_buckets

sysctl -a | grep net.ipv4.tcp_max_tw_buckets

2. How to check the number of TCP links the system is allowed to wait for

cat /proc/sys/net/ipv4/tcp_max_syn_backlog

sysctl -a | grep net.ipv4.tcp_max_syn_backlog

3. How to check the maximum number of threads allowed by the system

cat /proc/sys/kernel/threads-max

4. Query the number of TCP links that have been established in the system

netstat -nat | grep ESTABLISHED | wc -l

netstat -nat | grep ESTABLISHED | grep :9000 | wc -l

The following are some possible system parameters that can affect the performance of a TCP link, but please note that the specific effects of these parameters will vary depending on the operating system and network environment:

  1. /proc/sys/net/ipv4/tcp_retries2: This parameter controls the number of retries after a failed TCP connection attempt.
  2. /proc/sys/net/ipv4/tcp_window_size: This parameter can set the upper and lower limits of the TCP window size.
  3. /proc/sys/net/ipv4/tcp_ssthresh: This parameter can set the slow start threshold, which is the dividing point between the slow start phase and the congestion avoidance phase in congestion control.
  4. /proc/sys/net/ipv4/tcp_base_mss: This parameter can set the lower limit of the initial window size of the TCP sender and receiver.
  5. /proc/sys/net/ipv4/tcp_keepalive_time: This parameter can set the retention time of the TCP connection when there is no data transmission.
  6. /proc/sys/net/ipv4/tcp_keepalive_intvl: This parameter can set the interval for the TCP connection to detect whether the connection is valid when there is no data transmission.
  7. /proc/sys/net/ipv4/tcp_keepalive_probes: This parameter can set the number of connection checks for a TCP connection when there is no data transmission.

Guess you like

Origin blog.csdn.net/u013933709/article/details/132893793