| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| } | ||
|
|
||
| // For -MtuSizeDetect switch | ||
| class PingMtuDetect : PingStatus |
There was a problem hiding this comment.
Did you consider just having MtuSize being a member of PingStatus but $null if -DetectMtuSize is not specified?
Sorry, something went wrong.
There was a problem hiding this comment.
We can do this, absolutely. However, that means that the default format view with the default behaviour will always have an empty column.
That strikes me as... Odd? Also, given the cmdlet's current behaviour with -MtuSizeDetect which causes the cmdlet to only send / retrieve a single PingReply (vs default behaviour W/O the switch being to send 4 pings instead) it seems a little better to have this as a separate object type imo.
Definitely open to alternate solutions though!
Sorry, something went wrong.
There was a problem hiding this comment.
You've reminded me that Staffan Gustafsson (@powercode) has a PR to only show properties of MeasureInfo objects that have values. We can do the same thing here.
Sorry, something went wrong.
There was a problem hiding this comment.
Can you link me to that? I wasn't aware that the formatter supported this!
Sorry, something went wrong.
There was a problem hiding this comment.
PowerShell/PowerShell#7104, this was merged but was reverted
Sorry, something went wrong.
There was a problem hiding this comment.
So we'd need to put at least those methods into the code base for that to happen. Staffan Gustafsson (@powercode), would you be able to PR just those formatting methods in so that we can make use of them? I'm not familiar with why it was reverted, but I'm sure we could stand to use a feature like that in more places than just here. 🙂
EDIT: Seeing references to a security review. I guess that means we're waiting on a green light from... Paul Higinbotham (@PaulHigin)?
Sorry, something went wrong.
There was a problem hiding this comment.
Steve Lee (@SteveL-MSFT) I looked over these again -- I know you opened an issue for it in the PS repo -- and I realize we're going to hit an issue here; the reason this is fairly easily doable for MeasureInfo is that the format used is a List format, not a Table format. Implementing the same thing in a table format is... problematic at best.
Sorry, something went wrong.
Update RFC per Steve's comments
Update MtuSize property type & give default value
This name conveys the same thing without being excessively long and causing difficulty effectively formatting the output.
|
I'm in general support barring the remainder of the discussion the formatting (which again, I think should be newlined for units and nothing else). |
Sorry, something went wrong.
|
Steve Lee (@SteveL-MSFT) Joey Aiello (@joeyaiello) I was reading documentation for PingReply today... found this: https://docs.microsoft.com/en-us/dotnet/api/system.net.networkinformation.pingreply?view=netframework-4.8#remarks Basically, when we're doing a traceroute (which essentially is done by sending out pings with TTL that increases one at a time so we can determine the hop points) we're always going to get back replies with a status of TtlExpired. This appears to be by design(?), and means that we're always going to have useless values for RoundtripTime, PingOptions, and Buffer. I can work around this by:
This shouldn't be hard to do, but I thought it should be noted. Not sure if it should be in the RFC text itself, let me know if I should add it. This is why the current implementation can't get response times, etc., from the intermediary hops when doing a trace route -- so we have to basically fill in what we can by what we're sending as well as the directly measurable response time. |
Sorry, something went wrong.
There was a problem hiding this comment.
Pointing out a couple things I missed / typo'd in case folks want to comment on the individual items before I incorporate the edits.
Sorry, something went wrong.
|
Rain Sallow (/u/ta11ow) (@vexx32) for the latency times, I think you can just send another ping to the destination along the route |
Sorry, something went wrong.
|
Steve Lee (@SteveL-MSFT) yeah, I considered that... but then we're potentially sending double (or more if the timer ping happens to fail) the number of pings every single time, and that... doesn't seem like a good idea, really? If I stopwatch.Start(); reply = pinger.Ping(); stopwatch.Stop() it should be sufficiently accurate, no? |
Sorry, something went wrong.
Update parameter sets
|
No quorum today, but after applying your latest comments on missing a property or two, I'm personally good to merge. |
Sorry, something went wrong.
|
Sounds good. I'll do a full review of this today or tomorrow. I've been exploring this in code to make sure the RFC makes sense practically and I think there are one or two other things that may need to be updated as well. (Especially regarding my comment that the table formatter can't really handle the variable number of properties as originally suggested.) |
Sorry, something went wrong.
Update RFC & examples
|
Joey Aiello (@joeyaiello) Steve Lee (@SteveL-MSFT) Updated the RFC & included some new examples based on my POC implementation I've been working on. 😄 |
Sorry, something went wrong.
| Test-Connection [-TargetName] <string[]> [-IPv4] [-IPv6] [-ResolveDestination] [-TimeoutSeconds <int>] [-Quiet] [<CommonParameters>] | ||
|
|
||
| # Set 1 | ||
| [-Ping] [-Count <int>] [-Delay <int>] [-Source <string>] [-MaxHops <int>] [-BufferSize <int>] [-DontFragment] |
There was a problem hiding this comment.
This would be the default parameter set, correct?
Sorry, something went wrong.
There was a problem hiding this comment.
Yep!
Sorry, something went wrong.
There was a problem hiding this comment.
i'm not sure why -tcpport is its own parameter set and why it can't just be part of all of the sets.
Sorry, something went wrong.
|
@PowerShell/powershell-committee voted and is ready to accept. James Truher (@JamesWTruher) had a question above, and I had one around whether -Source will actually work cross-platform (it's currently broken on Core), but we're comfortable handling both in code PR. |
Sorry, something went wrong.
|
Sounds good. I have this all implemented in a branch, so I'll send a PR this evening :) James Truher (@JamesWTruher) -TcpPort current implementation is -Quiet by default, with no other option available. I'm not familiar enough with the low level APIs to know whether ping packets sent to other ports make sense in a traceroute context or with determining MTU size? |
Sorry, something went wrong.
|
I would like to see a sequence number added to the basic ping output. If you're testing on-prem targets that return consistent (like EXACTLY) stats, the sequence incrementing on the screen can be the difference between "is the ping still running? did the window freeze?" and "no, it's still running, see the sequence?" Sequence numbers in the pings would also help with looking at the results from a long running ping test. When filtering the return from a long-running test, you could see if the missed pings are grouped or scattered by the sequence numbers. |
Sorry, something went wrong.
|
Unless Rain Sallow (/u/ta11ow) (@vexx32) wants to implement that immediately, I think it's fine to take that up as an issue/PR in PowerShell/PowerShell later. |
Sorry, something went wrong.
|
Joey Aiello (@joeyaiello) simple addition, I'm happy to. ^^ |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Refer to PowerShell/PowerShell#6768 for existing discussion and Committee decision details.