Comments (1)
There are two ways to get the statistics without having to parse the logs:
- Using the cmd_* OAM commands.
- Using the captured pcap files on per node basis.
Using OAM commands
❯ ./scripts/wfshell
wfsh#
cmd_config_info cmd_icmp_stats cmd_nd6_stats cmd_node_position cmd_rtsize cmd_tcp_stats help path_upstream
cmd_def_route cmd_ipv6_stats cmd_node_exec cmd_route_table cmd_set_node_position cmd_udp_stats native_shell plot_network_graph
cmd_get_udpapp_stat cmd_mac_stats cmd_node_osname cmd_rpl_stats cmd_start_udp exit path_downstream
To get icmp stats on node 1:
wfsh# cmd_icmp_stats 1
{ "icmp_stats": {
"rcvd": "26",
"sent": "22",
"drop": "0",
"typeerr": "0",
"chkerr": "0"
}
}
To get mac stats on node 1:
wfsh# cmd_mac_stats 1
MCAST_PKTS: rx=22,tx=6
UCAST_PKTS: rx=99,tx=101,tx_succ=101,tx_fail=0,tx_attempt1=101,tx_attempt2=0,tx_attempt3=0
Similarly stats for IPv6/RPL/UDP/ICMP/TCP can be handled by the these OAM commands. These OAM commands depend on the stack's API for statistics. If the stack is not compiled with stats on then it wont work.
Using packet capture
This is a generic and guaranteed way to get the stats. Whitefield creates a pcap on per node basis in pcap/
folder.
To get all RPL packets sent/recv to the node ...
tshark -nr pcap/pkt-0-0.pcap -Y "icmpv6.type==155" | wc -l
To get all RPL packets sent from the node ...
tshark -nr pcap/pkt-0-0.pcap -Y "icmpv6.type==155 and ipv6.addr == fe80::ff:fe00:1" | wc -l
To get all UDP packets sent/recv to the node ..
tshark -nr pcap/pkt-0-0.pcap -Y "udp" | wc -l
Note that I am using node-specific pcap here .. hope this helps.
from whitefield.
Related Issues (20)
- Power Line Communication support in Whitefield HOT 12
- Integration with https://renode.io/ HOT 6
- Injecting new nodes in the network at runtime HOT 2
- Whitefield can't run 2 instances from different users HOT 3
- Running multiple Whitefield instances on the same machine HOT 1
- Support multiple PLC leaf nodes HOT 6
- Support for different RPL objective functions HOT 2
- Pcap doesn't include all packets captured
- Atomic_sync.c file compilation error when activating RIOT HOT 2
- WhiteField is not getting configured on Ubuntu 20.04. HOT 1
- Support for randomized IIDs in AirLine/Stackline
- Add JQ dependency in setp script HOT 1
- setup.sh issues HOT 1
- Whitefield Framework in my application HOT 6
- Whitefield with contiki-ng HOT 44
- NODEID renumbering issue HOT 11
- Multiple BR/udp-servers in parallel HOT 10
- cmake support HOT 1
- Colorize the graph nodes based on nodeExec type HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whitefield.