[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[LDM #QWE-565829]: Large Log files



Hi Heather,

re:
> Thank you so much for your reply.

No worries.

re:
> I modified my ldmd.conf to put the log files in a
> /home directory with plenty of space.  I kept the naming convention that you 
> used and
> modified the original rotation script: nplog_rotate

OK.  Did you make sure to store the modified version of 'nplog_rotate' somewhere
other than ~ldm/bin?  If you did not, then the next time you update your LDM,
you will be using the version that comes bundled with the LDM, not the one
that you modified for your local use.

re:
> I was rotating my log files using a different script, but I was doing it 
> every week.  I
> had two files that were 20G+ in size and they filled up my partition!  I had 
> been doing
> it this way for 7 years and never had a problem until this version of the ldm!

Hmm... it is hard to imagine that you have so many errors in your NOAAPort feed
that your log files would grow to 20G+ in only a week!  Weird!!

re:
> Also, I would love to have a copy of your summary script.  It seems like a 
> great way to
> keep track of everything going on on my server.  Thank you!

OK.

I am attaching a couple of BASH shell scripts to this reply for your use:

gapstat
gapcount

These scripts are NOT robust!  They were written for internal use, so
they have a number of built in assumptions.  For instance:

- it is assumed that LDM log files are written to the ~ldm/logs directory

  If your setup is different, you will have to edit the files and
  change things to match your setup.

- they assume that both scripts live in the ~ldm/util directory and they
  are both marked as executable

- they assume that the NOAAPort ingest log files live in the /data/tmp
  directory

  This will definitely need to be changed for your setup!

- another assumption that is not so obvious is that the time for the
  'ldm' account is UTC, not local time

  'gapstat' is run from cron on our machines as follows:

#
# Monitor NOAAPort ingest Gaps/missed frames for yesterday and on the hour today
#
5 0 * * * util/gapstat yesterday >> logs/leno_gapcount 2>/dev/null
0 * * * * util/gapstat > logs/leno_gapcurrent 2>/dev/null


  - note the specified log file name specified in both of these cron entries,
    leno_gapcount and leno_gapcurrent.  You should change 'leno' to match
    the first part of your NOAAPort machine's name (e.g., 'npingest' if
    I remember correctly)

  - again, the time in our 'ldm' login is UTC

    As you can see, we kick off 'util/gapstat yesterday' at 5 minutes past
    0 UTC.  If the time in your 'ldm' login is not UTC, you will have to
    fiddle with the time that the script is kicked off.

So, you see that you will have to do some twiddling to get these scripts
to work correctly in your environment.  Since you are a Python person, you
may choose to rewrite these scripts in Python.  If you do, please send us
a copy!

Finally, I ran a very simple script that lists the last 'N' days of
summary stats from the NOAAPort ingest machines that we have access
to.  I have attached that script, checkgaps, as well just so you
can see the very simple approach I use for daily monitoring.

Please let me know if/when you have questions, or run into any hiccups.


Cheers,

Tom
--
****************************************************************************
Unidata User Support                                    UCAR Unidata Program
(303) 497-8642                                                 P.O. Box 3000
address@hidden                                   Boulder, CO 80307
----------------------------------------------------------------------------
Unidata HomePage                       http://www.unidata.ucar.edu
****************************************************************************


Ticket Details
===================
Ticket ID: QWE-565829
Department: Support NOAAPORT
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.

Attachment: gapstat
Description: Binary data

Attachment: gapstat
Description: Binary data

Attachment: checkgaps
Description: Binary data