ping

Error in PHP function

可紊 提交于 2019-12-11 16:25:43
问题 I have this little script, which should ping the IPs in the $hosts_to_ping array. This PHP is called with JavaScript in the index.html. But something is wrong, because the $rval is always 1 (which mean the host is unreachable). But I know that the first two host are alive. So I print the $res variable, and I see the message: Need to give the IP . I don't understand why it doesn't replace the $host variable to the actual IP address in the function. <?php function ping($host) { exec(sprintf(

Hyperledger Composer CLI Ping to a Business Network returns AccessException

岁酱吖の 提交于 2019-12-11 10:45:21
问题 Im trying to learn Hyperledger Composer but seems to be a relatively new technology, i mean there are few tutorials and few solutions to a lot of questions, tutorial does not mention possible error case when following the commands and which means there are is also no solution for those errors. I have joined the composer channel in their community chat, looks like its running in Discord or something, and asked the same question without a response, i have a better experience here in SO. This is

Modify shell script to monitor/ping multiple ip addresses

核能气质少年 提交于 2019-12-11 08:51:51
问题 Alright so I need to constantly monitor multiple routers and computers, to make sure they remain online. I have found a great script here that will notify me via growl(so i can get instant notifications on my phone) if a single ip cannot be pinged. I have been attempting to modify the script to ping multiple addresses, with little luck. I'm having trouble trying to figure out how to ping a down server while the script keeps watching the online servers. any help would be greatly appreciated. I

ping in monotouch

半腔热情 提交于 2019-12-11 06:49:54
问题 I'm wondering why does some monotouch features works well in simulator but fails on real device? the same Ping class. it works perfectly from simulator but fails on the device. What is the difference? it there a way to make it work on device? More over, I've found this article on how to implement ping in mac OS: http://developer.apple.com/library/mac/#samplecode/SimplePing/Listings/SimplePing_m.html#//apple_ref/doc/uid/DTS10000716-SimplePing_m-DontLinkElementID_5 will it be possible to port

Ping test - display message if fail

自古美人都是妖i 提交于 2019-12-11 05:25:39
问题 I wish to run a script at logon each day to test if a PC on the local network is online or not. A message should only be displayed if the PC is offline. For test purposes using a batch file the closest I have got is this - @echo off ping -n 1 192.168.0.6 >nul &&( START CMD /C "ECHO online && PAUSE" )||( START CMD /C "ECHO offline && PAUSE" ) which opens a window relative to the 'online' message but if I change the IP address to an incorrect one I still get the same message box. In case it is

Batch ping a list of computer names and write the results to file

假装没事ソ 提交于 2019-12-11 04:38:42
问题 The code below will write the computer name and ip address to file, but I would like it to also write the name of the computers it cannot ping with a fail next to it. I have no idea how I would modify the batch file to do this. @echo off Echo Pinging list... set ComputerList=list.txt Echo Computername,IP Address>Final.csv setlocal enabledelayedexpansion for /f "usebackq tokens=*" %%A in ("%ComputerList%") do ( for /f "tokens=3" %%B in ('ping -n 1 -l 1 %%A ^|findstr Reply') do ( set IPadd=%%B

address.isReachable won't discover all nodes on a network

≡放荡痞女 提交于 2019-12-11 04:20:59
问题 I have trimmed my code down to the bare essentials, its pretty simple and straight forward. I have the following code: public ArrayList<Node> getNodes() throws IOException { ArrayList<Node> nodes = new ArrayList<Node>(); StringBuffer root = new StringBuffer(InetAddress.getLocalHost().getHostAddress()); while(!root.toString().endsWith(".")) root.deleteCharAt(root.length() - 1); //^^ this code gets the ip, for ex 127.0.0.1, and trims the last number, to make it //^^ 127.0.0. <-- see the

Large amount of pings in async task - getting Exception “An asynchronous call is already in progress.”

随声附和 提交于 2019-12-11 03:56:04
问题 I posted a previous question about this, I found a sort of working method using threads - but it was causing reliability issues when variables were rewritten between threads. I was pointed towards using ping async and tasks, but I'm getting the following exception: Error: System.InvalidOperationException: An asynchronous call is already in progress. It must be completed or canceled before you can call this method. That points specifically to the "await PingAsync(HostList)" and "await Task

Getting Respond Time from Ping Command

北城余情 提交于 2019-12-11 03:32:31
问题 I'm trying to create a batch file that will ping a certain server and will only display the respond time. I don't mind if value is stored in a variable or not. If you do a normal ping you get: Reply from <hostname/server>: bytes=#byte_value time=#time_value TTL=#TTL_value And I only want: #time_value I don't know if i need to use particular tokens or use findstr for the time value. I have failed every attempts so far. Thanks in advance 回答1: From command line: ==>ping -4 -n 1 google.com