<rdf:RDF
    xmlns:s='http://snipsnap.org/rdf/snip-schema#'
    xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
    xml:base='http://www.stefanrufer.ch/snipsnap/rdf'>
    <s:Snip rdf:about='http://www.stefanrufer.ch/snipsnap/rdf#Virtual+Brain/Linux/Disksize+Checking'
         s:cUser='stefan'
         s:oUser='stefan'
         s:mUser='stefan'>
        <s:name>Virtual Brain/Linux/Disksize Checking</s:name>
        <s:content>Overflowing disks? Yes, there are... A simple checker script helps. &#xD;&#xA;&#xD;&#xA;Adapted to Linux from: http://sunportal.sunmanagers.org/pipermail/summaries/2001-November/000398.html&#xD;&#xA;&#xD;&#xA;{code:none}&#xD;&#xA;#!/bin/bash&#xD;&#xA;# Set up variable for who is to be mailed&#xD;&#xA;ADMIN_MAIL=&quot;mail@host.domain&quot;&#xD;&#xA;&#xD;&#xA;# The maximum percent that the disk slices are allowed to grow to&#xD;&#xA;MAXSIZE=80&#xD;&#xA;&#xD;&#xA;# The Command to check the disks and strip out unwanted variables&#xD;&#xA;DISKSIZES=`df -k |grep / |awk &apos;{print $5}&apos; |sed -e &apos;s/\%//&apos;`&#xD;&#xA;&#xD;&#xA;# Take the input from the df command above&#xD;&#xA;for percent in $DISKSIZES&#xD;&#xA;do&#xD;&#xA;&#xD;&#xA;# If the percent is greater than the maximum percent that the disk &#xD;&#xA;# slices are allowed to grow to&#xD;&#xA;if [ $percent -gt $MAXSIZE ]&#xD;&#xA;then&#xD;&#xA;&#xD;&#xA;# Mail a df -k to the specified person(s)&#xD;&#xA;df -h | mail -s &quot;Disk Space Problem on $HOSTNAME &quot; $ADMIN_MAIL&#xD;&#xA;&#xD;&#xA;fi&#xD;&#xA;&#xD;&#xA;done&#xD;&#xA;{code}&#xD;&#xA;</s:content>
        <s:mTime>2005-07-26 17:56:45.88</s:mTime>
        <s:cTime>2005-07-26 17:56:07.561</s:cTime>
        <s:comments
             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
        <s:snipLinks>
            <rdf:Bag>
                <rdf:li rdf:resource='#snipsnap-index'/>
                <rdf:li rdf:resource='http://www.stefanrufer.ch/snipsnap/rdf#Virtual+Brain/Linux'/>
                <rdf:li rdf:resource='http://www.stefanrufer.ch/snipsnap/rdf#Virtual Brain/Linux'/>
                <rdf:li rdf:resource='http://www.stefanrufer.ch/snipsnap/rdf#Virtual Brain'/>
                <rdf:li rdf:resource='#adrian'/>
                <rdf:li rdf:resource='http://www.stefanrufer.ch/snipsnap/rdf#stefan/SnipSnap Things'/>
            </rdf:Bag>
        </s:snipLinks>
        <s:attachments
             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
    </s:Snip>
</rdf:RDF>

