Slashdot Mirror


Sysadmins - What's in Your MOTD?

permaculture asks: "This is a 'knowledge management' issue, on a University network. For many years we've had a network 'Message of the Day' that appears when any network user logs in. MOTD lists planned service outages for maintenance, progress on current issues, upcoming holidays, and other items that affect network users. Recently, this has been replaced by a page that announces general University business such as Open weeks, upcoming awards etc. There's a link on the page to the network MOTD that used to greet every user immediately after login. Does your network have a 'Message of the Day' that appears at login? Is it a Corporate business page, entirely related to network services, or something else entirely?"

2 of 176 comments (clear)

  1. Moore's Law "Disk is 99% full - CleanUp" motd gone by billstewart · · Score: 4, Interesting
    Sorry for the clunky title, but that's what I could fit in a Subject Line box.

    Historically there were two common contents for motd - fortune, and a note from the administrator saying that the file system was almost full so please clean up your files, and this applied to just about any multi-user server with just about any operating system. Moore's Law has changed this for most systems I've dealt with - disk capacities have been growing rapidly and prices dropping rapidly, and disk drives really are no longer running 99% full except for individuals' PCs that are full of MP3s or videos. Sometimes you'll see messages like that from MS Exchange Mail Server operators who are running shared mailbox servers on expensive fast disks, but otherwise the disk capacity most places finally outpaces user demand.

    Unfortunately, bureaucrats acting as amateur lawyers have typically replaced that message with some badly written threatening legalese drivel that has no clue about what the laws actually say; they'd be just as well off with a message that said "The Wizard says: Go away and come back tomorrow!"

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  2. who are the diskhogs by Aaton · · Score: 5, Interesting
    If you don't already have quotas you might run into some users eating more then there fair share of disk space. Run something like this nightly from cron job and place the output in /etc/motd. Your biggest diskhogs will be known to everyone that logs in.
    #!/bin/bash
    # Usage: diskhog [dir] [count]
    # If nothing given defaults to /home and 10

    HOMES=${1:-/home}
    COUNT=${2:-10}
    SMALLDIV= "-----"
    IGNORELIST="proc"

    if [ ! -d $HOMES ] ; then
    echo "$HOMES needs to be a directory. Use the full path"
    exit
    fi

    cd $HOMES

    echo "`date +%D` Disk Hogs: $HOMES"
    echo "$SMALLDIV";
    du -ks `ls -l | egrep -ie "^d" |egrep -iv $IGNORELIST | awk '{print $9}'` | sort -rn | head -$COUNT;
    echo "$SMALLDIV";
    May not be the best method but works under Linux. You might need to change the awk number if your ls doesn't output like mine.