Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-1997

mongostat custom column output using .diff() becomes "INVALID"

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.4.10
    • Component/s: mongostat
    • Labels:

      When using mongostat's -o option to customize output, I've seen a few cases where the column output for a field where the diff() function is used transitions from a valid number to "INVALID".

      For example, if I look at cursor insert operations with this command:

      mongostat -o "wiredTiger.cursor.cursor insert calls.diff()= cins,time"

      I see output transition like this:

      {{9404 Apr 4 20:57:01.860
      10759 Apr 4 20:57:02.860
      11059 Apr 4 20:57:03.861
      12034 Apr 4 20:57:04.860
      12349 Apr 4 20:57:05.876
      10423 Apr 4 20:57:06.876
      9545 Apr 4 20:57:07.863
      11069 Apr 4 20:57:08.861
      9979 Apr 4 20:57:09.862
      cins time
      INVALID Apr 4 20:57:10.860
      INVALID Apr 4 20:57:11.861
      INVALID Apr 4 20:57:12.862
      INVALID Apr 4 20:57:13.861
      INVALID Apr 4 20:57:14.861
      INVALID Apr 4 20:57:15.874
      INVALID Apr 4 20:57:16.861
      INVALID Apr 4 20:57:17.861
      INVALID Apr 4 20:57:18.862
      INVALID Apr 4 20:57:19.860}}

      Looking at the raw counter value for cursor insert calls, I see that it was 1072355130 at 20:55 and 1075659772 at 21:00, so I'm not sure why subtracting intermediate values would generated an error.

      I have seen this happen with other fields too, for example wiredTiger cache page requests.

            Assignee:
            Unassigned Unassigned
            Reporter:
            mzraly Mike Zraly
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: