ping

If i wanted to extract the ttl and display it from the ping command how could i go about doing that?

China☆狼群 提交于 2021-01-05 10:15:14
问题 Scripting and want to ping devices on a network, tell me if it's reachable or not, and then get the ttl data from the ping and tell me the operating system. Ive tried using the awk command, but I am also new to scripting and may not be using it correctly. for host in $(seq 1 255); do ping -c 1 $sn.$host | grep "Unreachable" &>/dev/null if [ $? -eq 0 ]; then printf "%s\n" "$sn.$host is Offline" fi ping -c 1 $sn.$host | grep "ttl" &>/dev/null if [ $? -eq 0 ]; then printf "%s\n" "$sn.$host is

If i wanted to extract the ttl and display it from the ping command how could i go about doing that?

两盒软妹~` 提交于 2021-01-05 10:14:29
问题 Scripting and want to ping devices on a network, tell me if it's reachable or not, and then get the ttl data from the ping and tell me the operating system. Ive tried using the awk command, but I am also new to scripting and may not be using it correctly. for host in $(seq 1 255); do ping -c 1 $sn.$host | grep "Unreachable" &>/dev/null if [ $? -eq 0 ]; then printf "%s\n" "$sn.$host is Offline" fi ping -c 1 $sn.$host | grep "ttl" &>/dev/null if [ $? -eq 0 ]; then printf "%s\n" "$sn.$host is

If i wanted to extract the ttl and display it from the ping command how could i go about doing that?

流过昼夜 提交于 2021-01-05 10:14:15
问题 Scripting and want to ping devices on a network, tell me if it's reachable or not, and then get the ttl data from the ping and tell me the operating system. Ive tried using the awk command, but I am also new to scripting and may not be using it correctly. for host in $(seq 1 255); do ping -c 1 $sn.$host | grep "Unreachable" &>/dev/null if [ $? -eq 0 ]; then printf "%s\n" "$sn.$host is Offline" fi ping -c 1 $sn.$host | grep "ttl" &>/dev/null if [ $? -eq 0 ]; then printf "%s\n" "$sn.$host is

K8s service not pingable

别等时光非礼了梦想. 提交于 2021-01-04 06:42:12
问题 I have a k8s service/deployment in a minikube cluster (name amq in default namespace: D20181472:argo-k8s gms$ kubectl get svc --all-namespaces NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE argo argo-ui ClusterIP 10.97.242.57 <none> 80/TCP 5h19m default amq LoadBalancer 10.102.205.126 <pending> 61616:32514/TCP 4m4s default kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 5h23m kube-system kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP 5h23m I spun up infoblox/dnstools, and tried

linux tomcat 汤姆凯特

对着背影说爱祢 提交于 2020-11-09 17:32:37
IEDA 启动不了 tomcat . Application Server was not connected before run configuration stop, reason: Unable to ping server at localhost:1099 原因是我tomcat 环境没有配置好.没有指定JAVA_HOME和TOMCAT_HOME 在start.sh 中添加好JAVA_HOME 之后. JAVA_HOME=/usr/local/jdk1.8.0_25 PATH=$JAVA_HOME/bin:$PATH CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar TOMCAT_HOME=/home/MySoft/apache-tomcat-7.0.57 Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program cannot find bin setclasspath sh this file is needed to run this program 在 bin

How to perform a ping-test programmatically on Windows?

早过忘川 提交于 2020-07-22 07:52:13
问题 I'd like to make an IP-test in a C command line program on Windows . Now I'm using the cmd-command in my program with something like this: if(system("ping -c1 8.8.8.8 -w 2 ") == 0){ printf("request successful\n"); return true; }else{ printf("request not successful\n"); return false; } Please note that the code above is just an example: with my program I will try to ping some devices, to see if they are online; if not I know there is a connection issue. Since I need only the connection status

using ping in infinite loop

白昼怎懂夜的黑 提交于 2020-07-08 03:29:09
问题 I want to check the instrument connectivity, continuously. These instruments are connected by LAN. I ping them in an infinite loop. After a few seconds, I'm met with a blue screen and the system restarts. private async void checkingDevice() { await Task.Run(() => { do { Panel selectedPanel; multicastPing.send(); foreach (var device in (Device[])Enum.GetValues(typeof(Device))) { selectedPanel = (Panel)this.Controls.Find((device).ToString(), true)[0]; if (multicastPing.check(device.ToString()))

Using Ping in Parallel in a Bash Script

≯℡__Kan透↙ 提交于 2020-06-10 06:44:16
问题 So I'm trying to ping a range of addresses in parallel in a bash script, count the ones that are alive, and print them out. The script works to ping the addresses and print the live ones out but it always outputs: "There were 0 online hosts and 254 offline hosts" It's not incrementing the ALIVE variable in my code, maybe because it's in a subshell? How could I get around this? Here's what I have right now: #!/bin/bash TOTAL=0 ALIVE=0 if [ $# -eq 3 ] then echo -n 'Live hosts:' for ((i = $2; i

Unable to Use ping6 in mininet

淺唱寂寞╮ 提交于 2020-05-15 17:16:06
问题 I am running a Python script on mininet (virtual machine), which looks like this: def main(): setLogLevel('info') net = Mininet(switch=LinuxBridge, controller=None) h1 = net.addHost('h1', ip=None) h2 = net.addHost('h2', ip=None) s0 = net.addSwitch('s0') s1 = net.addSwitch('s1') s2 = net.addSwitch('s2') r1 = net.addHost('r1', ip=None) r1.cmd('sysctl -w net.ipv6.conf.all.forwarding=1') r2 = net.addHost('r2', ip=None) r2.cmd('sysctl -w net.ipv6.conf.all.forwarding=1') net.addLink(h1, s1) net