Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show current parallelism for hostgroup when printing stats #1926

Closed
djcater opened this issue Feb 16, 2020 · 4 comments
Closed

Show current parallelism for hostgroup when printing stats #1926

djcater opened this issue Feb 16, 2020 · 4 comments

Comments

@djcater
Copy link

djcater commented Feb 16, 2020

When you press Enter during a scan and get the stats output, it would be useful to see what parallelism value Nmap is using for the current hostgroup. As the value is dynamic, it's not obvious what value it is using at any particular time. Something like:

Current sending rates: 170.40 packets / s, 1903.31 bytes / s. Current parallelism: x probes.

This could help in debugging and optimising something like #1907.

@dmiller-nmap
Copy link

The "current parallelism" within the ultrascan engine is called the "congestion window" and is stored in the cwnd member of struct ultra_timing_vals. It is already printed as part of the **TIMING STATS** output at debug level 3 or greater. The calculation of this value is described in Nmap Network Scanning in chapter 5 in the section "Scan Code and Algorithms".

@djcater
Copy link
Author

djcater commented Feb 19, 2020

Thanks @dmiller-nmap. I've now tried with -ddd and can see the cwnd value, but I notice that it only gets printed during the port scan phase.

For me it would be useful to see this during the service scan phase when showing the timing stats there.

Shall I open a new issue specifically mentioning the service scan phase?

@dmiller-nmap
Copy link

Not sure if it's worthwhile for service scan phase. The "ideal parallelism" is calculated once at the start of the scan and does not change during the scan. See #55.

@djcater
Copy link
Author

djcater commented Feb 19, 2020

@dmiller-nmap: My use case is that I typically start a scan with either no debug level, or debug level 1, and therefore don't see the low-level stats including cwnd. If the port scan phase doesn't take that long, but then the service scan parts is taking a very long time, I will interactively increase the debugging level (with the d key), to try and work out what's happening. It would be useful to see the cwnd value at this point, but it's not possible, as it's not printed during the service scan phase, and I can't go back in time and increase the debugging level.

If this small feature was added, then it would be possible, without having to run every scan with debug level 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants