Code Monkey home page Code Monkey logo

Comments (8)

highvolt-dev avatar highvolt-dev commented on June 14, 2024 1

@famewolf it designed to short circuit on the first successful ping - it will only perform up to the --ping-count number of pings if they all fail. In other words, it will only reboot if it makes --ping-count attempts and they all fail.

from tmo-monitor.

AndrewPardoe avatar AndrewPardoe commented on June 14, 2024

This worked for me. Note I'm using my fork to test, but it did the right thing (pinged Microsoft 3 times.)

PS C:\src\tmo-monitor> python.exe .\tmo-monitor.py -H "microsoft.com" --ping-count 3 --ping-interval 1
Camping on n41.

Pinging microsoft.com [104.215.148.63] with 32 bytes of data:
Request timed out.

Ping statistics for 104.215.148.63:
    Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),


Pinging microsoft.com [104.215.148.63] with 32 bytes of data:
Request timed out.

Ping statistics for 104.215.148.63:
    Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),


Pinging microsoft.com [104.215.148.63] with 32 bytes of data:
Request timed out.

Ping statistics for 104.215.148.63:
    Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),

Could not ping microsoft.com.
Reboot requested.
Rebooting.

from tmo-monitor.

famewolf avatar famewolf commented on June 14, 2024

from tmo-monitor.

highvolt-dev avatar highvolt-dev commented on June 14, 2024

The output of the ping command itself is slightly confusing because it is not passing an argument to the ping command to specify the number of pings but rather performing separate calls to perform a single ping at a time.

I am considering making a feature to require a certain number or percent of failures or consecutive failures, which would be harder to deal with in a cross-platform way without doing single pings.

from tmo-monitor.

AndrewPardoe avatar AndrewPardoe commented on June 14, 2024

using microsoft DID get me 3 but all 3 failed and I have no idea why as I'm not blocking it...this made the gateway reboot.

I think microsoft.com blocks ICMP requests to avoid DDOS. Google still allows pings to get through because so many people use it as a ping target. If you just trying pinging microsoft.com from a terminal it'll probably time out as well.

from tmo-monitor.

AndrewPardoe avatar AndrewPardoe commented on June 14, 2024

@famewolf, is this issue resolved?

from tmo-monitor.

famewolf avatar famewolf commented on June 14, 2024

from tmo-monitor.

highvolt-dev avatar highvolt-dev commented on June 14, 2024

@famewolf you don't actually need to specify all those flags to increase ping count - you can get by with just using --ping-count 3 or whatever you'd like - the other ping-related settings will inherit defaults. As mentioned above, the feature will only perform repeated pings if the first ping(s) fail(s)

Thanks for the great feature idea and I hope this helps - going to close this issue!

from tmo-monitor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.