@section nncp-stat
@example
-$ nncp-stat [options] [-node NODE]
+$ nncp-stat [options] [-pkt] [-node NODE]
@end example
Print current @ref{Spool, spool} statistics about unsent and unprocessed
packets. For each node (unless @option{-node} specified) and each
niceness level there will be printed how many packets (with the total
-size) are in inbound (Rx) and outbound (Tx) queues.
+size) are in inbound (Rx) and outbound (Tx) queues. @option{-pkt} option
+show information about each packet.
@node nncp-toss
@section nncp-toss
@multitable {XXXXX} {XXXX-XX-XX} {XXXX KiB} {link sign} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
@headitem Version @tab Date @tab Size @tab Tarball @tab SHA256 checksum
+@item @ref{Release 5.3.0, 5.3.0} @tab 2019-12-22 @tab 1112 KiB
+@tab @url{download/nncp-5.3.0.tar.xz, link} @url{download/nncp-5.3.0.tar.xz.sig, sign}
+@tab @code{9F093115 506D00E7 2E41ACD6 3F283172 8430E1C2 8BA4A941 FFA3C65D 89AD4ED0}
+
@item @ref{Release 5.2.1, 5.2.1} @tab 2019-12-15 @tab 1109 KiB
@tab @url{download/nncp-5.2.1.tar.xz, link} @url{download/nncp-5.2.1.tar.xz.sig, sign}
@tab @code{983D1A8A 4398C281 76356AE1 C5541124 B0755555 D115063B D1388F85 9C4A6B3E}
@node Installation
@unnumbered Installation
-@set VERSION 5.3.0
+@set VERSION 5.3.1
Possibly NNCP package already exists for your distribution:
@node Новости
@section Новости
+@node Релиз 5.3.1
+@subsection Релиз 5.3.1
+@itemize
+
+@item
+Исправлена работоспособность @option{onlinedeadline} с адресами вызова
+использующими внешние команды (@verb{#"|somecmd"#}).
+
+@item
+@command{nncp-stat} имеет опцию @option{-pkt} показывающую информацию по
+каждому пакету в spool.
+
+@end itemize
+
@node Релиз 5.3.0
@subsection Релиз 5.3.0
@itemize
See also this page @ref{Новости, on russian}.
+@node Release 5.3.1
+@section Release 5.3.1
+@itemize
+
+@item
+Fixed @option{onlinedeadline} workability with call addresses that use
+external commands (@verb{#"|somecmd"#}).
+
+@item
+@command{nncp-stat} has @option{-pkt} option displaying information
+about each packet in the spool.
+
+@end itemize
+
@node Release 5.3.0
@section Release 5.3.0
@itemize
-# $FreeBSD: head/net/nncp/Makefile 517819 2019-11-17 11:51:56Z dmgk $
+# $FreeBSD: $
PORTNAME= nncp
-DISTVERSION= 5.3.0
+DISTVERSION= 5.3.1
CATEGORIES= net
MASTER_SITES= http://www.nncpgo.org/download/
func usage() {
fmt.Fprintf(os.Stderr, nncp.UsageHeader())
fmt.Fprintf(os.Stderr, "nncp-stat -- show queued Rx/Tx stats\n\n")
- fmt.Fprintf(os.Stderr, "Usage: %s [options]\nOptions:\n", os.Args[0])
+ fmt.Fprintf(os.Stderr, "Usage: %s [options] [-pkt] [-node NODE]\nOptions:\n", os.Args[0])
flag.PrintDefaults()
}
+func jobPrint(xx nncp.TRxTx, job nncp.Job) {
+ fmt.Printf(
+ "\t%s %s %s (nice: %s)\n",
+ string(xx),
+ nncp.ToBase32(job.HshValue[:]),
+ humanize.IBytes(uint64(job.Size)),
+ nncp.NicenessFmt(job.PktEnc.Nice),
+ )
+}
+
func main() {
var (
+ showPkt = flag.Bool("pkt", false, "Show packets listing")
cfgPath = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
nodeRaw = flag.String("node", "", "Process only that node")
spoolPath = flag.String("spool", "", "Override path to spool")
if nodeOnly != nil && *node.Id != *nodeOnly.Id {
continue
}
+ fmt.Println(node.Name)
rxNums := make(map[uint8]int)
rxBytes := make(map[uint8]int64)
for job := range ctx.Jobs(node.Id, nncp.TRx) {
job.Fd.Close()
+ if *showPkt {
+ jobPrint(nncp.TRx, job)
+ }
rxNums[job.PktEnc.Nice] = rxNums[job.PktEnc.Nice] + 1
rxBytes[job.PktEnc.Nice] = rxBytes[job.PktEnc.Nice] + job.Size
}
txBytes := make(map[uint8]int64)
for job := range ctx.Jobs(node.Id, nncp.TTx) {
job.Fd.Close()
+ if *showPkt {
+ jobPrint(nncp.TRx, job)
+ }
txNums[job.PktEnc.Nice] = txNums[job.PktEnc.Nice] + 1
txBytes[job.PktEnc.Nice] = txBytes[job.PktEnc.Nice] + job.Size
}
- fmt.Println(node.Name)
var nice uint8
for nice = 1; nice > 0; nice++ {
rxNum, rxExists := rxNums[nice]
}
func (c PipeConn) Close() (err error) {
+ c.r.Close()
err = c.w.Close()
go c.cmd.Wait()
time.AfterFunc(time.Duration(10*time.Second), func() { c.cmd.Process.Kill() })
"crypto/subtle"
"errors"
"io"
- "net"
"os"
"path/filepath"
"sort"
go func() {
state.pings <- struct{}{}
state.wg.Done()
- state.Ctx.LogD("HERE", SDS{}, "PING GOROUTINE QUIT")
}()
}
}
break
}
unmarshalErr := err.(*xdr.UnmarshalError)
- netErr, ok := unmarshalErr.Err.(net.Error)
- if ok && netErr.Timeout() {
+ if os.IsTimeout(unmarshalErr.Err) {
continue
}
if unmarshalErr.ErrorCode == xdr.ErrIO {