Summary: File size issues

Rick.Brashear_at_ercgroup.com
Date: 10/23/03

  • Next message: Milan Matesin: "SUMMARY: v240 sol 9/08 install problem"
    To: sunmanagers@sunmanagers.org
    Date: Thu, 23 Oct 2003 09:46:55 -0500
    
    

    Thanks to the following repondents:
    Darren Dunham [ddunham@taos.com]
    Casper Dik [casper@holland.sun.com]
    Rich Kulawiec [rsk@gsp.org]
    Thiagarajan, Karthikeyan [kthiagarajan@doitt.nyc.gov]
    Dave Gagliardi [dgagliardi@zonecms.net]
    Chandramohan Kowdlex , Tidel Park - Chennai [ChandramohanW@msdc.hcltech.com]
    Bill Voight [Bill.Voight@fcc.gov]

    Darren Dunham provided the most definitive information with the following:

    The application itself maintains a filehandle and a current pointer
    within it... After some time, you've got this..

    application: FH=4, FP=1234568
    0 1M
    [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] size=1234567 length=1234567

    The application has written 1.2MB to the file, and knows that the next
    byte goes to position 1234568. You nuke the file out from under it and
    it writes another 10 bytes, but starting at the same position...

    application: FH=4, FP=1234578
    0 1M
    [ x] size=10 length=1234577

    The size of the file is small (just whatever blocks are necessary to
    hold the 10 bytes), but the length is big. You can't change that
    without signalling the application somehow to close and then reopen a
    new file. Usually by restarting the app, or sometimes it's written to
    rotate the logs on signal like HUP.

    Casper Dik offered this response that proved to be true:

    An open file descriptor has an offset associated with it; the process will
    continue to write at that offset; the first write after the truncation will
    cause a large hole to appear at the start of the file, filled with NULLs.

    If you copy the file then you run out of disk space but the large
    files themselves do not take space as they have holes int hem which read
    as zeros.

    The application which writes the files needs to be changed to use O_APPEND
    when opening the file; this will cause all writes to do a seek to the
    actual end of the file.

    The Netegrity support staff (siteminder application) confirmed that Casper
    Dik's suggestion has indeed been
    applied in their 5.5 release to circumvent this problem in that version.

    The issue we are dealing with is that the applications utilizing this
    product is a global insurance app for which
    there is not a convenient window to cycle the app and rotate the logs.

    The solution for our monitoring concerns is that I wrote a perl script that
    utilizes du to determine the actual disk
    usage we have used to replace the original sitescope script that used df.

    Original inquiry:
    I have a file issue I do not understand.

    O/S: Solaris 8 Generic_108528-19
    Pltfrm: E10K domain

    We have an actively running web application whose siteminder webagent is
    logging to siteminder.log. I was under the impression that you could do
    something like:

    cp siteminder.log otherlocation.log
    cat /dev/null > siteminder.log and free up disk space.

    It seems that shortly after I do this the filesystem reports that the log
    file is at the size it was when I began and still growing. df reflects this
    as well.

    I wrote a script that captures a particular case:

    + ls -l siteminder.log
    -rwxrwxr-x 1 kintana iplanet 109625128 Oct 20 14:37 siteminder.log
    + wc -l siteminder.log
       49312 siteminder.log
    + wc -c siteminder.log
     109629860 siteminder.log
    + cp -p siteminder.log /var/tmp/kintana
    + cat /dev/null
    + 1> siteminder.log
    + ls -l siteminder.log
    -rwxrwxr-x 1 kintana iplanet 0 Oct 20 14:38 siteminder.log
    + wc -l siteminder.log
           0 siteminder.log
    + wc -c siteminder.log
           0 siteminder.log
    + sleep 60
    + ls -l siteminder.log
    -rwxrwxr-x 1 kintana iplanet 109635695 Oct 20 14:39 siteminder.log
    + wc -l siteminder.log
          65 siteminder.log
    + wc -c siteminder.log
    109647732 siteminder.log

    You can see that the line count appears that it may be correct but the
    character count shows the file to still be very large. We have often dealt
    with this in the past successfully. But now it seems to be ineffective.
    Can someone help? We are running out of disk space fast....

    g ERC
    _______________________________
    Rick Brashear
    Server Systems
    Information Technology Department
    Employers Reinsurance Corporation
    5200 Metcalf
    Overland Park, Kansas 66201
    * 913 676-6418
    * rick.brashear@ercgroup.com
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers


  • Next message: Milan Matesin: "SUMMARY: v240 sol 9/08 install problem"

    Relevant Pages

    • NEWBIE: Script help needed
      ... information regarding disk space and available upgrades for my system. ... This script is actually a learning tool for me as I learn Python. ... runs time emerge --sync ... The 'emerge' command is a Gentoo specific one. ...
      (comp.lang.python)
    • Cleandisk : a utility to wipe unused disk space
      ... Havent used but located script to wipedisk ... # This is a little shell script to wipe disk space ... # overwrite all unused disk space without risking ... MSG="You must specify a number of overwrites. ...
      (AIX-L)
    • Re: DTS pacakges causing low memory
      ... My guess would be the logs as data ais retrieved from the source in one huge batch before being inserted and if you have a lot of data then this could cause the log to grow and blow your disk space. ... Have a look at how much space on your drives you have to play with. ... I think make a house keeping into you db server and shrink or release ...
      (microsoft.public.sqlserver.dts)
    • Re: Mail quit working after DSL > Fiber change
      ... files on the server that had filled up the C drive...i set this server ... backups should keep logs clean in my mind)...So, ... operate quite happily as long as it had at least 10mb of free disk space. ... The new Exchange Transport queue database will by default require more than ...
      (microsoft.public.windows.server.sbs)
    • Re: Mail quit working after DSL > Fiber change
      ... files on the server that had filled up the C drive...i set this server ... backups should keep logs clean in my mind)...So, ... operate quite happily as long as it had at least 10mb of free disk space. ... The new Exchange Transport queue database will by default require more than ...
      (microsoft.public.windows.server.sbs)