目录
  • 初识PsTools
  • psping
    • 1.使用ICMP ping
    • 2.使用TCP ping
    • 3.延迟测试
    • 4.带宽测试
    • 5.同功能的tcping工具
  • 总结

初识PsTools

    在工作中我们都会想探测某个IP是否能通,基本上都使用过ping命令,但是某些服务器禁用了ping,而且有些时候也想探测某个IP的某个端口是否能通。之前的我一般都是用“telnet ip port”,但是我发现一个不好的体验就是没啥明显的结果,不通的时候会超时要等一下下,通的时候也没啥友好的提示。所以就搜到了【PStools下载】,里面的“psping”命令就很适合我这个要求。
    PsTools是一款非常好用的远程管理工具应用软件,PsTools软件为用户提供了非常强大的功能,支持远程打开文件、终止进程、关闭重启计算机等。非常的实用。

其中包含的工具简介如下:

命令名 命令用途
PsExec 远程执行进程
PsFile 显示远程打开的文件
PsGetSid 显示计算机或用户的 SID
PsInfo 列出有关系统的信息
PsKill 按名称或进程 ID 终止进程
PsList 列出有关进程的详细信息
PsLoggedOn 查看在本地通过资源共享(包含所有资源)登录的用户
PsLogList 转储事件日志记录
PsPasswd 更改帐户密码
PsService 查看和控制服务
PsShutdown 关闭并重新启动(可选)计算机
PsSuspend 暂停进程
PsUptime 最后重启后系统运行的时间
psping ICMP Ping、TCP Ping、延迟测试、带宽测试

psping

    下面是“psing -?”查看的帮助信息

PsPing v2.10 - PsPing - ping, latency, bandwidth measurement utility
Copyright (C) 2012-2016 Mark Russinovich
Sysinternals - www.sysinternals.comPsPing implements Ping functionality, TCP ping, UDP/TCP latency, and UDP / TCP
bandwidth measurement.Help usage: psping -? [i|t|l|b]-? i   Usage for ICMP ping.-? t   Usage for TCP ping.-? l   Usage for latency test.-? b   Usage for bandwidth test.-nobanner   Do not display the startup banner and copyright message.

1.使用ICMP ping

    执行“psping -? i

PsPing v2.10 - PsPing - ping, latency, bandwidth measurement utility
Copyright (C) 2012-2016 Mark Russinovich
Sysinternals - www.sysinternals.comICMP ping usage: psping [-t|-n count[s]] [-i interval] [-w count] [-q] [-h [buckets|val1,val2,...]] [-l requestsize[k]] [-6|-4] destination-t    Ping until stopped with Ctrl+C and type Ctrl+Breakfor statistics.-n    Number of pings or append 's' to specify seconds e.g. '10s'.-i    Interval in seconds. Specify 0 for fast ping.-w    Warmup with the specified number of iterations (default is 1).-q    Don't output during pings.-h    Print histogram (default bucket count is 20).If you specify a single argument, it's interpreted as a bucketcount and the histogram will contain that number ofbuckets covering the entire time range of values.Specify a comma-separated list of times to create a customhistogram (e.g. "0.01,0.05,1,5,10").-l    Request size. Append 'k' for kilobytes.-4    Force using IPv4.-6    Force using IPv6.For high-speed ping tests use -q and -i 0.

执行psping -4 -n 10 -w 2 -h 10 www.baidu.com

  • -4 代表强制使用IPv4联机
  • -n 代表正式ping包的个数,或者定义使用秒s作为单位
  • -w 代表热身ping包的个数,即正式测试前先进行多少次热身测试连接
  • -h 代表最小与最大延迟毫秒数

另外几个参数解释如下:

  • -i 代表间隔秒数,快ping则设置为0
  • -l 代表ping包大小,默认单位是byte。使用 k为单位代表kilobytes(KB),使用m为单位代表megabytes(MB)
  • -q 代表ping过程中不一个个输出值
  • -t 代表长ping不停
  • -6 代表强制使用IPv6联机

2.使用TCP ping

    执行“psping -? t

PsPing v2.10 - PsPing - ping, latency, bandwidth measurement utility
Copyright (C) 2012-2016 Mark Russinovich
Sysinternals - www.sysinternals.comTCP ping usage: psping [-t|-n count[s]] [-i interval] [-w count] [-q] [-h [buckets|val1,val2,...]] [-6|-4] destination:port-t    Ping until stopped with Ctrl+C and type Ctrl+Breakfor statistics.-n    Number of pings or append 's' to specify seconds e.g. '10s'.-i    Interval in seconds. Specify 0 for fast ping.-w    Warmup with the specified number of iterations (default is 1).-q    Don't output during pings.-h    Print histogram (default bucket count is 20).If you specify a single argument, it's interpreted as a bucketcount and the histogram will contain that number ofbuckets covering the entire time range of values.Specify a comma-separated list of times to create a customhistogram (e.g. "0.01,0.05,1,5,10").-4    Force using IPv4.-6    Force using IPv6.For high-speed ping tests use -q and -i 0.

