Script to configure sFlow version 5 using SNMP

From: Peter Phaal (
Date: 10/15/03

  • Next message: Peter Phaal: "Exporting CPU/memory utilization"

    A new script has been added to the sFlow Version 5 tools:

    The "sflowenable" script provides a simple command line interface to the
    sFlow version 5 MIB. This script provides a useful way to send sFlow
    information to scripts and applications that can receive sFlow datagrams,
    but which do not yet support the sFlow MIB. The script can also be useful
    for testing new implementations of the sFlow MIB.

    The usage string for the script is as follows:

    Usage: ./sflowenable switch community receiver [port] [rate] [interval]
        switch, IP address of sFlow enabled switch/router
        community, SNMP community string
        receiver, destination IP address for sFlow datagrams
        port, destination UDP port for sFlow datagrams (default=6343)
        rate, packet sampling rate (default=512)
        interval, counter polling interval (default=60)
        timeout, number of seconds to maintain sampling (default=3600)
        force, 0 = respect existing reservations, 1 = force settings
    Note: Setting timeout to 0 stops sampling and frees resources

    For example, the command:

    ./sflowenable public

    would configure the switch, to send sflow datagrams to a receiver
    on using the IANA assigned sFlow port (UDP port 6343). To verify
    that the sFlow packets are being sent, you could run sflowtool on the
    receiver box (


    Peter Phaal
    InMon Corp.

    This archive was generated by hypermail 2.1.4 : 10/15/03 PDT