Changeset 10905 in hybrid for branches/releng-9.0/nanobsd/files


Ignore:
Timestamp:
May 18, 2012, 9:49:19 PM (13 years ago)
Author:
rick
Message:

Start generating an whole bunch of statistics on login to make debugging and
mgnt more easy todo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/releng-9.0/nanobsd/files/root/.cshrc

    r10900 r10905  
    1 # $FreeBSD: release/9.0.0/share/skel/dot.cshrc 170119 2007-05-29 22:07:57Z dougb $
     1# $FreeBSD: releng/9.0/etc/root/dot.cshrc 170088 2007-05-29 06:37:58Z dougb $
    22#
    33# .cshrc - csh resource script, read at beginning of execution by each shell
     
    1515umask 22
    1616
    17 set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin)
     17set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin /tools)
    1818
    19 setenv  EDITOR  vi
     19setenv  EDITOR  vim
    2020setenv  PAGER   more
    2121setenv  BLOCKSIZE       K
     
    2323if ($?prompt) then
    2424        # An interactive shell -- set some stuff up
    25         set filec
    26         set histfile = /tmp/.history
     25        set prompt = "`/bin/hostname -s`# "
     26        set filec
     27        set histfile = /tmp/.history
    2728        set history = 1000
    2829        set savehist = 1000
     
    3435        endif
    3536endif
     37   
     38if ($?prompt) then
     39   # Display some tricks and pointers for management on login.
     40   echo ""
     41   echo "Statistics:"
     42   echo " - Build "`grep 'Revision:' /tools/wl-release.txt`
     43   echo " - Config "`grep Generated /usr/local/etc/wleiden.yaml | tr -d '#'`
     44   setenv cs_conn `arp -na | grep -v -e ' 00:15:6d' -e 'incomplete' -e 'permanent' -e ' 00:0d:b9' | wc -l`
     45   setenv cs_auth `pfctl -twlportal -Tshow | wc -l`
     46   echo " - $cs_conn clients and $cs_auth authenticated"
     47   echo " - "`uptime`
     48   echo ""
     49   echo "Active Bridges:"
     50   arp -na | grep -e ' 00:15:6d' | sed -e 's/^/ - /' | grep ' ' || echo " - none"
     51   echo ""
     52   echo "Active Neighboors:"
     53   arp -a | grep -v 'permanent' | grep ' 00:0d:b9' |\
     54     sed -e 's/^/ - /' -e 's/.wleiden.net//' -e 's/expires .*$//' |\
     55     grep ' ' || echo " - none"
     56   echo ""
     57endif
Note: See TracChangeset for help on using the changeset viewer.