grep .. -m .. stop reading a file…

-m Stop reading a file after NUM matching lines. $grep -m 1 wc wcwidth.c #include $grep -m 2 wc wcwidth.c #include wchar_t cr; $grep -m 3 wc wcwidth.c #include wchar_t cr; value=wcwidth(cr); $grep -m 4 wc wcwidth.c #include wchar_t cr; value=wcwidth(cr); $grep -m 0 wc wcwidth.c $ scripts/makelst – 338 identical 19: t1=`$3 –syms $1 …

remembered connection requests .. syn .. backlog

$cat /proc/sys/net/ipv4/tcp_max_syn_backlog 1024 $ Maximal number of remembered connection requests, which still did not receive an acknowledgement from connecting client. The default value is 1024 for systems with more than 128 MB of memory, and 128 for low memory machines. If server suffers of overload, try to increase this number. source : http://www.linuxinsight.com/proc_sys_net_ipv4_tcp_max_syn_backlog.html Script.January/HPUX11/GEN003600 – …

grep … matches..and that not matches..-l.. -L

$grep -r -l tcp_max * sysctl_net_ipv4.c tcp.c tcp_cong.c tcp_input.c tcp_output.c $ $grep -r -L tcp_max * af_inet.c ah4.c arp.c cipso_ipv4.c datagram.c devinet.c esp4.c fib_frontend.c fib_hash.c fib_lookup.h fib_rules.c fib_semantics.c fib_trie.c icmp.c igmp.c inet_connection_sock.c inet_diag.c inet_fragment.c inet_hashtables.c inet_lro.c inetpeer.c inet_timewait_sock.c ipcomp.c ipconfig.c ip_forward.c ip_fragment.c ip_gre.c ip_input.c ipip.c ipmr.c ip_options.c ip_output.c ip_sockglue.c Kconfig Makefile netfilter/ipt_ECN.c netfilter/nf_nat_amanda.c netfilter/nf_conntrack_l3proto_ipv4.c netfilter/nf_nat_proto_dccp.c …

The tcp max orphans variable …

$cat /proc/sys/net/ipv4/tcp_max_orphans 8192 $ tcp_max_orphans The tcp_max_orphans variable tells the kernel how many TCP sockets that are not attached to any user file handle to maintain. In case this number is exceeded, orphaned connections are immediately reset and a warning is printed. The only reason for this limit to exist is to prevent some simple …

tcp latency….throughput..

$cat /proc/sys/net/ipv4/tcp_low_latency 0 $ tcp_low_latency – BOOLEAN If set, the TCP stack makes decisions that prefer lower latency as opposed to higher throughput. By default, this option is not set meaning that higher throughput is preferred. An example of an application where this default should be changed would be a Beowulf compute cluster. Default: 0 …

the interval between the last data packet sent and…

$cat /proc/sys/net/ipv4/tcp_keepalive_time 7200 $ tcp_keepalive_time the interval between the last data packet sent (simple ACKs are not considered data) and the first keepalive probe; after the connection is marked to need keepalive, this counter is not used any further source :http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/usingkeepalive.html linux/net/ipv4/tcp.c – 8 identical 365: * TCP Keep-Alives (4.2.3.6) 366: * MAY provide keep-alives. …

tcp keepalive interval

$cat /proc/sys/net/ipv4/tcp_keepalive_intvl 75 $ tcp_keepalive_intvl the interval between subsequential keepalive probes, regardless of what the connection has exchanged in the meantime linux/net/ipv4/tcp.c – 8 identical 368: * MUST default to no keep-alives. (does) 369: * MUST make keep-alive interval configurable. (does) 370: * MUST make default keep-alive interval > 2 hours. (does) tcp_timer.c – 3 …