From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23327 invoked by alias); 7 Jul 2009 03:03:28 -0000 Received: (qmail 23130 invoked by uid 22791); 7 Jul 2009 03:03:27 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,J_CHICKENPOX_93,SPF_PASS X-Spam-Check-By: sourceware.org Received: from e8.ny.us.ibm.com (HELO e8.ny.us.ibm.com) (32.97.182.138) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jul 2009 03:03:21 +0000 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e8.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n672qQlq019335 for ; Mon, 6 Jul 2009 22:52:26 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n6733H1R197126 for ; Mon, 6 Jul 2009 23:03:17 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n6733HbB027518 for ; Mon, 6 Jul 2009 23:03:17 -0400 Received: from [9.48.80.10] (sig-9-48-80-10.mts.ibm.com [9.48.80.10]) by d01av04.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n6733GZ6027510 for ; Mon, 6 Jul 2009 23:03:17 -0400 Subject: [PATCH 0/6] SNMP tapset From: "David J. Wilder" To: systemtap@sourceware.org Content-Type: text/plain Date: Tue, 07 Jul 2009 03:03:00 -0000 Message-Id: <1246935796.23042.33.camel@wilder.ibm.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2009-q3/txt/msg00038.txt.bz2 This family of tapsets enhances the kernel's implementation of the Simple Network Management Protocol (SNMP) by allowing the user to collect per-socket statistics. SNMP data is collected in the Linux kernel by counting various events occurring in the networking subsystem. Linux provides one counter for each type of event, thus providing a single system-wide collection of network statistics. The probpoints defined in the SNMP group of tapsets allow users to aberrate each SNMP counter into groups of counters. For example, the user may count SNMP events for a single network socket or for a group of sockets. These patch include three new tapset each represents a different set of SMNP MIBS one each for the IP, TCP layers and one for the enhanced linux MIB. I am also submitting a tapscript called tcpipstat.stp that can be used to collect per-socket statistics, it is a bit like like netstat -s on steroids :) In the kernel, SNMP is implemented using a set of macros. A macro is placed in the code in each spot where a management event is to be counted. When I first experimented with writing this tapset I added markers into these SNMP macros, this made writing of the tapset a snap as all probes looked identical. An another advantage of the marker implementation was the ease of maintainability. However, I wanted to create a tool that could be used in current linux distributions so I switched to a kprobes implementation that I am now submitting. I plan to investigating using a tracepoint implementation for a later version. This will require patches to the SMNP macros being accepted up stream, we will see how that goes. Dave...