与ping功能相同的参数定义:

  • -n 代表正式ping包的个数,或者定义使用秒s作为单位
  • -w 代表热身ping包的个数,即正式测试前先进行多少次热身测试连接
  • -h 代表最小与最大延迟毫秒数
  • -i 代表间隔秒数,快ping则设置为0
  • -l 代表ping包大小,默认单位是byte。使用 k为单位代表kilobytes(KB),使用m为单位代表megabytes(MB)
  • -q 代表ping过程中不一个个输出值
  • -t 代表长ping不停
  • -4 代表强制使用IPv4联机
  • -6 代表强制使用IPv6联机

3.延迟测试

    执行“psping -? l

PsPing v2.10 - PsPing - ping, latency, bandwidth measurement utility
Copyright (C) 2012-2016 Mark Russinovich
Sysinternals - www.sysinternals.comTCP and UDP latency usage:
server: psping [-6|-4] [-f] -s address:port
client: psping -l requestsize[k|m] -n count[s] [-r] [-u] [-w count] [-f] [-h [buckets|val1,val2,...]] [-6|-4] destination:port-l    Request size. Append 'k' for kilobytes and 'm' for megabytes.-n    Number of sends/receives. Append 's' to specify seconds e.g. '10s'.-r    Receive from the server instead of sending.-u    UDP (default is TCP).-w    Warmup with the specified number of iterations (default is 5).-f    Open source firewall port during the run.-h    Print histogram (default bucket count is 20).If you specify a single argument, it's interpreted as a bucketcount and the histogram will contain that number ofbuckets covering the entire time range of values.Specify a comma-separated list of times to create a customhistogram (e.g. "0.01,0.05,1,5,10").-4    Force using IPv4.-6    Force using IPv6.-s    Server listening address and port.The server can serve both latency and bandwidth tests and remains active until
you terminate it with Control-C.

执行psping -l 1500 -n 300 -h 10 www.qq.com:443

  • -l 1500代表我发送的数据包大小为每个1500 Bytes,TCP联机在Layer 2 Ethernet中的MTU (Maximum Transmission Unit)通常以1500 Bytes为一个单位
  • -n 300代表放松300个封包

4.带宽测试

PsPing v2.10 - PsPing - ping, latency, bandwidth measurement utility
Copyright (C) 2012-2016 Mark Russinovich
Sysinternals - www.sysinternals.comTCP and UDP bandwidth usage:
server: psping [-6|-4] [-f] -s address:port
client: psping -b -l requestsize[k|m] -n count[s] [-r] [-u [target]] [-i outstanding] [-w count] [-f] [-h [buckets|val1,val2,...]] [-6|-4] destination:port-b    Bandwidth test.-l    Request size. Append 'k' for kilobytes and 'm' for megabytes.-n    Number of sends/receives. Append 's' to specify seconds e.g. '10s'.-r    Receive from the server instead of sending.-u    UDP (default is TCP). Specify target bandwidth in MB/s.-i    Number of outstanding I/Os (default is min of 16 and 2x CPU cores).-w    Warmup for the specified iterations (default is 2x CPU cores).-f    Open source firewall port during the run.-h    Print histogram (default bucket count is 20).If you specify a single argument, it's interpreted as a bucketcount and the histogram will contain that number ofbuckets covering the entire time range of values.Specify a comma-separated list of times to create a customhistogram (e.g. "0.01,0.05,1,5,10").-4    Force using IPv4.-6    Force using IPv6.-s    Server listening address and port.The server can serve both latency and bandwidth tests and remains active until
you terminate it with Control-C.

执行psping -b -l 1500 -n 15000 www.qq.com:443

  • -b 代表将进行带宽测试
  • -l 1500代表使用大小1500Bytes的数据包
  • -n 15000代表使用15000个数据包

执行结果显示我的PC和www.qq.com之间带宽为:526.12 KB/s

5.同功能的tcping工具

    还有一个在禁止ping的情况下可以在windows上部署tcping64.exe或者tcping.exe工具来检测服务器端口是否开放windows下【tcping工具下载】,执行命令“tcping -t www.baidu.com 443

总结

  1. 当发现当前做法有不方便时就是寻找更好解决方案的时候。
  2. 上面这些命令,相信在很多判断网络的场景很常用,以后可以happy了。

