|
|
DTrace Network ProvidersThe following is a design proposal for a collection of DTrace Networking Providers. These providers aim to provide networking observability and troubleshooting information for Solaris users. The first prototype TCP provider was demonstrated at CEC 2006. This document will list the probes that may be made available, their arguments, and link prototypes and examples. Feedback is welcome, please post to dtrace-discuss. NOTE: this is a work in progress, and these network providers are not yet available. Who is talking to my web server?# dtrace -n 'tcp:::receive /args[2]->tcp_dport == 80/ {
@pkts[args[1]->ip_daddr] = count();
}'
dtrace: description 'tcp:::receive' matched 1 probe
^C
192.168.1.8 9
fe80::214:4fff:fe3b:76c8 12
192.168.1.51 32
10.1.70.16 83
192.168.7.3 121
192.168.101.101 192
What ports are people connecting to?# dtrace -n 'tcp:::accept-established { @[args[2]->tcp_dport] = count(); }'
dtrace: description 'tcp:::accept-established' matched 1 probe
^C
79 2
22 14
80 327
ContentsPrototypesThe following prototypes demonstrate older designs than what is described on this main page, however what they demonstrate should still be doable albiet with slightly different probe names and arguments.
AimsThe main aims of the network providers are:
Future enhancements and additions to the providers include:
NewsWork has recently restarted on this project (see dtrace-discuss), with the intent of completing a design for the IP providers, before moving onto other protocols (TCP, UDP, ...). The IP provider details on this page have been updated to reflect recent prototyping. Other provider details (especially TCP) will change as they are reprototyped. ProvidersThe Network provider will be a collection of several DTrace providers, such as ipv4, ipv6 and tcp (there is no monolithic net provider). The proposed providers are,
Other providers will be added as required. ProbesThe following is the master plan for the net providers - what probes could be exported, what their arguments could be, and how they fit together. See the prototype pages for implementation details.
Other probes will be added as required. ArgumentsThe role of the arguments listed above is as follows:
Other arguments will be added as required. PlanNetwork stack instrumentation with DTrace will be achieved through two projects, one to create customer-orientated providers, the other for engineer-orintated providers:
Customer Provider PlanThe following are rough steps for creating a suite of customer-orientated network providers. Each step may be integrated separately.1. IP Provider
ip:::send
ip:::receive
2. TCP Provider
tcp:::send
tcp:::receive
tcp:::accept-*
tcp:::connect-*
tcp:::retransmit
tcp:::state-*
tcp:::timeout-*
sdt:::tcpfuse-*
3. UDP Provider
udp:::send
udp:::receive
udp:::stream-*
4. DTrace Enhancements
write() action
msgdcopy() action
5. IP Provider
ip:::drop-in
ip:::drop-out
(usr/src/uts/common/inet/ip/ipdrop.c)
6. IP Provider
ip:::request
ip:::deliver
7. IP packet ids
ip:::packet-free
perhaps a new mblk_t member: (uint64_t)mblk_t->b_id;
future, any suitible uint64_t: (uint64_t)nifty_t->n_id;
8. Socket Provider
socket:::send
socket:::receive
9. ICMP Provider
icmp:::send
icmp:::receive
10. ARP Provider
arp:::send
arp:::receive
11. SCTP Provider
sctp:::send
sctp:::receive
12. GLD Provider
gld:::send
gld:::receive
13. TCP/UDP connection ids
/connfs
Engineer Provider PlanMany probes have already been integrated into Solaris Nevada for detailed observability of network stack behaviour:
dtrace -ln 'sdt:::ip*' | awk 'BEGIN { OFS=":::" } { print $2,$5 }'
PROVIDER:::NAME
sdt:::ip-ire-del
sdt:::ip-ire-del-origin
sdt:::ip6-physical-out-end
sdt:::ip6-physical-out-end
sdt:::ip6-physical-out-start
sdt:::ip6-loopback-in-end
sdt:::ip6-loopback-in-end
sdt:::ip6-loopback-in-start
sdt:::ip6-loopback-in-start
sdt:::ip6-forwarding-end
sdt:::ip6-forwarding-start
sdt:::ip6-physical-in-end
sdt:::ip6-physical-in-start
sdt:::ip-xmit-incomplete
sdt:::ip-xmit-v4
sdt:::ip-wput-ipsec-bail
sdt:::ip6-loopback-out-end
sdt:::ip6-loopback-out-end
sdt:::ip6-loopback-out-end
sdt:::ip6-loopback-out-start
sdt:::ip6-loopback-out-start
sdt:::ip6-loopback-out-start
sdt:::ip4-loopback-in-end
sdt:::ip4-loopback-in-end
sdt:::ip4-loopback-in-start
sdt:::ip4-loopback-in-start
sdt:::ip4-loopback-out_end
sdt:::ip-xmit-1
sdt:::ip-xmit-2
sdt:::ip4-loopback-out-end
sdt:::ip4-loopback-out-end
sdt:::ip4-loopback-out-end
sdt:::ip4-loopback-out-end
sdt:::ip4-loopback-out-start
sdt:::ip4-loopback-out-start
sdt:::ip4-loopback-out-start
sdt:::ip4-loopback-out-start
sdt:::ip4-dhcpinit-pkt
sdt:::ip4-physical-in-end
sdt:::ip4-physical-in-start
sdt:::ip4-physical-out-end
sdt:::ip4-physical-out-end
sdt:::ip4-physical-out-end
sdt:::ip4-physical-out-end
sdt:::ip4-physical-out-end
sdt:::ip4-physical-out-end
sdt:::ip4-physical-out-end
sdt:::ip4-physical-out-end
sdt:::ip4-physical-out-end
sdt:::ip4-physical-out-start
sdt:::ip4-physical-out-start
sdt:::ip4-physical-out-start
sdt:::ip4-physical-out-start
sdt:::ip4-physical-out-start
sdt:::ip4-physical-out-start
sdt:::ip4-physical-out-start
sdt:::ip4-physical-out-start
sdt:::ip4-physical-out-start
sdt:::ip4-forwarding-end
sdt:::ip4-forwarding-end
sdt:::ip4-forwarding-start
sdt:::ip4-forwarding-start
sdt:::ip-newroute-drop
sdt:::ip6-physical-out_start
In particular, the probes added as part of ipf (eg, sdt:::ip4-physical-out-start) form a good model to build upon.
TestingOngoing testing of the network providers will be needed for maintaining their accuracy. It is expected to be achieved through two forms of testing: 1. Customer testing. The SUNWdtrt (DTrace Test Suite) package will include basic tests that can be initiated from a single host, as with the other tests in SUNWdtrt. These tests will generate simple network traffic which will be traced, confirming that the probes and arguments work as expected. These tests are expected to be frequently executed by engineers as part of existing ongoing testing of SUNWdtrt, and by customers when troubleshooting DTrace. There are limitations with single host testing, and some code paths such as those that require special hardware (crypto accelerator cards, NICs that support LSO, etc.) will usually not be tested. 2. Engineer testing. Using multiple hosts with a variety of different hardware, tests can be executed by hand by generating traffic, tracing details, and confirming that all values are as expected. This will happen during development of each task from the plan and if/whenever bugs are lodged. A test team at Sun with access to a test farm could take this onboard as an ongoing task. SolutionsSome of the network obserability problems that this provide will solve include:
CommentsThis design has been publically open for comments for several months, and discussed a number of times on the dtrace-discuss mailing list. Time is now running out before these probes will begin to be integrated.Updated: 05-Mar-2008 |