pip问题

安装python3.6
pip3 install wheel –target=/usr/lib/python3.6/site-packages
pip3 install pyshark –target=/usr/lib/python3.6/site-packages

导入pyshark报错

1
2
3
4
5
6
7
8
9
10
11
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.6/site-packages/pyshark/__init__.py", line 13, in <module>
from pyshark.capture.live_capture import LiveCapture
File "/usr/lib/python3.6/site-packages/pyshark/capture/live_capture.py", line 6, in <module>
from pyshark.capture.capture import Capture
File "/usr/lib/python3.6/site-packages/pyshark/capture/capture.py", line 13, in <module>
from pyshark.tshark.tshark_xml import packet_from_xml_packet, psml_structure_from_xml
File "/usr/lib/python3.6/site-packages/pyshark/tshark/tshark_xml.py", line 2, in <module>
import lxml.objectify
ModuleNotFoundError: No module named 'lxml'

pip3 install lxml –target=/usr/lib/python3.6/site-packages

tcp重传

RtoAlgorithm :
RtoMin :
RtoMax :
MaxConn :
ActiveOpens : 服务器主动连接的TCP请求数
PassiveOpens :服务器接收到的TCP请求数
AttemptFailsEstabResets :TCP连接失败个数(AttemptFails)包含:主动连接失败收到syn包回包syn+ack给对方后,被对方reset收到的请求中,同时有syn+rst flag
CurrEstab :TCP当前建立连接的个数
InSegs :TCP接收的分片数
OutSegs :TCP发送的分片数
RetransSegs :重传分片数
InErrs :TCP入包错误(pkg/m,通常是校验错误)
OutRsts :
TCP重传率 =重传分片数 / TCP发送的分片数

linux命令路径

linux下有2个命令可完成该功能:which ,whereis

which 用来查看当,前要执行的命令所在的路径。

1
which命令的原理:在PATH变量指定的路径中,搜索某个系统命令的位置,并且返回第一个搜索结果。也就是说,使用which命令,就可以看到某个系统命令是否存在,以及执行的到底是哪一个位置的命令。

whereis 用来查看一个命令或者文件所在的路径。

Read More

ubuntu版本

1
2
3
4
5
6
7
8
9
10
11
12
13
# lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal

或者

# cat /etc/issue
Ubuntu 20.04.2 LTS \n \l

查看内存信息

1
dmidecode|grep -P -A5 "Memory\s+Device"|grep Size|grep -v Range

tcping pingIP的端口

windows版

1
2
3
4
5
6
软件地址:
https://elifulkerson.com/projects/tcping.php

用法:

tcping.exe $ip $port

linux版

1
2
3
4
5
6
7
8
9
10
11
12
$ sudo yum install tcptraceroute

$ cd /usr/bin
$ sudo wget http://www.vdberg.org/~richard/tcpping
$ sudo chmod 755 tcpping

$ tcpping 192.168.3.254 5447
traceroute to 192.168.3.254 (192.168.3.254), 255 hops max, 60 byte packets
seq 0: tcp response from 192.168.3.254 (192.168.3.254) <syn,ack> 0.278 ms
traceroute to 192.168.3.254 (192.168.3.254), 255 hops max, 60 byte packets
seq 1: tcp response from 192.168.3.254 (192.168.3.254) <syn,ack> 0.773 ms