[Commotion-dev] jsoninfo updates: UUID and /sys/class/net info

Hans-Christoph Steiner hans at guardianproject.info
Wed Jun 6 00:05:22 UTC 2012


jsoninfo is now officially part of olsrd, it was included by default in
the 0.6.3 release today.  In the released version, the whole JSON dump
is wrapped as one big chunk with a timestamp.  I just did some more work
on it for some more experimental stuff.  First, I added the possibility
for setting a UUID in a file, configurable in the jsoninfo section of
olsrd.conf, then if its present, that UUID is included in the outermost
json wrapper:

{
	"data": [all of the requested data],
	"systemTime": 1338940817,
	"uuid": "khjhaskldjfhajksetnrjky41h98uij23u4h"}
}

Next, I started gathering lots of data from /sys/class/net and adding it
to interfaces:

{
"data": [{"interfaces": [
{
	"name": "wlan0",
	"state": "up",
	"mtu": 1472,
	"wireless": true,
	"ipv4Address": "172.29.126.189",
	"netmask": "255.255.0.0",
	"broadcast": "172.29.255.255",
	"addressLength": "6",
	"carrier": "1",
	"dormant": "0",
	"flags": "0x1003",
	"linkMode": "0",
	"macAddress": "00:1b:63:cc:7e:bd",
	"MTU": "1500",
	"operationalState": "unknown",
	"txQueueLength": "1000",
	"collisions": "0",
	"multicastPackets": "0",
	"rxBytes": "4020976",
	"rxCompressed": "0",
	"rxCrcErrors": "0",
	"rxDropped": "0",
	"rxErrors": "0",
	"rxFifoErrors": "0",
	"rxFrameErrors": "0",
	"rxLengthErrors": "0",
	"rxMissedErrors": "0",
	"rxOverErrors": "0",
	"rxPackets": "48842",
	"txAbortedErrors": "0",
	"txBytes": "851046",
	"txCarrierErrors": "0",
	"txCompressed": "0",
	"txDropped": "0",
	"txErrors": "0",
	"txFifoErrors": "0",
	"txHeartbeatErrors": "0",
	"txPackets": "6675",
	"txWindowErrors": "0"}]}
]
,
	"systemTime": 1338940817,
	"uuid": "khjhaskldjfhajksetnrjky41h98uij23u4h"}



More information about the Commotion-dev mailing list