lkml.org 
[lkml]   [2007]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH -mm 8/9] netconsole: Update documentation for dynamic reconfigurability
    From: Satyam Sharma <ssatyam@cse.iitk.ac.in>

    [8/9] netconsole: Update documentation for dynamic reconfigurability

    Add myself to parties interested in receiving bug reports, and give lots
    of examples. Also fix some whitespace inconsistencies I introduced earlier.

    Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in>
    Cc: Keiichi Kii <k-keiichi@bx.jp.nec.com>
    Cc: Takayoshi Kochi <t-kochi@bq.jp.nec.com>

    ---

    Documentation/networking/netconsole.txt | 70 +++++++++++++++++++++++++++++++-
    1 file changed, 68 insertions(+), 2 deletions(-)

    ---

    diff -ruNp a/Documentation/networking/netconsole.txt b/Documentation/networking/netconsole.txt
    --- a/Documentation/networking/netconsole.txt 2007-07-04 03:12:25.000000000 +0530
    +++ b/Documentation/networking/netconsole.txt 2007-07-04 12:24:44.000000000 +0530
    @@ -3,6 +3,10 @@ started by Ingo Molnar <mingo@redhat.com
    2.6 port and netpoll api by Matt Mackall <mpm@selenic.com>, Sep 9 2003

    Please send bug reports to Matt Mackall <mpm@selenic.com>
    +and Satyam Sharma <satyam.sharma@gmail.com>
    +
    +Introduction:
    +=============

    This module logs kernel printk messages over UDP allowing debugging of
    problem where disk logging fails and serial consoles are impractical.
    @@ -13,6 +17,9 @@ the specified interface as soon as possi
    capture of early kernel panics, it does capture most of the boot
    process.

    +Sender and receiver configuration:
    +==================================
    +
    It takes a string configuration parameter "netconsole" in the
    following format:

    @@ -38,7 +45,7 @@ It also supports logging to multiple rem
    parameters for the multiple agents separated by semicolons and the
    complete string enclosed in "quotes", thusly:

    -modprobe netconsole netconsole="@/,@10.0.0.2/;@/eth1,6892@10.0.0.3/"
    + modprobe netconsole netconsole="@/,@10.0.0.2/;@/eth1,6892@10.0.0.3/"

    Built-in netconsole starts immediately after the TCP stack is
    initialized and attempts to bring up the supplied dev at the supplied
    @@ -46,6 +53,64 @@ address.

    The remote host can run either 'netcat -u -l -p <port>' or syslogd.

    +Dynamic reconfiguration:
    +========================
    +
    +Dynamic reconfigurability is a useful addition to netconsole that enables
    +remote logging targets to be dynamically added, removed, or have their
    +parameters reconfigured at runtime from a configfs-based userspace interface.
    +
    +To include this feature, select CONFIG_NETCONSOLE_DYNAMIC when building the
    +netconsole module (or kernel, if netconsole is built-in).
    +
    +Some examples follow (configfs is mounted at the /config mountpoint, say).
    +
    +To add a remote logging target (target names can be arbitrary):
    +
    + cd /config/netconsole/
    + mkdir target1
    +
    +Note that newly created targets have default parameter values (as mentioned
    +above) and are disabled by default -- they must first be enabled by writing
    +"1" to the "enabled" attribute (usually after setting parameters accordingly)
    +as described below.
    +
    +To remove a target:
    +
    + rmdir /config/netconsole/othertarget/
    +
    +The interface exposes these parameters of a netconsole target to userspace:
    +
    + id Unique identifier for this target (read-only)
    + enabled Is this target currently enabled? (read-write)
    + dev_name Local network interface name (read-only)
    + local_ip Source IP address to use (read-write)
    + remote_ip Remote agent's IP address (read-write)
    + local_port Source UDP port to use (read-write)
    + remote_port Remote agent's UDP port (read-write)
    + local_mac Local interface's MAC address (read-only)
    + remote_mac Remote agent's MAC address (read-write)
    +
    +The "enabled" attribute is also used to control whether the parameters of
    +a target can be updated or not -- you can modify the parameters of only
    +disabled targets (i.e. if "enabled" is 0).
    +
    +To update a target's parameters:
    +
    + cat enabled # check if enabled is 1
    + echo 0 > enabled # disable the target (if required)
    + echo eth2 > dev_name # set local interface
    + echo 10.0.0.4 > remote_ip # update some parameter
    + echo cb:a9:87:65:43:21 > remote_mac # update more parameters
    + echo 1 > enabled # enable target again
    +
    +Note that you can even update the local interface dynamically. This is
    +especially useful if you want to use interfaces that have newly come up
    +and didn't even exist when netconsole was loaded / initialized.
    +
    +Miscellaneous notes:
    +====================
    +
    WARNING: the default target ethernet setting uses the broadcast
    ethernet address to send packets, which can cause increased load on
    other systems on the same ethernet segment.
    @@ -55,7 +120,8 @@ so it is advised to explicitly specify t
    from the config parameters passed to netconsole.

    TIP: to find out the MAC address of 10.0.0.2, you may try using:
    -ping -c 1 10.0.0.2 ; /sbin/arp -n | grep 10.0.0.2
    +
    + ping -c 1 10.0.0.2 ; /sbin/arp -n | grep 10.0.0.2

    TIP: in case the remote logging agent is on a separate LAN subnet than
    the sender, it is suggested to try specifying the default gateway's
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-07-04 13:15    [W:0.075 / U:30.316 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site