算法图解 笔记
- 大O表示法都是指的 log₂ 对数O(1)或O(N)或O(log₂N),最糟情况用的次数, 大O符号:是用于描述函数渐近行为的数学符号;
- 二分查找 有序的列表
- 数组和链表 对比 增删改查
- while 循环可能更快,但是递归更易读,递归使栈更深;
-- 并发标记 CMS concurrent mark
-- 重新标记 CMS remark - stop the world
-- 并发清除 CMS concurrent sweep
浮动垃圾 和 并发失效 (内存不够) -> serial old 和 垃圾碎片
设置的 CMSInitiatingOccupancyFraction 的大小和次数的 tradeoff
-- 回收价值列表 - 优先级
tcpdump - dump traffic on a network
tcpdump [ -AbdDefhHIJKlLnNOpqStuUvxX# ] [ -B buffer_size ]
samples here
sudo tcpdump host 10.102.196.239 -w /tmp/tcpdump.log.cap
sudo tcpdump -C 50 -W 10 -w /tmp/tcp.cap ##循环写 10个文件, 每个 50M
sudo tcpdump'(host 10.135.250.186 or host 10.189.248.238 or host 10.20.170.138 or host 10.21.233.128 or port 53)' -w /tmp/tcp.cap # 多个 IP 或者 DNS 查询
ping:
sudo tcpdump -e icmp[icmptype] == 8 //ping echo request
sudo tcpdump -e icmp[icmptype] == 0 //ping echo reply
Becoming a master of display filters is absolutely essential to the network analyst.
Wireshark capture filters and display filters look very different.Capture filters use the BPF format whereas display filters use a proprietary format.
-- wget -S --spider -T 1 -t 2 --no-check-certificate https://esams.vip
-- curl -I --retry 2 --connect-timeout 1 -k https://esams.vip
dig //不带任何参数查询root dns .
dig -h //help
dig +short www.tianxiaohui.com // 简化输出
dig +trace www.tianxiaohui.com //输出迭代式所有来回
dig @8.8.8.8 tianxiaohui.com
dig -x 54.222.60.252 //反向查询
dig -f query.txt +short //从文件读
dig google.com ANY //查询所有记录
-- netstat -t --wide
-- netstat -t -l
-- netstat -s
-- nstat -a
-- nstat #可以提供2 次使用间的 delta
-- nstat --json #以 json 格式输出
-- ss -t -l
-- ss --info
-- ss -it state syn-sent #根据状态查
-- ss -it dst abc.tianxiaohui.com #根据地址过滤
-- ss -it '( dport = :443 )' #根据目标端口查, 一定要注意这里面的空格, 括号里的空格每处都需要
-- ss -it '( dport = :443 or dport = :80 )' #或者
-- ss -it '( sport = :45321 )' #根据源端口查,