Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-8238

logrt may continue reading an old file repeatedly.

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 2.0.13rc1, 2.2.4rc1, 2.3.1
    • 2.0.12, 2.2.3
    • Agent (G)
    • RHEL6.5

      When the size of a file new after log rotation is 0 byte, reading the log of an old file will be continued.

      --after log rotation
      Zabbix
      key_=logrt[/var/log/test.log]
      lastlogsize=1000
      mtime=5/16 19:23

      old file
      filename=test.log-20140517
      logsize=1000
      mtime=5/16 19:23

      new file
      filename=test.log
      logsize=0
      mtime=5/17 03:06

      --In process_logrt() First

      ?process_log()
      It reads to the last of the old file.
      ?if (i != logfiles_num - 1)
      lastlogsize is set as zero.
      ?process_log()
      Since file size is the same as lastlogsize, mtime is not updated but it returns SUCCESS.

      lastlogsize=0 ?Only lastlogsize is updated.
      mtime=5/16 19:23

      --In process_logrt() Second....

      ?process_log()
      It reads to the last of the old file.
      ?if (i != logfiles_num - 1)
      lastlogsize is set as zero.
      ?process_log()
      Since file size is the same as lastlogsize, mtime is not updated but it returns SUCCESS.

      lastlogsize=0 ?Only lastlogsize is updated.....
      mtime=5/16 19:23

        1. for_2.2.3.patch
          0.5 kB
        2. zbx-8238-2.0.12.patch
          0.8 kB
        3. zbx-8238-2.2.3.patch
          0.8 kB

            Unassigned Unassigned
            zinten Yoshinori Komuro
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: