From owner-freebsd-net@FreeBSD.ORG Tue Jun 10 16:29:00 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FB27106567F for ; Tue, 10 Jun 2008 16:29:00 +0000 (UTC) (envelope-from rahman.sazzadur@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by mx1.freebsd.org (Postfix) with ESMTP id D9F9D8FC0A for ; Tue, 10 Jun 2008 16:28:59 +0000 (UTC) (envelope-from rahman.sazzadur@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so1343604ywe.13 for ; Tue, 10 Jun 2008 09:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:mime-version:content-type; bh=GqG4/cZe828cqfhHD0zC8UNgN7nfnJL4Dq12UjNQpHU=; b=PcEe81ctzdaZ0NFHY3RynTkUjOqEcW+SiNc5dhP8C/ZE8nhAC94a4ArBH5skmQD7sZ BQVJXMX2vtEv54julE50cUCO0wu67uUzmShVigyZ7SSY19jbMtte64l8o5Be0o6alJJl 99ulpNGcXBOnq6T9nwPmY4qX3/BiI3tdK1Jq8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:mime-version:content-type; b=GmOMY0tA5kQysGOwjYGMU4+1Mtr8RcAsvFqczlzAwdfVjLFKQcxVOLw80X9ZZMMWfY 9LCW+yW3u0yHHq6QWOiBNz3eCmyi8PDxh+DXIC5hoBfcYaSGcQ/KZ0rwdMwNpl4Z4SBx zq+5i/qcEIMwDTB0yYtOA9N2WGRRfigmZvtjU= Received: by 10.142.211.10 with SMTP id j10mr2138124wfg.197.1213115331938; Tue, 10 Jun 2008 09:28:51 -0700 (PDT) Received: by 10.143.195.10 with HTTP; Tue, 10 Jun 2008 09:28:51 -0700 (PDT) Message-ID: <82bdb5ec0806100928q15e25480k24f88798e12bffc4@mail.gmail.com> Date: Tue, 10 Jun 2008 11:28:51 -0500 From: "sazzadur rahman" To: rrs@cisco.com MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Could not enable SCTP trace: "Sysctl: unknown OID: net.inet.sctp.sctp_logging" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2008 16:29:00 -0000 Hi, Thanks for the suggestion. I am trying to get real time cwnd data via SCTP logging function (SCTP_LOCAL_TRACE_BUF). I could compile the utilities dump_apple_log and prtcwdlog successfully. But I failed to enable logging trace. Below are the steps I have proceeded: 1. Installed FreeBSD 7.0 2. Build a custom kernel cd /usr/src/sys/i386/conf cp GENERIC /root/CUSTOM_KERNEL_9_6 ln -s /root/CUSTOM_KERNEL_9_6 cd /usr/src make buildkernel KERNCONF=CUSTOM_KERNEL_9_6 3. I found opt_sctp.h in /usr/obj/usr/src/sys/CUSTOM_KERNEL_9_6 along with all sctp binaries here. 4. To see SCTP_LOCAL_TRACE_BUF is already defined or not, I executed the following command: Cd /usr/obj/usr/src/sys/CUSTOM_KERNEL_9_6 nm sctputil.o | grep sctp_log_trace And it didn't show me any symbol. That means SCTP_LOCAL_TRACE_BUF is not defined so far. 5. Added the following line in opt_sctp.h #define SCTP_LOCAL_TRACE_BUF 1 6. Run 'make' to compile sctp with SCTP_LOCAL_TRACE_BUF 7. To see SCTP_LOCAL_TRACE_BUF is compiled or not, again, I executed the following command: nm sctputil.o | grep sctp_log_trace 00000130 T sctp_log_trace Hence, I assumed that sctp is built with SCTP_LOCAL_TRACE_BUF. 8. I installed this custom kernel : Make installkernel KERNCONF=CUSTOM_KERNEL_9_6 9. Reboot and load the new kernel. 10. Tried to enable trace point by: Sysctl -w "net.inet.sctp.sctp_logging=0x00000004" But got:( Sysctl: unknown OID: net.inet.sctp.sctp_logging At this point, I guess that SCTP was not successfully built with SCTP_LOCAL_TRACE_BUF and that's why sysctl is unable to find the OID. Do you have any suggestions how can I build SCTP with SCTP_LOCAL_TRACE_BUF successfully? I would appreciate any help in this regard. Best Regards, Md Sazzadur Rahman Graduate Student, School of Computer Science, University of Oklahoma, Norman, Oklahoma, USA -----Original Message----- From: Randall Stewart [mailto:rrs@cisco.com] Sent: Wednesday, April 16, 2008 9:04 AM To: Rahman, Md Sazzadur Cc: freebsd-net@freebsd.org Subject: Re: A query regarding SCTP congestion control Rahman, Md Sazzadur wrote: > Hi, I would like to get the values of SCTP congestion control > algorithm variables (cwnd, ssthresh, flightsize and pba) from any > SCTP based application in runtime for research purpose. Does any API > exist in SCTP for that? Do I need to dig the SCTP code in kernel to > get the values? There is a socket option to get the cwnd. However, I think what you really want is some of the researchish tracing stuff that SCTP provides. You can actually get a real time trace of the cwnd/flight etc via the various logging functions. You basically must compile this as an option.. have to go look at the options.. And then you can either use ktrace (which I don't recommend since it turns on to much overhead in the kernel) or you can use SCTP_LOCAL_TRACE_BUF This will put it into a piece of memory only for SCTP and not turn on all the other ktrace points. After you enable the logging in your compile you must turn on the logging level.. SCTP_CWND_LOGGING_ENABLE woudl be my recommendation. It gives you a real time up/down growth of the cwnd/flight/rwnd I think I wrote a "how to" somewhere.. let me go look.. R > > I will appreciate any help in this regard. > > Best Regards, Md Sazzadur Rahman Graduate Student, School of Computer > Science, University of Oklahoma, Norman, Oklahoma, USA > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, > send any mail to "freebsd-net-unsubscribe@freebsd.org" > -- Randall Stewart NSSTG - Cisco Systems Inc. 803-345-0369 803-317-4952 (cell)