[SERVER-10408] Setting sleep to 0 in mongostat results in uninitialized data being printed Created: 02/Aug/13  Updated: 11/Jul/16  Resolved: 10/Oct/13

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: None
Fix Version/s: 2.5.3

Type: Bug Priority: Minor - P4
Reporter: Eric Daniels (Inactive) Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

When using mongostat with sleep interval set to 0, mongostat ends up never sleeping and prints a bunch of garbage data. Seems like it's never giving up control of its thread to the serverThread() threads so that they can gather data.

./mongostat 0
 
connected to: 127.0.0.1
 
         	insert  query update delete getmore command flushes mapped  vsize    res faults  locked db idx miss %     qr|qw   ar|aw  netIn netOut  conn  set repl       time 
localhost	-2147483648|-2147483648 -2147483648|-2147483648 -2147483648|-2147483648 -2147483648|-2147483648 -2147483648 -2147483648|-2147483648 -2147483648   288m  3.06g     6m -2147483648 local:nan%          0       0|0     0|0 -2147483648g -2147483648g     8 m101  PRI   20:39:39 
 
      localhost	-2147483648|-2147483648 -2147483648|-2147483648 -2147483648|-2147483648 -2147483648|-2147483648 -2147483648 -2147483648|-2147483648 -2147483648   288m  3.06g     6m -2147483648 local:nan%          0       0|0     0|0 -2147483648g -2147483648g     8 m101  PRI   20:39:39 
localhost:27017	no data
localhost:27018	no data
localhost:27019	no data
 
      localhost	-2147483648|-2147483648 -2147483648|-2147483648 -2147483648|-2147483648 -2147483648|-2147483648 -2147483648 -2147483648|-2147483648 -2147483648   288m  3.06g     6m -2147483648 local:nan%          0       0|0     0|0 -2147483648g -2147483648g     8 m101  PRI   20:39:39 
localhost:27017	no data
localhost:27018	no data
localhost:27019	no data
 
      localhost	-2147483648|-2147483648 -2147483648|-2147483648 -2147483648|-2147483648 -2147483648|-2147483648 -2147483648 -2147483648|-2147483648 -2147483648   288m  3.06g     6m -2147483648 local:nan%          0       0|0     0|0 -2147483648g -2147483648g     8 m101  PRI   20:39:39 
localhost:27017	no data
localhost:27018	no data
localhost:27019	no data
 
      localhost	-2147483648|-2147483648 -2147483648|-2147483648 -2147483648|-2147483648 -2147483648|-2147483648 -2147483648 -2147483648|-2147483648 -2147483648   288m  3.06g     6m -2147483648 local:nan%          0       0|0     0|0 -2147483648g -2147483648g     9 m101  PRI   20:39:39 
localhost:27017	-2147483648|-2147483648 -2147483648|-2147483648 -2147483648|-2147483648 -2147483648|-2147483648 -2147483648 -2147483648|-2147483648 -2147483648   288m  3.06g     6m -2147483648 local:nan%          0       0|0     0|0 -2147483648g -2147483648g     9 m101  PRI   20:39:39 
localhost:27018	no data
localhost:27019	-2147483648|-2147483648 -2147483648|-2147483648 -2147483648|-2147483648 -2147483648|-2147483648 -2147483648 -2147483648|-2147483648 -2147483648   288m  3.05g     6m -2147483648 local:nan%          0       0|0     0|0 -2147483648g -2147483648g     3 m101  SEC   20:39:39 



 Comments   
Comment by auto [ 10/Oct/13 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-10408 Don't allow --sleep <= 0 in mongostat
Branch: master
https://github.com/mongodb/mongo/commit/0b67abbe480f84832798bdcbea34a514bf07c880

Comment by Eric Daniels (Inactive) [ 02/Aug/13 ]

I think only allowing positive numbers for sleep interval is an appropriate action

Generated at Thu Feb 08 03:23:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.