[peerdist] Add "peerstat" command for reporting peer statistics Each PeerDist-encoded downloaded file typically results in several thousand individual block downloads, each of which may end up being attempted as a classic retrieval from a discovered peer, a retrieval from an optimistically assumed peer, a retrieval from a hosted cache server, a read from a local filesystem cache, and/or a raw range request from the origin server. The sheer volume of activity and the number of errors expected in normal operation (e.g. for blocks missing from a particular peer) make it difficult to use debug messages to gain insights into behaviour, since per-event debug messages are either too rare to be informative or so frequent that the overhead of printing the messages alters the overall behaviour. Gather error statistics separately for each category of individual block download and for each discovery address family, along with the most useful summary counts (e.g. for total blocks, total number of discovery attempts, etc). Estimate the total number of peers as being the highest number of peers ever discovered for a segment within a single address family. (We count per address family to avoid double-counting a single peer that advertises itself using both IPv4 and IPv6 addresses.) Report the number of discovery attempts independent of address family (i.e. one discovery attempt means N transmitted packets, one sent via each of the N supported address families), since that number is then meaningfully comparable against the total number of blocks. Report second and subsequent discovery attempts separately from initial discovery attempts, so that the number of discovery attempts can be compared against the number of blocks to determine how many discoveries were elided completely. Separate the discovery reply statistics by address family, not because there is anything useful in knowing whether a particular error happened for IPv4 versus IPv6, but because it avoids the need to reason about whether or not a displayed result needs to be mentally halved in order to be compared against the corresponding discovery attempt statistic. Signed-off-by: Michael Brown <mcb30@ipxe.org>
iPXE is the leading open source network boot firmware. It provides a full PXE implementation enhanced with additional features such as:
boot from a web server via HTTP or HTTPS,
boot from an iSCSI, FCoE, or AoE SAN,
control the boot process with a script,
You can use iPXE to replace the existing PXE ROM on your network card, or you can chainload into iPXE to obtain the features of iPXE without the hassle of reflashing.
iPXE is free, open-source software licensed under the GNU GPL (with some portions under GPL-compatible licences).
You can download the rolling release binaries (built from the latest commit), or use the most recent stable release.
For full documentation, visit the iPXE website.