Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jun 2008 11:28:51 -0500
From:      "sazzadur rahman" <rahman.sazzadur@gmail.com>
To:        rrs@cisco.com
Cc:        freebsd-net@freebsd.org
Subject:   Could not enable SCTP trace: "Sysctl: unknown OID: net.inet.sctp.sctp_logging"
Message-ID:  <82bdb5ec0806100928q15e25480k24f88798e12bffc4@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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 <or> 803-317-4952 (cell)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?82bdb5ec0806100928q15e25480k24f88798e12bffc4>