Although not fundamentally necessary to check return codes in these
spots, preventing the warnings will put new ones into focus.
Signed-off-by: Phil Sutter <phil@nwl.cc>
On Fri, 2014-12-05 at 17:13 -0800, Eric Dumazet wrote:
> I guess we could count number of spaces/fields in both lines,
> and disable the iproute2 trick if counts match.
Something like that maybe ?
misc/nstat.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
Tested-by: Vijay Subramanian <subramanian.vijay@gmail.com>
SNMP counters can be provided as 64bit numbers.
nstat needs to cope with this even if running in 32bit mode.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
New command line flag to output statistics in JSON format.
In our envrionment, we have scripts that parse output of commands.
It is better to use a format supported by existing parsers.
A bunch of misc utils basically reimplement the daemon() function (the
whole fork/close/chdir/etc...). Rather than do that, use daemon() as
that will work under nommu Linux systems that lack fork().
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Fix a bug of generic_proc_open(), so environment variables
(e.g. PROC_NET_SNMP, PROC_NET_RTACCT) can be used to specify procfile.
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>