[SERVER-4598] mongostat always shows port for the last line Created: 03/Jan/12  Updated: 11/Jul/16  Resolved: 04/Jan/12

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: 2.0.2
Fix Version/s: 2.1.0

Type: Bug Priority: Trivial - P5
Reporter: David Mytton Assignee: Ben Becker
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

The last line in the mongostat output always shows the port on the host even if the port is unspecified in the -h parameter.

03/01/12 17:14:03 david@mia-mtx-web2 ~: mongostat -h mia-mtx-md1a,mia-mtx-md2a,mia-mtx-md3a
 
                  	insert  query update delete getmore command flushes mapped  vsize    res faults locked % idx miss %     qr|qw   ar|aw  netIn netOut  conn  set repl       time 
      mia-mtx-md1a	   126      1    456      0       0      20       0  26.1g    53g  3.15g      0     22.5          0       0|0     0|0   427k    18k   241 mtx1    M   17:14:06 
      mia-mtx-md2a	   149      0    470      0       0       2       0  28.1g    57g  3.95g      0     23.7          0       0|0     0|2   526k     1k   228 mtx2    M   17:14:06 
mia-mtx-md3a:27017	   134      0    304      0       0      10       0  26.1g    53g  3.57g      0       16          0       0|0     0|0   404k     5k   219 mtx3    M   17:14:06 
 
      mia-mtx-md1a	    50      2    396      0       0      10       0  26.1g    53g  3.14g      0     16.6          0       0|0     0|0   354k    13k   241 mtx1    M   17:14:07 
      mia-mtx-md2a	   172      0    461      0       0      12       0  28.1g    57g  3.95g      0     17.7          0       0|0     0|0   375k     6k   228 mtx2    M   17:14:07 
mia-mtx-md3a:27017	   154      0    274      0       1      10       0  26.1g    53g  3.56g      1     12.3          0       0|0     0|0   288k     5k   219 mtx3    M   17:14:07 

03/01/12 17:14:08 david@mia-mtx-web2 ~: mongostat -h mia-mtx-md1a,ncr-mtx-md1b,mia-mtx-md2a,ncr-mtx-md2b,mia-mtx-md3a,ncr-mtx-md3b
 
                  	insert  query update delete getmore command flushes mapped  vsize    res faults locked % idx miss %     qr|qw   ar|aw  netIn netOut  conn  set repl       time 
      mia-mtx-md1a	   151      1    682      0       0      29       0  26.1g    53g  3.19g      0     33.2          0       0|0     0|0   661k    14k   241 mtx1    M   17:14:54 
      mia-mtx-md2a	   223      0    673      0       0      29       0  28.1g    57g  4.01g      0     31.4          0       0|0     0|1   759k    22k   228 mtx2    M   17:14:54 
      mia-mtx-md3a	   365      0    889      0       0      37       0  26.1g    53g  3.59g      2     42.3          0       0|0     0|2   963k    12k   218 mtx3    M   17:14:54 
      ncr-mtx-md1b	    *0     *0     *0     *0       0     2|0       0  24.1g  48.8g  2.91g      0        0          0       0|0     0|0   189b     1k    15 mtx1  SEC   17:14:54 
      ncr-mtx-md2b	no data
ncr-mtx-md3b:27017	    *0     *0     *0     *0       0     1|0       0  26.1g  52.7g  3.11g      0        0          0       0|0     0|0    62b     1k    15 mtx3  SEC   17:14:54 
 
      mia-mtx-md1a	    43      2    344      0       0       2       0  26.1g    53g  3.18g      0     14.5          0       0|0     0|0   294k     4m   241 mtx1    M   17:14:55 
      mia-mtx-md2a	   103      0    257      0       0       2       0  28.1g    57g     4g      0      9.7          0       0|0     0|0   223k     1k   228 mtx2    M   17:14:55 
      mia-mtx-md3a	   188      0    410      0       0      15       0  26.1g    53g  3.58g      0     17.5          0       0|0     0|0   437k     4m   218 mtx3    M   17:14:55 
      ncr-mtx-md1b	    *0     *0     *0     *0       0     9|0       0  24.1g  48.8g  2.93g      0        0          0       0|0     0|0   651b     5k    15 mtx1  SEC   17:14:55 
      ncr-mtx-md2b	    *0      1     *0     *0       0     2|0       0  24.1g  48.9g  2.39g      0        0          0       0|0     0|0   231b     2k    15 mtx2  SEC   17:14:55 
ncr-mtx-md3b:27017	   *97     *0   *213     *0       0     3|0       0  26.1g  52.7g  3.11g      0      5.9          0       0|0     0|0   317b     1k    15 mtx3  SEC   17:14:55 



 Comments   
Comment by auto [ 10/Jul/12 ]

Author:

{u'date': u'2012-07-09T18:27:15-07:00', u'name': u'Dan Pasette', u'email': u'dan@10gen.com'}

Message: SERVER-4598 - fix logic error which caused --port to be ignored
Branch: master
https://github.com/mongodb/mongo/commit/72bb1ff4505861377d240d245b8a3396c8643cf3

Comment by auto [ 04/Jan/12 ]

Author:

{u'login': u'', u'name': u'Ben Becker', u'email': u'ben.becker@10gen.com'}

Message: SERVER-4598: ensure appropriate display of hostname and port in mongostat
Branch: master
https://github.com/mongodb/mongo/commit/9c9c3dd1f3c08ee562932d401498f9407a2acd57

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