[HPADM] [SUMMARY] Scritping Questions

From: Deepak John Cutinha (deepak_cutinha_at_yahoo.com)
Date: 07/22/03

  • Next message: Greg Francis: "[HPADM] Anyway to increase NGROUPS?"
    Date: Tue, 22 Jul 2003 01:58:20 -0700 (PDT)
    To: hpux-admin@DutchWorks.nl
    
    

    Query :

    I am trying to make a script to monitor my systems

    Part of the script has to do the following:

    - Run a df -k on the system
    - Send me a mail only if any of the file system is
    >85% full with details like system name and
    Filesystem.

    Kindly suggest if you have resources already doing
    this kind of activity.

    I will post the summary for everyones benefit.

    Solution :

    SYSMAX=85
    for MNTPT in `cat /etc/mnttab | awk '{print $2}'|grep
    -v net | grep -v home`
    do
    FILESYS=`bdf $MNTPT | grep -v avail | awk '{print $5}'
    | tr -d "%"`
    if [ $FILESYS -gt $SYSMAX ]
    then
    echo "WARNING: $MNTPT File System is using $FILESYS%
    of diskspace allocated "
    fi
    done

    Thanks Aynal Hossain, Danilo Israel, Baran YURDAGUL,
    Beerse,_Corné and all the HP Gurus who responded

    PS : That makes sure I have posted all the Summaries

    This is a great knowledge base for HP-UX stuff ..

    Regards

    Deepak Cutinha
     

    __________________________________
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com

    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    

  • Next message: Greg Francis: "[HPADM] Anyway to increase NGROUPS?"

    Relevant Pages

    • Re: Unexpected failure mode...
      ... my client decided to add files to the source folder that ... machine that the thumb drive was installed on (not the file system ... the installation of a financial application that the client doesn't ... I don't think there is anything unusual going on in the script, ...
      (microsoft.public.scripting.wsh)
    • Re: Unexpected failure mode...
      ... my client decided to add files to the source folder that ... machine that the thumb drive was installed on (not the file system ... the installation of a financial application that the client doesn't ... I don't think there is anything unusual going on in the script, ...
      (microsoft.public.scripting.wsh)
    • Re: Fwd: Re: Daemon configuration for Apache
      ... >> Now my problem is one apache startup The ... >> or Sxxhttp has used some configuration file based ... > on some shell script ... Do you Yahoo!? ...
      (perl.beginners)
    • SUMMARY: mass process
      ... Some mentioned expect script, use component Tcl etc, which I wish I had ... > Thanks and I will summarize. ... > Do you Yahoo!? ... Shopping - with improved product search ...
      (SunManagers)
    • Problem with Perl TK
      ... I have a script Perl, ... which enables me to carry out research with Yahoo. ... The error message that I have in return: ... Tk callback for .button1 ...
      (comp.lang.perl.tk)