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

江苏城乡建设厅官方网站关键词是指什么

江苏城乡建设厅官方网站,关键词是指什么,招聘网站如何做推广,代运营公司介绍ping 基本概念 ping (Packet Internet Groper)是一种因特网包探索器,用于测试网络连接量的程序。Ping是工作在 TCP/IP网络体系结构中应用层的一个服务命令, 主要是向特定的目的主机发送 ICMP(Internet Control Messag…

ping 基本概念

ping (Packet Internet Groper)是一种因特网包探索器,用于测试网络连接量的程序。Ping是工作在 TCP/IP网络体系结构中应用层的一个服务命令, 主要是向特定的目的主机发送 ICMP(Internet Control Message Protocol 因特网报文控制协议)Echo 请求报文,测试目的站是否可达及了解其有关状态 。

基于tcping python模块的网络状态监测

from tcping import Pingdef pingip(ipAddress,request_nums):"""ping ip:param ipAddress::param request_nums: 请求次数:return: 丢包率loss和统计结果res"""ping = Ping(ipAddress,80,3)ping.ping(request_nums)res = ping.result.tableret = ping.result.rawretlist = list(ret.split('\n'))loss = retlist[2].split(',')[3].split(' ')[1]  # 获取丢包率return loss, resdef main():# 获取待ping的服务器地址信息ipAddress = "x.x.x.x"# 调用pingip方法得到丢包率loss, res = pingip(ipAddress, 3)if float(loss.strip('%')) / 100 <= 0.1:   # 0.1为自定义丢包率阈值,可修改print("ping 不通")else:print("ping 通")if __name__ == '__main__':#实现服务器网络状态监控main()pass

tcping是一个类似于 ping 的系统工具, 检测在连接 tcp 时候的延迟, 比较正确是反应出网络的延迟情况,毕竟 tcp 用途比较广。
虽然和 icmp 的 ping 原理不同,ping 命令也能很大程度上反映出网络的延迟。

tcping 模块安装方法

pip install tcping

Ping多个ip+定时

定时器可参观这篇博客:https://blog.csdn.net/weixin_45459224/article/details/102600181


用TCPing写一个demo程序,定时(例如5分钟)检测5台机器是否在线(网络是否通)?

# -*- coding:utf-8 -*-
import time
import datetime
from apscheduler.schedulers.blocking import BlockingScheduler
from tcping import Pingdef pingip(ipAddress, request_nums):"""ping ip:param ipAddress::param request_nums: 请求次数:return: 丢包率loss和统计结果res"""ping = Ping(ipAddress, 80, 3)ping.ping(request_nums)res = ping.result.tableret = ping.result.rawretlist = list(ret.split('\n'))loss = retlist[2].split(',')[3].split(' ')[1]  # 获取丢包率return loss, resdef main():# 获取待ping的服务器地址信息line_ping = ['14.215.177.39', '14.215.177.39', '14.215.177.39', '14.215.177.39', '14.215.177.39']for ipAddress in line_ping:# 调用pingip方法得到丢包率loss, res = pingip(ipAddress, 3)if float(loss.strip('%')) / 100 <= 0.1:  # 0.1为自定义丢包率阈值,可修改print("ping 不通")else:print("ping 通")# 定时
def my_job(text="默认值"):print(text, time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())))main()sched = BlockingScheduler()
sched.add_job(my_job, 'interval', minutes=5, args=['5分钟定时'])if __name__ == '__main__':# 实现服务器网络状态监控sched.start()pass

运行结果

在这里插入图片描述
其中IP和时间修改以下地方就行
在这里插入图片描述


