Quickly View gFlags Values from the Command Line

There are numerous configuration flags, gFlags in YugabyteDB, which allow you to fine tune the core database services yb-master and yb-tserver. Several examples include use_node_to_node_encryption, yb_num_shards_per_tserver and client_read_write_timeout_ms.

To quickly view a value of a particular gFlags, you can curl the Master (Port 7000) and T-Server (Port 9000) UIs, then grep the name of the gFlag.

  • Master: http://master-ip-address:7000/varz
    T-Server: http://t-server-ip-address:9000/varz

Example:

				
					[root@localhost ~]# curl -s http://master-ip-address:7000/varz | grep -i "\-\-client_read_write_timeout_ms"
--client_read_write_timeout_ms=60000

[root@localhost ~]# curl -s http://t-server-ip-address:9000/varz | grep -i "\-\-client_read_write_timeout_ms"
--client_read_write_timeout_ms=60000
				
			

Update:

Starting in YugabyteDB 2.15, the above curl commands will return data as HTML.

You can revert back to raw data and search for a paricular gFlag using the ?raw parameter in the URL.

				
					[root@localhost ~]# curl -s http://master-ip-address:7000/varz?raw | grep "\-\-client_read_write_timeout_ms"
--client_read_write_timeout_ms=60000

[root@localhost ~]# curl -s http://t-server-ip-address:9000/varz?raw | grep "\-\-client_read_write_timeout_ms"
--client_read_write_timeout_ms=60000
				
			

Have Fun!