#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    2
    Rep Power
    0

    Shell Script for Server Health?


    I'm wondering if any simple shell scripts exist that check unix server basic health signs, and e-mail the results.

    Disk space, CPU, etc?

    Thanks
    TL
  2. #2
  3. Introspective
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Nov 2001
    Location
    London, UK
    Posts
    3,317
    Rep Power
    110
    there are stacks of tools to do this sort of stuff. A very simple script might look like this:
    Code:
    #!/bin/bash
    
    echo "memory status:" > status
    echo "---------------" >> status
    vmstat >> status
    echo "" >> status
    echo "uptime & load: " >> status
    echo "--------------" >> status
    uptime >> status
    echo "" >> status
    echo "disk usage: " >> status
    echo "----------" >> status
    df >> status
    google for crontab and mail to send once a day..

    christo
    This is me: http://chris.uk.com

IMN logo majestic logo threadwatch logo seochat tools logo