-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
685
Problem Statement/Rationale
Command "mongostat -h COMMA_SEPARATED_HOST:PORTS -n 1" always resulting "TOTAL(COMMA_SEPARATED_HOST:PORTS) - 1" report entries (last host's stats output is missing)
When the host input(-h) has single host:port entry, it is giving the expected report.
Steps to Reproduce
mongostat -h COMMA_SEPARATED_HOST:PORTS -n 1
Expected Results
mongostat comand has to show stats for all the input host:ports
Actual Results
Last host's stats are missing when -h has multiple hosts and for single iteration(-n 1)
Additional Notes
Issue: command "mongostat -h COMMA_SEPARATED_HOST:PORTS -n 1" always resulting "TOTAL(COMMA_SEPARATED_HOST:PORTS) - 1" report entries (last host's stats output is missing)
When the host input(-h) has single host:port entry, it is giving the expected report.
Note: When mongostat command ran with '-n 2'(2 number of iterations), in the second iteration, it is giving the expected output.
Issue observing in mongo v5.0.20 FIPS (mongostat version: 100.7.5) & mongo v4.4.18 FIPS (mongostat version: 100.6.1)
In the sample output below, the number of input host:port are 6 but the report is showing only 5 host:port details.
[root@localhost ~]# mongostat --quiet $mongo_auth -o 'host,insert,query,update,delete,dirty,used,set,repl' -h sessionmgr09:27737,sessionmgr10:27747,sessionmgr11:27757,sessionmgr12:27767,sessionmgr13:27787,sessionmgr14:27717 -n 1
host insert query update delete dirty used set repl
sessionmgr09:27737 *0 10 *223 *0 3.0% 77.5% set01 SEC
sessionmgr10:27747 *0 230 230 *0 0.3% 18.6% set02 SLV
sessionmgr11:27757 *0 1 *0 *0 1.0% 26.5% set03 SEC
sessionmgr12:27767 *0 *0 *0 *0 0.8% 10.4% set04 SLV
sessionmgr13:27787 *0 *0 *0 *0 0.0% 12.8% set05 SEC
In the sample output below, the number of input host:port are 6 but the report is showing only 5 host:port details in the first iteration and in second iteration, it is showing all the 6 host:port details
[root@localhost ~]# mongostat --quiet $mongo_auth -o 'host,insert,query,update,delete,dirty,used,set,repl' -h sessionmgr09:27737,sessionmgr10:27747,sessionmgr11:27757,sessionmgr12:27767,sessionmgr13:27787,sessionmgr14:27717 -n 2
host insert query update delete dirty used set repl
sessionmgr09:27737 *0 5 *149 *0 3.3% 77.3% set01 SEC
sessionmgr10:27747 *0 229 229 20 0.3% 18.7% set02 SLV
sessionmgr11:27757 *0 1 *0 *14 1.0% 26.5% set03 SEC
sessionmgr12:27767 *0 *0 *0 *0 0.8% 10.4% set04 SLV
sessionmgr13:27787 *0 *0 *0 *0 0.0% 12.8% set05 SEC
host insert query update delete dirty used set repl
sessionmgr09:27737 *0 3 *260 *0 3.4% 77.3% set01 SEC
sessionmgr10:27747 *0 227 227 6 0.3% 18.7% set02 SLV
sessionmgr11:27757 *0 *0 *0 *5 1.0% 26.5% set03 SEC
sessionmgr12:27767 *0 *0 *0 *0 0.8% 10.4% set04 SLV
sessionmgr13:27787 *0 *0 *0 *0 0.0% 12.8% set05 SEC
sessionmgr14:27717 *0 8 *213 *0 1.8% 77.4% set06 SEC
[root@localhost ~]#
Verbose outputs are attached