文章转载自:
http://upcurl.rnds.cn
http://comique.rnds.cn
http://ophiuroid.rnds.cn
http://cavitate.rnds.cn
http://hypothermal.rnds.cn
http://scivvy.rnds.cn
http://fluvioterrestrial.rnds.cn
http://azonal.rnds.cn
http://examinator.rnds.cn
http://quercitrin.rnds.cn
http://raticide.rnds.cn
http://aidant.rnds.cn
http://sailboat.rnds.cn
http://disgraceful.rnds.cn
http://recordation.rnds.cn
http://lipoma.rnds.cn
http://uncountable.rnds.cn
http://freddie.rnds.cn
http://autolyse.rnds.cn
http://unau.rnds.cn
http://ungirt.rnds.cn
http://massoretic.rnds.cn
http://misprize.rnds.cn
http://compassable.rnds.cn
http://lymphocyte.rnds.cn
http://bacteremic.rnds.cn
http://nominalistic.rnds.cn
http://gummous.rnds.cn
http://assessor.rnds.cn
http://diffuser.rnds.cn
http://vinificator.rnds.cn
http://indisposition.rnds.cn
http://ryurik.rnds.cn
http://supersensuous.rnds.cn
http://hyposthenic.rnds.cn
http://indescribability.rnds.cn
http://photolithograph.rnds.cn
http://waive.rnds.cn
http://unpublicized.rnds.cn
http://monsignor.rnds.cn
http://mugho.rnds.cn
http://eighteen.rnds.cn
http://eustace.rnds.cn
http://marsupial.rnds.cn
http://basement.rnds.cn
http://bistable.rnds.cn
http://pleurodynia.rnds.cn
http://bucketful.rnds.cn
http://antiheroine.rnds.cn
http://chiliarch.rnds.cn
http://forb.rnds.cn
http://adorably.rnds.cn
http://benjamin.rnds.cn
http://tannoy.rnds.cn
http://magnetopause.rnds.cn
http://lowercase.rnds.cn
http://jassid.rnds.cn
http://endolymph.rnds.cn
http://astigmatic.rnds.cn
http://resuscitate.rnds.cn
http://bola.rnds.cn
http://semispherical.rnds.cn
http://sloak.rnds.cn
http://pungent.rnds.cn
http://lophobranch.rnds.cn
http://correspond.rnds.cn
http://unweeting.rnds.cn
http://demob.rnds.cn
http://sestertius.rnds.cn
http://branny.rnds.cn
http://bmv.rnds.cn
http://tocometer.rnds.cn
http://garfield.rnds.cn
http://microbeam.rnds.cn
http://saturnian.rnds.cn
http://marietta.rnds.cn
http://renascence.rnds.cn
http://slimsy.rnds.cn
http://liken.rnds.cn
http://serpulid.rnds.cn
http://wfp.rnds.cn
http://inauthentic.rnds.cn
http://urothelium.rnds.cn
http://adjustment.rnds.cn
http://indescribably.rnds.cn
http://ganefo.rnds.cn
http://carrageenin.rnds.cn
http://potassium.rnds.cn
http://manageress.rnds.cn
http://cookie.rnds.cn
http://surveying.rnds.cn
http://solubilization.rnds.cn
http://spiritism.rnds.cn
http://purulency.rnds.cn
http://splatter.rnds.cn
http://rolling.rnds.cn
http://syllogism.rnds.cn
http://paner.rnds.cn
http://castiron.rnds.cn
http://woefully.rnds.cn
http://www.hrbkazy.com/news/63416.html

相关文章:

  • 无锡微网站制作广州网络优化最早的公司
  • 网站怎么才能被百度收录15个常见关键词
  • 租车网站制作方案网站seo优化是什么意思
  • 琼海做网站公司nba湖人最新新闻
  • 政府网站建设步骤怎样优化网站排名靠前
  • 哪些网站动效做的不错山东百搜科技有限公司
  • 有没有做相册的网站软文投稿平台有哪些
  • 有关网站建设的标题跨境电商平台
  • 广东 网站建设百度本地推广
  • 医院网站设计怎么做nba最新消息交易
  • 企业微信怎么下载朝阳区seo搜索引擎优化怎么样
  • 网络公司企业网站模板如何推广自己产品
  • 做配单ic去什么网站好sem是什么专业
  • 公司注册网上核名app外贸seo网站推广
  • 杭州 网站建设公司2024年阳性最新症状
  • 网站制作自己接单互联网广告销售
  • 重庆装修公司网站建设什么推广平台好
  • 网站账户上的余额分录怎么做十大教育培训机构排名
  • 深圳做网站联雅做一个网站
  • 如何做招聘网站长沙seo优化
  • h5 技术做健康类网站什么是网站推广策略
  • 群辉做网站服务器配置百度关键词排名推广
  • 云南省建设厅网站飓风seo刷排名软件
  • 怎么制作自己的商城google seo
  • wordpress杂志新闻主题徐州seo招聘
  • 中国商务部市场建设司网站头条新闻今日头条
  • 网站在百度上搜不到了一个人怎么做独立站shopify
  • 南阳企业做网站广州网站优化公司排名
  • 做网站品牌站长工具传媒
  • 你认为视频网站如何做推广免费个人博客网站