ncmatrix

ncmatrix
NCMatrix is a modified version of the CMatrix screen saver by Chris Allegretta with the added functionality of network traffic monitoring. As network activity changes, different colored characters will be displayed at random locations in the streams. Depending on the size of the packet, the length of the character stream will change as well. The screenshot (Red characters are upstream packets, magenta characters show downsteam packets) on the right shows NCMatrix in action while downloading the linux 2.6 kernel. In the dox for CMatrix, Chris notes his concerns about CPU load with CMatrix, but running this on a P266 linux router/firewall I only see a 17 percent cpu load during average load.

An example command line would be:
  • ncmatrix -s -b -u 10 -I eth0 -T red -R magenta

    News
    • Latest version is 1.0


    Manpage of NCMatrix

    NCMatrix

    Section: User Commands (1)
    Updated: Sat May 21 2005

     

    NAME

    NCMatrix - A network monitoring screen saver (derived from CMatrix by Chris Allegretta)  

    SYNOPSIS

    ncmatrix [-abBflohnsVx] [-u update] [-C color] [-H threshold] [-I netdev] [-R color] [-T color]  

    DESCRIPTION

    Shows a console mode scrolling 'Matrix' like screen in Linux with optional network packet activity.  

    OPTIONS

    -a
    Asynchronous scroll
    -b
    Bold characters on
    -B
    All bold characters (overrides -b)
    -f
    Force the linux $TERM type to be on
    -l
    Linux mode (sets "matrix.fnt" font in console)
    -o
    Use old-style scrolling
    -h, -?
    Print usage and exit
    -n
    No bold characters (overrides -b and -B)
    -s
    "Screensaver" mode, exits on first keystroke
    -x
    X window mode, use if your xterm is using mtx.pcf
    -V
    Print version information and exit
    -u delay
    Screen update delay 0 - 9, default 4
    -C color
    Use this color for matrix (default green). Valid colors are green, red, blue, white, yellow, cyan, magenta and black.
    -I netdev
    ncmatrix will display transmitted and received packets as different colored characters entering the matrix. You must use the -I option to tell ncmatrix what netork device to monitor. This device must exist in /proc/net/dev and you must have read access to it. examples would be:


       -I ppp0
       -I eth0
       -I eth1
       

    -H threshold
    This threshold will tell ncmatrix to wait a number of times before computing the total number of packets that have been transmitted or recieved since the last time it checked netdev. On slow connections, this can cause ncmatrix to intersperse single characters into the matrix. We want a nice stream of chars to represent the network data. Setting the -H number higher *should* minimize the number of sparse characters entering the matrix. Depending on your processor speed and network speed, this can vary greatly. An H value of 1000 on my AMD 1.8Ghz was not noticeable. On a Pentium 266 with no H value (more intensive) the load was around 17%.
    -R color
    Use this color for coloring received packets (default blue). Valid colors are green, red, blue, white, yellow, cyan, magenta and black.
    -T color
    Use this color for transmitted packets (default red). Valid colors are green, red, blue, white, yellow, cyan, magenta and black.
     

    KEYSTROKES

    The following keystrokes are available during execution (unavailable in -s mode)
    a
    Toggle asynchronous scroll
    b
    Random bold characters
    B
    All bold characters
    n
    Turn off bold characters
    0-9
    Adjust update speed
    ! @ # $ % ^ & )
    Change the color of the matrix to the corresponding color: ! - red, @ - green, # - yellow, $ - blue, % - magenta, ^ - cyan, & - white, ) - black.
    q
    Quit the program