Simon 5 is coming soon!
Simon version 5 is currently in beta testing. It is a massive update, introducing a much-requested feature: syncing the Simon data between multiple Macs, plus a Simon Status service, a Link Checker filter, improved Find filter, iMessage and Speak Error notifiers, a new app icon, and much more.
Important: please note that Simon 5 requires a minimum of macOS 10.12 (Sierra), and will be a paid upgrade from Simon 4 after the beta. Purchasers since September 1, 2020 automatically get a version 5 license (that also works in previous versions).
Re: Port test issues
Hi Justin; thanks for trying Simon. I'm glad you like it so far.
What you need to do is set the result in the service to 1, as that is what the telnet command outputs. What you want is for that to succeed, then the "real" success is determined via the Smart Change Detection feature. It will result in a failure if the Start text isn't found.
So you're almost there. You just need to change the result table in your Edit Service to use 1 for success, and you'll be done.
You can confirm that this works by changing the script to a port that isn't valid; the test will then fail. The Preview will always succeed, but that's only half of the picture.
(In theory you could probably do it all in the script, e.g. by piping the telnet output to grep or similar, but I'm not familiar enough with unix to get that working. If anyone else knows how to do that, I'd be keen to hear from you.)
We'll I got that working,
We'll I got that working, but it takes 1 minute for the test to fail if the host is down. This is because telnet waits 1 minute before timing out. From what I can tell, Simon only runs one test at a time (without a hidden pref). This has the potential to severely slow testing down. Is there any way to fix this?
Re: We'll I got that working
That was true in some previous versions, but version 2.3.4 (and later) can (once again) check any number of tests at once.
There is a small cli app in
There is a small cli app in the Network Utility app called stroke. The syntax for using it is 'stroke address startPort endPort'
It might be better to use then telnet.
/Applications/Utilities/Network\ Utility.app/Contents/Resources/stroke {IP} {Port} {Port}
Smart Detect 'Open TCP Port:'
This fails instantly if the host is up and the port is not open. If the host is down it fails after a minute. This is how the CLI util functions (same as telnet), not a reflection of Simon. However, still not a perfect solution.
This works
http://www.macosxhints.com/article.php?story=20060221135557761
Got it working in csh. Haven't tried to get it to actually work as a perl script.
Even better
Thanks to a comment in the above macosxhint article..
Shell script Service test
Variables: IP, Port
Results: 0 Success, 1 Failure
Script:
nc -zw 3 {IP} {Port}
This will work...
Re: Even better
Excellent. Thanks for that. I have added this to the Simon Extras page, giving you credit for it.