3 Replies Latest reply on Mar 27, 2018 3:26 PM by gmichaud-verreault

    Large Log File

    MikeSpath

      Hello:

      We recently installed a pi archive on a windows server to do some testing. It was a smooth process and have been utilizing the pi archive for about 9 months. This is on a VM the customer had provided but we noticed this morning that there was practically no space left on the drive of like 80Gb.

      We are not collecting many tags (20) at all with very little data (only transnational data).

      When I ran a large file tracker, I found a pimsg_.log file in the program files\PI\log directory that was 5Gb. I had not done anything special on the pi archive install or had to setup logging any different. Can you tell me the source of this and how to regulate logging sizes?

      See attached file for more detail.

      Thanks,

      Mike

        • Re: Large Log File
          KenjiHashimoto

          PI Message logs contains all logs for PI Data Archive, PI Interfaces etc....

          PI SMT > Operation > Message logs

          You can see the message from here.

          What kind of logs can you see? I think there are a lot of duplicate messages and it causes the Large file.

          For example, if you use PI UFL Interface with high debug level, it causes a lot of logs. In that case, you can set debug level as 0.

          Currently I am not sure the root cause in your case. so it is worth to check the flood of logs.

          Also, the other way to limit the log number is using MessageLog_DayLimit

          Go to PI SMT > Operation > Tuning Parameters > General tab

          There is a MessageLog_DayLimit

          If you set 10 then only 10 days logs are kept in the PI Data Archive machine.

          (If you are taking backup, then backuped folder also contains logs and these backuped logs are not deleted by this tuning parameter. You need to delete backuped logs manually)

          3 of 3 people found this helpful
          • Re: Large Log File
            afink

            Mike,

             

            Kenji Hashimoto is correct that there is no way to specifically limit the size of any one daily message log file on the PI Data Archive.  We do not limit the size of the message file per day, etc such as to not miss any potential important actions in the logs.

             

            There is, however, a work item to allow the location of the log file to be configurable, such as on a separate volume to help with storing potentially large log files.

             

            As Kenji mentioned, the best ways to handle an issue like this is first to identify why the file was so large, likely this is due to high debug settings or a recurring issue/behavior that is consistently logged and address that first.  The second part would be to set the MessageLog_DayLimit tuning parameter appropriately.  By default logs are kept for 35 days on the Data Archive.

             

            - Adam

            3 of 3 people found this helpful
            • Re: Large Log File
              gmichaud-verreault

              Adam and Kenji are right concerning the error file, but do you only have 80GB of drive space for the entire server or only for PI apps? Is everything on the same drive as the OS ?

              If so, are there other folders with a lot of data other than that one log file? You can use something like windirstat to check.

               

              Gabriel

              1 of 1 people found this helpful