To add to this discussion, below is some code I got from CFComet.com awhile ago that 
displays filesystem information (obviously, it only works on Windows setups). You 
could adapt it easily so that it would trigger an email when drive space got below a 
certain threshold or you could just check it every now and then.

Bill

<!--- Try to Create the Object --->
<CFTRY>
    <CFOBJECT TYPE="COM" CLASS="Scripting.FileSystemObject" NAME="FSO" 
ACTION="CONNECT">
  <CFCATCH type="ANY">
    <CFOBJECT TYPE="COM" CLASS="Scripting.FileSystemObject" NAME="FSO" ACTION="CREATE">
  </CFCATCH>
</CFTRY>

<!--- Get all the existing drives . This can be any type of drives. 
      Fixed drives, network drives etc. --->
<CFSET Drives = FSO.Drives>

<CFOUTPUT>
<!--- Display the no. of drives --->
Number of Drives : #Drives.Count#<BR>
    
<!--- Make a table to show the results --->    
<TABLE cellspacing="1" cellpadding="5">
    <TR>        
        <TD>Drive</TD>
        <TD>Total Size</TD>
        <TD>Free Space</TD>
        <TD>Available Space</TD>
        <TD>Serial No.</TD>
        <TD>Path</TD>
        <TD>Type</TD>
        <TD>Ready?</TD>
        <TD>Name</TD>
        <TD>System</TD>
    </TR>
        
<!--- This is a COM collection so we cant use conditional loops, index loops and other 
loops. 
      ColdFusion provides us a nice way of looping over COM collections so we are 
using that here .--->

<CFLOOP COLLECTION="#Drives#" ITEM="this">
<!--- remove the below "CFIF" statement if you havent disabled any of your floppy 
drives  .--->
  <CFIF this.DriveLetter is not "A">
    <TR>
        <!--- Display the Drive Letter --->
        <TD>#this.DriveLetter#</TD>
        
        <!---Display the Total size --->
        <TD><CFIF this.isReady AND ISDefined("this.TotalSize")>
                #NumberFormat(round(evaluate(this.TotalSize/1000000)))# Mb
            </CFIF>
        </TD>
        
        <!--- Display the free space --->
        <TD>
            <CFIF this.isReady AND ISNumeric(this.FreeSpace)>
                #NumberFormat(round(evaluate(this.FreeSpace/1000000)))# Mb
            </CFIF>
        </TD>
        
        <!--- Display the available space --->
        <TD>
            <CFIF this.isReady AND IsNumeric(this.AvailableSpace)>
                #NumberFormat(round(evaluate(this.AvailableSpace/1000000)))# Mb
            </CFIF>
        </TD>
        
        <!--- Display the serial number  --->
        <TD>
            <CFIF this.isReady AND LEN(this.SerialNumber)>
                #this.SerialNumber#
            </CFIF>
        </TD>

        <!--- Display the path --->
        <TD>#this.path#</TD>
        
        <!--- These are the constants returned by Drive.DriveType
                Const DriveTypeRemovable = 1
                Const DriveTypeFixed = 2
                Const DriveTypeNetwork = 3
                Const DriveTypeCDROM = 4
                Const DriveTypeRAMDisk = 5
             
        So we'll use CFSWITCH statements to display the actual type --->
        <TD>
        <CFSWITCH expression="#this.DriveType#">
            <CFCASE value="1">Removable</CFCASE>
            <CFCASE value="2">Fixed</CFCASE>
            <CFCASE value="3">Network</CFCASE>
            <CFCASE value="4">CD ROM</CFCASE>
            <CFCASE value="5">Ram Disk</CFCASE>
            <CFDEFAULTCASE>Unknown</CFDEFAULTCASE>
        </CFSWITCH>
        </TD>
        
        <!--- Display if the Drive is ready --->
        <TD>#this.isReady#</TD>

        <!--- Here we have to display the drive name. Before that, we will 
        check if it is a network drive or not. If it is a network drive, 
        then we display the 'sharename'; otherwise, we display the 'volumename'.
        --->
        <TD>
        <CFIF this.isReady>
            <CFIF this.DriveType IS "3">                                               
     
                <!--- #this.ShareName# --->
            <CFELSE>
                #this.VolumeName# 
            </CFIF>
        </CFIF>
        </TD>
        
        <!--- Display the type of Filesystem --->
        <TD><CFIF this.isReady>#this.FileSystem#</CFIF></TD>
    </TR>
  </CFIF>
</CFLOOP>
</TABLE>

</CFOUTPUT>

>>> [EMAIL PROTECTED] 6/27/02 1:39 PM >>>
Thanks for everyone's replies.  It looks as though this was the problem.
Logs taking up space, so no space for CF to create the mail files.

Thanks,

TN.

-----Original Message-----
From: BILL BROWN [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, June 27, 2002 12:33 PM
To: CF-Server
Subject: Re: CFMAIL Files are empty

We were seeing this exact behavior when our server ran out of disk space.
Check that.

Bill
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with 
'unsubscribe' in the body or visit the list page at www.houseoffusion.com

Reply via email to