-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 …
Category Archives: Uncategorized
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 – …
Continue reading “remembered connection requests .. syn .. backlog”
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 …
Continue reading “grep … matches..and that not matches..-l.. -L”
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. …
Continue reading “the interval between the last data packet sent and…”
grep … -x .. exact line match only
$cat example.txt A for Apple. B for Baby. C for Cat. D for Donkey. $grep A example.txt A for Apple. $grep -x A example.txt $grep -x A for Apple. example.txt grep: for: No such file or directory grep: Apple.: No such file or directory $grep -x “A for Apple.” example.txt A for Apple. $grep -x …
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 …
F-RTO response
$cat /proc/sys/net/ipv4/tcp_frto_response 0 $ When F-RTO has detected that a TCP retransmission timeout was spurious (i.e, the timeout would have been avoided had TCP set a longer retransmission timeout), TCP has several options what to do next. Possible values are: 0 Rate halving based; a smooth and conservative response, results in halved cwnd and ssthresh …
grep … -w matches that form whole words
grep -w :: selects only those lines containing matches that form whole words. $ cat samsung id proof license copy check leaf 1 $ $ grep -w lic samsung $ grep -w license samsung license copy $