Log files will not cycle, Too big to open with Smat.

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Log files will not cycle, Too big to open with Smat.

  • Creator
    Topic
  • #50196
    Mike Wilson
    Participant

      I am having a problem with my log files cycling.  They won’t cycle and get too large to open.  We have a nightly routine that runs at 12:01am every night to do this and it is only working on a few of my threads. (I did not write it so I am not sure exactly how it accomplishes this.)  If I watch it run it appears that it is working.  I will attach the file that is running nightly.  If anyone can point me in the right direction I would appreciate it.  Thanks.

    Viewing 12 reply threads
    • Author
      Replies
      • #65157
        Robert Kersemakers
        Participant

          Why don’t you have Cloverleaf cycle them?

          In the Network Configurator, choose Proces/Configure… from the menu. Now you can enable ‘Automatic Log Cycling’ per process and configure how large you want the specified log file to get.

          Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

        • #65158
          John Hamilton
          Participant

            If you do run into a smat file you can’t load. There is a script in the contrib directory that will take a smat file and convert it to a nl file.  “smat_to_nl” if I recall correctly.

            So you can get to it that way, if needed. You will of course not have access to them to search or display in the SMAT tool.  But at least you can get to the message by using some other utilities that was giving you issues.

            Thank You.

          • #65159
            Mike Wilson
            Participant

              Robert,  We use the TCL process to Cycle them so that there cycled every day and makes it easier to locate a message if need be.  I did see the Cloverleaf Option and may use it.  Thanks.

            • #65160
              Mike Wilson
              Participant

                Also,  Does the auto cycle on size youre referring to only cycle the .log and .err file? Or does it do the idx and msg files as well?  The .MSG and .IDX are the 2 im having get too big.  Thanks again.

              • #65161
                Mike Wilson
                Participant

                  I think the problem is solved!  I had 2 similar threads that were longer then 15 characters and I renamed them.  Now all of my threads are cycling.  Ill keep an eye on it and see if it continues.  Thanks for your help.

                • #65162
                  Robert Kersemakers
                  Participant

                    Hi Mike,

                    Good to hear that your problem is solved.

                    And I hadn’t noticed that you were talking about the SMAT files (msg and idx); thought you were trying to cycle the log files (log and err). So my advice concerned the log files, not the SMAT files.

                    Sorry for the confusion.

                    Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

                  • #65163
                    Joseph Benigno
                    Participant

                      John Hamilton wrote:

                      If you do run into a smat file you can’t load. There is a script in the contrib directory that will take a smat file and convert it to a nl file.

                    • #65164
                      Kevin Kinnell
                      Participant

                        There are a number of unix editors ported to Windows that will load very large files.  Vim and Emacs will both open large files.  JEdit (you need a java runtime, but some versions come with it) will handle big files, and if you can find a PFE (Programmer’s File Editor) binary and your version of Windows is lower than Vista, that is a good option.

                        A Q&D script for just viewing .msg files (pick your language) reads in a few kilobytes, replaces xyzMSH| with xyznMSH|, and spits out all of the buffer up to the final “n”, then reloads the buffer with the un-spit-out stuff moved to the front.  If it weren’t big files you could just suck the whole thing in as a string (I routinely do this with 15M files, to make them easier to grep, but the machine I do it on has 6G RAM) and do the substitution all at once.

                        You really need the full smat_to_nl script for serious processessing, though.

                      • #65165
                        John Mercogliano
                        Participant

                          Mike,

                            If you want to keep your large file in a smat format for archiving but still readable, I wrote a script that will split a large smat file into multiple smat files.  Note that this was a quick and dirty script so all variables are hard coded but it’s pretty simple.

                          Hope it’s of use,

                          John Mercogliano
                          Sentara Healthcare
                          Hampton Roads, VA

                        • #65166
                          Duy Nguyen
                          Participant

                            Robert Kersemakers wrote:

                            Hi Mike,

                            Good to hear that your problem is solved.

                            And I hadn’t noticed that you were talking about the SMAT files (msg and idx); thought you were trying to cycle the log files (log and err). So my advice concerned the log files, not the SMAT files.

                            Sorry for the confusion.

                            Is there a way within Cloverleaf to have the SMAT files automatically cycled?  Thanks.

                          • #65167
                            Duy Nguyen
                            Participant

                              Robert Kersemakers wrote:

                              Hi Mike,

                              Good to hear that your problem is solved.

                              And I hadn’t noticed that you were talking about the SMAT files (msg and idx); thought you were trying to cycle the log files (log and err). So my advice concerned the log files, not the SMAT files.

                              Sorry for the confusion.

                              Is there a way within Cloverleaf to have the SMAT files automatically cycled?  Thanks.

                            • #65168
                              Craig Weldy
                              Participant

                                I don’t know of a way to automatically cycle them in cloverleaf except by size.  

                                At our site (AIX 5.2  CL 5.3r1) we use unix shell scripts and cron to cycle all our sites/threads and log files every 3 hours.  Then the .old files are moved to files with a time/date stamp in the name and then loaded into a mysql database.  I have a web tool that allows analysts to query the database and view or resend (testing only) the messages as desired.

                                I find that this keeps the smat files small and the database has the file name that the message is in so that it can be found quickly should it be needed.

                                Craig Weldy
                                Senior Interface Analyst
                                Beacon Health System
                                South Bend, In, 46615

                              • #65169
                                John Hamilton
                                Participant

                                  I have to ask this.

                                  Are you talking about Smat files.  ❓

                                  Or are you talking about Engine output log files.

                                  These are two different things. I see answers to both here. I can tell you with output log files go into netconfig at the top there is a tab called processes-> configure. You can set a size limit on the process log to that will automatically cycle them.

                                  For SMAT in the contrib directory there is a perl script ( I don’t recall the name) that you can use to cycle smat files. Use it in conjunction with Cron and it will cycle smat files at that time.

                              Viewing 12 reply threads
                              • The forum ‘Cloverleaf’ is closed to new topics and replies.