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

mongotop rowcount misnamed: controls count of stats to print, not limit on rows

    • Type: Icon: Question Question
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: mongotop
    • None

      Hi,

      When running mongotop without any parameter, it shows 10 lines of activity.

      mongotop 
      
      ns    total    read    write    2018-03-20T14:59:21+11:00
      admin.system.roles      0ms     0ms      0ms                             
      admin.system.version      0ms     0ms      0ms                             
      dat.test      0ms     0ms      0ms                             
      local.startup_log      0ms     0ms      0ms                             
      local.system.replset      0ms     0ms      0ms                             
      tab0.test      0ms     0ms      0ms                             
      tab1.test      0ms     0ms      0ms                             
      tab2.test      0ms     0ms      0ms                             
      tab3.test      0ms     0ms      0ms                             
      tab4.test      0ms     0ms      0m
      

      However, when using the parameter --json the number of collections shown are many more.

       mongotop --json
      
      {"totals":{"admin.system.roles":{"total":{"time":0,"count":0},"read":{"time":0,"count":0},"write":{"time":0,"count":0}},"admin.system.version":{"total":{"time":0,"count":0},"read":{"time":0,"count":0},"write":{"time":0,"count":0}},
      ......
      "tab98.test":{"total":{"time":0,"count":0},"read":{"time":0,"count":0},"write":{"time":0,"count":0}},"tab99.test":{"total":{"time":0,"count":0},"read":{"time":0,"count":0},"write":{"time":0,"count":0}}
      

      Is there any known limitation, any hard limit about the --json parameter? I can't see any, but wanted to be sure.

      Thanks in advance.

            Assignee:
            Unassigned Unassigned
            Reporter:
            conchi.bueno@mongodb.com Conchi Bueno
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: