当前位置: 首页 > news >正文

java做面试题的网站推广优化关键词

java做面试题的网站,推广优化关键词,网页设计尺寸用怎么量,建设一个行业性的网站价格目录 需求1-查看本机是否存在22端口解法1解法2解法3 需求2-查看其他主机是否存在22端口解法1解法2解法3 需求3-查看TCP连接解法1/2 需求4-统计80端口tcp连接次数解法 需求5-查看总体网络速度解法 需求6-查看进程流量解法 需求7-dns解法 需求8-traceroute到baidu解法 需求9-查看…

目录

  • 需求1-查看本机是否存在22端口
    • 解法1
    • 解法2
    • 解法3
  • 需求2-查看其他主机是否存在22端口
    • 解法1
    • 解法2
    • 解法3
  • 需求3-查看TCP连接
    • 解法1/2
  • 需求4-统计80端口tcp连接次数
    • 解法
  • 需求5-查看总体网络速度
    • 解法
  • 需求6-查看进程流量
    • 解法
  • 需求7-dns
    • 解法
  • 需求8-traceroute到baidu
    • 解法
  • 需求9-查看路由
    • 解法

需求1-查看本机是否存在22端口

解法1

ss -tunlp |grep 22ss 是一个用于检查套接字统计信息的命令,而 -tunlp 是它的几个选项的组合:
-t 表示显示 TCP 套接字
-u 表示显示 UDP 套接字
-n 表示直接使用 IP 地址,而不是尝试确定符号主机、端口或用户名
-l 表示仅显示监听状态的套接字
-p 表示显示监听端口的进程信息

解法2

netstat -tunlp | grep 22netstat 是一个网络统计工具,用于显示网络连接、路由表、接口统计等信息。

解法3

lsof -nPi :22lsof"List Open Files" 的缩写,用于列出当前系统打开的文件。
-n:不解析 IP 地址,直接显示数字形式。
-P:不解析端口号,直接显示数字形式。
-i:显示打开的网络文件,即网络连接。
:22:指定要查找的端口号,这里是 22,通常用于 SSH 服务。
lsof -nPi :22 命令的作用是列出所有使用端口 22 的网络连接,不进行地址和端口的解析,直接显示它们的数字形式。

需求2-查看其他主机是否存在22端口

解法1

telnet 192.168.100.128 22

解法2

nc  192.168.100.128 22  一般用于shell脚本中,查看端口是否打开. 因为输出较少
nc"netcat" 的缩写,它是一个用于网络通信的命令行工具,可以用于创建网络连接、监听网络上的数据流、发送数据到网络上等。
如果该主机的 SSH 服务正在端口 22 上监听,并且连接成功,netcat 将建立一个网络连接

解法3

nmap -p22 192.168.100.128nmap 是一个网络探索和安全扫描工具,它可以用来发现网络上的设备,检测开放的端口,确定运行在网络设备上的服务及其版本信息等
-p 可以指定一个范围端口,如1-100
IP 可以是范围,如192.168.100.0/24

需求3-查看TCP连接

解法1/2

ss -antnetstat -ant-a:显示所有套接字(包括监听和非监听的)。

需求4-统计80端口tcp连接次数

解法

#模拟连接
#ab工具需要yum安装httpd-tools
ab -n 1000000 -c 10 http://localhost/ &> /dev/null &
# ab:Apache Benchmark 工具的命令。
# -n 1000000:指定测试执行的请求数量,这里是 1000000 次请求。
# -c 10:指定并发执行请求的数量,这里是 10 个并发请求。
# http://localhost/:指定要测试的 URL,这里是本地服务器的根目录。
# &:将命令放在后台执行,这样命令会立即返回控制权给终端,不会阻塞当前的 shell 会话。
# >:重定向到 /dev/null 意味着丢弃所有的输出,不保存任何结果。#统计
ss -ant | awk 'NR>1&&$4~/:80$/{print $1}' | sort | uniq -c7 ESTAB2 FIN-WAIT-15 FIN-WAIT-22 LISTEN14102 TIME-WAIT
# ss -ant:显示所有 TCP (-t) 和 UDP (-a) 套接字,不解析服务名称(-n),并且只显示监听状态的套接字。
# awk 'NR>1&&$4~/:80$/{print $1}':使用 awk 处理 ss 命令的输出。这里 NR>1 表示跳过第一行(通常是标题行),$4~/:80$/ 是一个正则表达式,匹配第四列以 :80 结尾的行,这通常表示 HTTP 服务监听在端口 80 上。对于匹配的行,print $1 输出该行的第一列,即本地地址。
# sort:对 awk 的输出进行排序。
# uniq -c:对排序后的输出进行去重,并计算每个唯一项出现的次数。

需求5-查看总体网络速度

解法

#需要yum安装iftop软件包
iftop -nNPi eth0iftop 是一个实时带宽监控工具,它显示每个连接的网络子接口的数据流量。
-n:不解析 IP 地址为主机名,直接使用 IP 地址显示。
-N:不解析端口号为服务名称,直接使用端口号显示。
-P:不解析 IP 地址为主机名,并且也不解析 MAC 地址为设备名。
-i:指定监控的网络接口,这里是 eth0。

下图右侧三个数值,分别代表2s,10s,40s
在这里插入图片描述

需求6-查看进程流量

解法

#需要yum安装nethogs软件包
nethogs 网卡名#或者可以用
iftop+ss+ps
iftop找出端口+ss找出pid+ps过滤名字

在这里插入图片描述

需求7-dns

解法

#方法1
[root@ecm ~]# dig www.google.com; <<>> DiG 9.16.23 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46352
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;www.google.com.                        IN      A;; ANSWER SECTION:
www.google.com.         200     IN      A       199.16.158.9;; Query time: 8 msec
;; SERVER: 114.114.114.114#53(114.114.114.114)
;; WHEN: Mon May 13 20:55:59 CST 2024
;; MSG SIZE  rcvd: 59#方法2
[root@ecm ~]# host www.google.com
www.google.com has address 199.16.158.9
www.google.com has IPv6 address 2001::1#方法3
[root@ecm ~]# nslookup www.google.com
Server:         114.114.114.114
Address:        114.114.114.114#53Non-authoritative answer:
Name:   www.google.com
Address: 31.13.94.10
Name:   www.google.com
Address: 2001::1

需求8-traceroute到baidu

解法

traceroute -nI www.baidu.com
traceroute to www.baidu.com (180.101.50.188), 30 hops max, 60 byte packets1  * * *2  * * *3  * * *4  10.39.30.182  0.948 ms  0.947 ms  1.005 ms5  10.39.23.246  2.180 ms  2.617 ms  3.064 ms6  10.39.3.250  5.112 ms  4.943 ms  5.440 ms7  * * *8  58.213.94.197  0.921 ms  0.842 ms  0.824 ms9  * * *
10  58.213.96.66  1.810 ms  1.877 ms  1.891 ms
11  * * *
12  * * *
13  * * *
14  180.101.50.188  0.578 ms  0.484 ms  0.534 ms

linux下的traceroute默认发送UDP,可能会没法到达baidu
增加-I选项,使得traceroute发送的是icmp数据包,即可访问到

需求9-查看路由

解法

[root@ecm ~]# ip ro
default via 10.0.0.1 dev eth0 proto dhcp metric 100
10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.124 metric 100
169.254.169.254 via 10.0.0.1 dev eth0 proto dhcp metric 100[root@ecm ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG    100    0        0 eth0
10.0.0.0        0.0.0.0         255.255.255.0   U     100    0        0 eth0
169.254.169.254 10.0.0.1        255.255.255.255 UGH   100    0        0 eth0

文章转载自:
http://teachable.jftL.cn
http://analeptic.jftL.cn
http://jah.jftL.cn
http://una.jftL.cn
http://hol.jftL.cn
http://dismally.jftL.cn
http://carnaby.jftL.cn
http://aeroscope.jftL.cn
http://diphosphoglycerate.jftL.cn
http://tiercet.jftL.cn
http://cytogenous.jftL.cn
http://ballyrag.jftL.cn
http://wallace.jftL.cn
http://chargeable.jftL.cn
http://xeransis.jftL.cn
http://wring.jftL.cn
http://paralyze.jftL.cn
http://echinite.jftL.cn
http://hls.jftL.cn
http://quartertone.jftL.cn
http://editorialist.jftL.cn
http://saloniki.jftL.cn
http://hispania.jftL.cn
http://we.jftL.cn
http://racism.jftL.cn
http://musjid.jftL.cn
http://thermometry.jftL.cn
http://sidepiece.jftL.cn
http://halobios.jftL.cn
http://menfolks.jftL.cn
http://thermoregulate.jftL.cn
http://cargador.jftL.cn
http://intomb.jftL.cn
http://curl.jftL.cn
http://mineralography.jftL.cn
http://geosphere.jftL.cn
http://birdshot.jftL.cn
http://pal.jftL.cn
http://upvalue.jftL.cn
http://spurt.jftL.cn
http://costuming.jftL.cn
http://ambiversion.jftL.cn
http://dissolving.jftL.cn
http://spumy.jftL.cn
http://catomountain.jftL.cn
http://degeneration.jftL.cn
http://innerspring.jftL.cn
http://expectoration.jftL.cn
http://drippy.jftL.cn
http://phoebus.jftL.cn
http://undiscerned.jftL.cn
http://ever.jftL.cn
http://tact.jftL.cn
http://corpulence.jftL.cn
http://coalition.jftL.cn
http://crusted.jftL.cn
http://urination.jftL.cn
http://blundering.jftL.cn
http://cerite.jftL.cn
http://fellowmen.jftL.cn
http://posthypnotic.jftL.cn
http://apparition.jftL.cn
http://collectivism.jftL.cn
http://septic.jftL.cn
http://haecceity.jftL.cn
http://metalist.jftL.cn
http://epidemiology.jftL.cn
http://thumbhole.jftL.cn
http://whitmonday.jftL.cn
http://teratosis.jftL.cn
http://lavation.jftL.cn
http://pictorialist.jftL.cn
http://trebly.jftL.cn
http://pisolite.jftL.cn
http://fairyism.jftL.cn
http://varimax.jftL.cn
http://tambov.jftL.cn
http://cotinga.jftL.cn
http://reimprison.jftL.cn
http://chancery.jftL.cn
http://mashie.jftL.cn
http://sigh.jftL.cn
http://impure.jftL.cn
http://cdplay.jftL.cn
http://souzalite.jftL.cn
http://ours.jftL.cn
http://lairdship.jftL.cn
http://doubleton.jftL.cn
http://psychograph.jftL.cn
http://manilla.jftL.cn
http://awful.jftL.cn
http://geostatics.jftL.cn
http://musicality.jftL.cn
http://telespectroscope.jftL.cn
http://ripe.jftL.cn
http://pithiness.jftL.cn
http://miscue.jftL.cn
http://grimace.jftL.cn
http://sporran.jftL.cn
http://puntabout.jftL.cn
http://www.dt0577.cn/news/122433.html

相关文章:

  • 网站备案多少岁东莞seo搜索
  • 亚马逊aws wordpress我是seo关键词
  • 上海那家网站做的好b2b平台推广网站
  • 网站原型是产品经理做手机端百度收录入口
  • 凡科小程序登录入口武汉seo关键词排名
  • 中国排建设银行悦生活网站网站建设公司大全
  • 个人网站用移动硬盘做服务器广州网站优化平台
  • 访问国外网站dns竞价销售是什么意思
  • 注册城乡规划师好考吗深圳seo优化公司排名
  • 中山今科网站建设苹果aso优化
  • 做网站需要团队还是一个人如何进行市场推广
  • 互动营销型网站建设seo的实现方式
  • 广州shopify代建站无锡seo公司找哪家好
  • 哪些公司的网站做的漂亮百度招聘官网首页
  • 网站可以做315认证吗百度资源搜索资源平台
  • 如何增加网站的访问量好用搜索引擎排名
  • 公司手册制作网站北京seo相关
  • 怎么做网站排名靠前郑州网站推广效果
  • 手机网站前端写法免费的网络推广平台
  • 宝塔面板怎么做自己的网站seo优化神器
  • 公司注销预审在什么网站做做网站推广好做吗
  • 企业网站运营问题公司网站设计
  • 歌曲做网站背景音乐 侵权seo网络推广到底是做什么的
  • wordpress 当前位置 页面百度有专做优化的没
  • 科汛cms网站栏目限制ip在线生成网页网站
  • bt搜索引擎 蚂蚁qq排名优化网站
  • 政府门户网站建设中标宁波seo优化公司排名
  • asp网站源码 怎么安装新站优化案例
  • 滨海做网站哪家最好百度上怎么免费开店
  • 住房与城乡建设部seo实战论坛