ping

常用网络命令

夙愿已清 提交于 2019-12-10 19:58:09
常用网络命令 配置ip地址 ifconfig命令 ping命令 netstat命令 write命令 wall命令 mail命令 配置ip地址 配置ip地址有两种方法: setup 工具 vi /etc/sysconfig/network-scripts/ifcfg-eth0 重置UUID(唯一识别符) [root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 删除 MAC 地址行 [root@localhost ~]# rm -rf /etc/udev/rules.d/70-persistent-net.rules 删除 MAC 地址 和UUID 绑定文件 [root@localhost ~]# reboot 重启 Linux ifconfig命令 ifconfig 命令最主要的作用就是查看IP 地址,直接输入ifconfig命令即可 命令名称 ifconfig 英文原意 configure a network interface 所在路径 /sbin/ifconfig 执行权限 超级用户 功能描述 配置网络接口 ping命令 ping 是常用的网络命令,主要通过ICMP协议进行网络探测,测试网络中的主机的通信情况 命令名称 ping 英文原意 send ICMP ECHO_REQUEST to network

isReachable always returning true regardless of what the IP address is

懵懂的女人 提交于 2019-12-10 18:25:23
问题 So I have been using isReachable to "ping" an address in my java code. This block of code is what everyone seems to use: try { InetAddress address = InetAddress.getByName("172.16.2.0"); // Try to reach the specified address within the timeout // periode. If during this periode the address cannot be // reach then the method returns false. boolean reachable = address.isReachable(10000); System.out.println("Is host reachable? " + reachable); } catch (Exception e) { e.printStackTrace(); } My

System.Net.NetworkInformation.Ping crashing

我与影子孤独终老i 提交于 2019-12-10 17:36:31
问题 So, I have a site with over 600 devices. I'm trying to ping them all one by one using the standard .NET ping class. For some reason, this thread is crashing - it just stops responding after a few days. All it does is ping devices on the network. We're using Microsoft Windows Server 2008 R2. Is there any problems with the .NET ping class? I also seem to be experiencing memory leaks which I'm guessing is due to the pinging. Should I just write a win32 ping dll to do the job for me or am I doing

IPv4 ping命令

自古美人都是妖i 提交于 2019-12-10 17:23:59
IPv4 ping命令 给一台 Linux 主机分配了一个 IPv4 的 IP地址,如何使用 ping命令 确定该 IP地址 能否 ping 通呢? 1、查看主机的 IPv4 的 IP地址信息 命令如下: ip addr | grep net 通过命令可以看到,该主机的 IPv6 的IP地址为: 192.168.254.117 2、使用 ping 命令 进行 ping IPv4 的 IP 命令如下: ping 192.168.254.117 执行命令后,可以看到该 IPv4 的 IP地址 可以 ping通。 PS: 强烈推荐 一款个人常用的 SSH客户端神器 MobaXterm ,比 Xshell 更好用,请参考如下博文: https://www.cnblogs.com/miracle-luna/p/12008869.html 如何 ping IPv6 的 IP地址 ,请参考如下博文: https://www.cnblogs.com/miracle-luna/p/12017740.html 希望能帮到大家,谢谢! 来源: https://www.cnblogs.com/miracle-luna/p/12017857.html

IPv6 ping命令

落花浮王杯 提交于 2019-12-10 17:14:42
IPv6 ping命令 给一台 Linux 主机分配了一个 IPv6 的 IP地址,如何使用 ping命令 确定该 IP地址 能否 ping 通呢? 1、查看主机的 IPv6 的 IP地址信息 命令如下: ip addr | grep net6 通过命令可以看到,该主机的 IPv6 的IP地址为: 2408:877e:31::7 2、使用 ping6 命令 进行 ping IPv6 的 IP 命令如下: ping6 2408:877e:31::7 执行命令后,可以看到该 IPv6 的 IP地址 可以 ping通。 PS: 强烈推荐一款个人常用的 SSH客户端神器 MobaXterm ,请参考如下博文: https://www.cnblogs.com/miracle-luna/p/12008869.html 希望能帮到大家,谢谢! 来源: https://www.cnblogs.com/miracle-luna/p/12017740.html

C# perform a TNSPing programmatically

心不动则不痛 提交于 2019-12-10 15:39:48
问题 Is it possible to perform a TNSPing on an Oracle Database programmatically? I'm aware I could probably call the TNSPing program and parse any output generated but I'm looking for a more robust method of handling the database TNS Ping. Having seen the Ping class on MSDN, I tried to use the example code found, but I think I would need some way to resolve the TNS name into an actual IP address for this method to work. Is this possible? 回答1: This Forum seems to suggest that attempting to use

Pinging computer by name in Java

偶尔善良 提交于 2019-12-10 14:54:56
问题 I am in the process of writing a simple program that extracts computer names from MySQL Database then stores those names into a String array list (this part works fine). After that I wrote a class and a method that takes a String as a parameter (which will be the computer name) and tries to ping it. Here is the code for that class: public class Ping { public void pingHost(String hostName) { try { InetAddress inet = InetAddress.getByName(hostName); boolean status = inet.isReachable(5000); if

ping with php phar

筅森魡賤 提交于 2019-12-10 11:58:43
问题 i want to use this script to do ping without using the exec(); or the commands that similar to it. the problem is i get these errors: Strict Standards: Non-static method Net_Ping::factory() should not be called statically in C:\xampp\htdocs\test.php on line 3 Strict Standards: Non-static method Net_Ping::_setSystemName() should not be called statically in C:\xampp\php\PEAR\Net\Ping.php on line 141 Strict Standards: Non-static method Net_Ping::_setPingPath() should not be called statically in

Why is CapEff all zeros in /proc/$PID/status

て烟熏妆下的殇ゞ 提交于 2019-12-10 10:45:40
问题 I removed the setuid bit from the ping binary and added cap_net_raw+p instead as follows: $ chmod 755 /bin/ping $ setcap cap_net_raw+p /bin/ping Then I ran ping in one terminal and checked the /proc/$PID/status of the running process from another: $ ps aux | grep ping user 5468 0.0 0.0 14948 1792 pts/20 S+ 11:14 0:00 ping www.google.com user 5471 0.0 0.0 14224 896 pts/2 S+ 11:14 0:00 grep --color=auto ping $ cat /proc/5468/status | grep Cap CapInh: 0000000000000000 CapPrm: 0000000000002000

How to ping an ip and get only the ms in the Tk with Python?

我的未来我决定 提交于 2019-12-10 10:38:43
问题 I want to make a little tk app that continuous ping an ip and only show the MS, like, "10ms" how could I do? 回答1: If you want to use Windows ping , you'll have to parse the output from the command line. This is very specific, but should work: import os while(1): ping = os.popen('ping www.google.com -n 1') result = ping.readlines() msLine = result[-1].strip() print msLine.splot(' = ')[-1] 回答2: To continuously ping an IP os.system("ping -t 192.168.1.1") 来源: https://stackoverflow.com/questions