学习使用PSTools工具中的psping相关推荐

  1. 【netcat学习】学习使用网络工具中的瑞士军刀——NetCat

    简介 NetCat被称为网络工具中的"瑞士军刀",体积小巧,功能强大.使用netcat可以建立并接受传输控制协议(TCP)和用户数据报协议(UDP)的连接,可以在这些连接上读取数据 ...

  2. 微信小程序学习(三):在微信开发者工具中,使用WeUI前端美化框架,微信小程序

    微信小程序学习(三):在微信开发者工具中,使用WeUI 这里就是将WeUI导入到微信开发者工具中,我并没有使用多少样式,这里只是展示了一下怎么引用 网上有很多的方法,我绝大多数都没看懂,这里就是最简单 ...

  3. 猜测在学习新工具中的作用,一个实例

    1. 当年我参加李YL老师组织的Linux内核源码讨论班,大家坐教室里,人手一本厚厚的<Linux内核源代码情景分析>.多厚呢,上下册,单册800页左右.我们都把书摊在桌面上,举起来太累了 ...

  4. [转载]: 用PsTools工具执行本地/远程Windows管理任务

    本文转载如下连接:SysInternals系列:使用PsTools工具执行本地/远程PC管理任务如果你希望使用命令行连接到远程计算机上执行各种管理工作,如查看远程计算机进程信息.关闭进程.甚至是管理远 ...

  5. PS图片删除需要计算机管理权限,如何使用PsTools工具执行本地/远程PC管理任务

    大多数刚入门的管理员都习惯使用 RDP 或其它类似的工具连接到远程 Windows 中进行图形化管理.而 PowerShell 及 PsTools 等工具可以帮助我们在命令行中执行相当多的管理任务,更 ...

  6. 在 Chrome 开发者工具中调试 node.js

    命令行工具 devtool ,它可以在 Chrome 的开发者工具中运行 Node.js 程序. 下面的记录显示了在一个 HTTP 服务器中设置断点的情况. 该工具基于 Electron 将 Node ...

  7. 树莓派学习笔记——交叉编译工具链

    0.前言 [1]为什么要使用交叉编译     交叉编译工具较快开发的速度.树莓派中已经安装了gcc工具链,可在树莓派中直接编译源代码生成可执行文件.于此同时,PC机上也可使用gcc工具链生成可执行代码 ...

  8. 深度学习在情感分析中的应用

    然语言情感分析简介 情感分析无处不在,它是一种基于自然语言处理的分类技术.其主要解决的问题是给定一段话,判断这段话是正面的还是负面的.例如在亚马逊网站或者推特网站中,人们会发表评论,谈论某个商品.事件 ...

  9. 【深度学习】PyTorch深度学习训练可视化工具visdom

    PyTorch Author:louwill Machine Learning Lab 在进行深度学习实验时,能够可视化地对训练过程和结果进行展示是非常有必要的.除了Torch版本的TensorBoa ...

最新文章

  1. OPENSSL_Uplink(0098E000,07): no OPENSSL_Applink 错误分析
  2. Linux系统状态检测及进程控制--2
  3. vue点击按钮之后置成不可用_2020.03vue常见问题总结
  4. 洛谷 - P3357 最长k可重线段集问题(最大费用最大流+思维建边+拆点)
  5. 深入谷歌开源项目【1】 - Camer2 - 环境搭建和源码编译
  6. 32 配置引脚中断_PCIe的中断机制
  7. 网络知识和交换机的基本配置知识培训
  8. 7-2 搜索树判断 (25 分)
  9. 搭建VSFTPD服务器 虚拟用户认证方式
  10. 每位程序员必读的书单
  11. 3串口多串口双串口以及2串口UART转WiFi多跳通讯实现三
  12. Word中替换手动换行符的处理
  13. tar.bz2 解压命令。
  14. 计算机ppt制作培训心得,PPT课件制作及微课录制心得
  15. Kafka 数据丢失与优化
  16. 软件测试五大特性,《软件测试52讲》——代码测试篇
  17. CSS系列之过渡 transition(CSS3)
  18. 0 基础说一口流利英语,限额免费学!
  19. 手把手教你打造自己的 AI 虚拟主播
  20. Android 集成小米推送

热门文章

  1. 分析:鲸鱼数周“吞食”30亿美元ETH,以太坊或面临流动性危机
  2. BP神经网络算法在MATLAB中的代码
  3. EZ-Cube简易款下载器烧写使用方法
  4. 蔬菜配送小程序开发功能包含什么
  5. impdp导入数据及创建表空间,删除表空间
  6. NOWCODER Cut(贪心)
  7. 坚果U2Pro怎么样好不好,这篇都告诉你
  8. 游戏开发小结——通过射线投射来创建子弹孔
  9. coreldraw粉刷的感觉_关于化妆刷你值得知道的一切 | 女神进化论
  10. matplotlib plot 3d 画图