| Solaris |
|
|
The 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 most of these network providers are not yet available.
# 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
# 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
The 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.
The main aims of the network providers are:
Future enhancements and additions to the providers include:
The IP provider was integrated into Solaris Nevada build 93, and OpenSolaris. The official documentation is here: DTrace IP Provider.
The TCP provider is now being prepared for integration, and prototype documentation is available here: DTrace TCP Provider.
The 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,
| Provider | Description |
|---|---|
| gld | This traces the generic LAN device layer, and shows link layer activity such as Ethernet frames. The probes allow frame by frame tracing. |
| arp | This traces ARP and RARP packets. |
| icmp | This traces ICMP packets, and provides the type and code from the ICMP header. |
| ip | This traces high level IP details for IPv4 and IPv6. |
| tcp | This traces the TCP layer, and shows what TCP activity is occuring. |
| udp | This traces UDP events. |
| sctp | This traces SCTP events. |
| socket | This traces the socket layer, close to the application. These probes fire in the same context as the corresponding process, and show data sent to or received from sockets. |
Other providers will be added as required.
The 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.
| probes | args[0] | args[1] | args[2] | args[3] | args[4] | args[5] |
|---|---|---|---|---|---|---|
| gld:::send, gld:::receive | pktinfo_t * | NULL | ipinfo_t | illinfo_t * | etherinfo_t * | |
| ip:::send, ip:::receive | pktinfo_t * | csinfo_t | ipinfo_t * | illinfo_t * | ipv4info_t * | ipv6info_t * |
| tcp:::send, tcp:::receive | pktinfo_t * | csinfo_t * | ipinfo_t * | tcpsinfo_t * | tcpinfo_t * | |
| tcp:::accept-*, tcp:::connect-* | pktinfo_t * | csinfo_t * | ipinfo_t * | tcpsinfo_t * | tcpinfo_t * | |
| tcp:::state-change | NULL | csinfo_t * | tcpsinfo_t * | tcpnsinfo_t * | ||
| tcpf:::send, tcpf:::receive | pktinfo_t * | csinfo_t * | ipinfo_t * | tcpsinfo_t * | tcpfinfo_t * | |
| udp:::send, udp:::receive | pktinfo_t * | csinfo_t * | ipinfo_t * | udpinfo_t * | ||
| udp:::stream-* | pktinfo_t * | |||||
| icmp:::send, icmp:::receive | pktinfo_t * | NULL | ipinfo_t * | illinfo_t * | icmpinfo_t * |
Other probes will be added as required.
The role of the arguments listed above is as follows:
Other arguments will be added as required.
Network stack instrumentation with DTrace will be achieved through two projects, one to create customer-orientated providers, the other for engineer-orintated providers:
The 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:::state-*
tcp:::retransmit
tcp:::timeout-*
tcpf:::send
tcpf:::receive
3. UDP Provider
udp:::send
udp:::receive
udp:::stream-*
4. IP Provider
ip:::drop-in
ip:::drop-out
(usr/src/uts/common/inet/ip/ipdrop.c)
5. IP Provider
ip:::request
ip:::deliver
6. 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;
7. Socket Provider
socket:::send
socket:::receive
8. ICMP Provider
icmp:::send
icmp:::receive
9. ARP Provider
arp:::send
arp:::receive
10. SCTP Provider
sctp:::send
sctp:::receive
11. GLD Provider
gld:::send
gld:::receive
12. TCP/UDP connection ids
/connfs
Dropped from the list:
13. DTrace Enhancements
write() action
msgdcopy() action
Task 13 would allow a DTrace script to output an RFC 1761 file for reading using snoop or wireshark. A prototype was written, but work has been halted in favour of the other tasks in the plan. Snoop is more suitable for capturing packet data on high speed networks.
Many 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.
Ongoing testing of the network providers will be needed for maintaining their accuracy. It is expected to be achieved through two forms of testing:
Some of the network obserability problems that this provide will solve include:
This 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: 27-Aug-2008
Terms of Use
|
Privacy
|
Trademarks
|
Copyright Policy
|
Site Guidelines
|
Site Map
|
Help
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.
© 2012, Oracle Corporation and/or its affiliates.