Using admintools to List Nodes for a Particular Database

Jim_KnicelyJim_Knicely Administrator, Moderator, Employee, Registered User, VerticaExpert

The Vertica Administration tools allow you to easily perform administrative tasks such as quickly viewing information and statuses of all database nodes via the list_allnodes tool.

Example:

[[email protected] ~]$ admintools -t list_allnodes
Node                    | Host          | State | Version         | DB
-------------------------+---------------+-------+-----------------+--------------
v_port_5432_node0001    | 192.168.2.200 | DOWN  | vertica-9.1.1.1 | port_5432
v_port_5435_node0001    | 192.168.2.200 | DOWN  | vertica-9.1.1.1 | port_5435
v_rename_me_node0001    | 192.168.2.200 | DOWN  | vertica-9.1.1.1 | rename_me
v_rename_me_node0002    | 192.168.2.201 | DOWN  | vertica-9.1.1.1 | rename_me
v_rename_me_node0003    | 192.168.2.202 | DOWN  | vertica-9.1.1.1 | rename_me
v_sfdc_node0001         | 192.168.2.200 | DOWN  | vertica-9.1.1.1 | sfdc
v_test_4_nodes_node0001 | 192.168.2.200 | DOWN  | vertica-9.1.1.1 | test_4_nodes
v_test_4_nodes_node0002 | 192.168.2.201 | DOWN  | vertica-9.1.1.1 | test_4_nodes
v_test_4_nodes_node0003 | 192.168.2.202 | DOWN  | vertica-9.1.1.1 | test_4_nodes
v_test_4_nodes_node0004 | 192.168.2.203 | DOWN  | unavailable     | test_4_nodes
v_test_db_node0001      | 192.168.2.200 | UP    | vertica-9.1.1.1 | test_db
v_test_db_node0002      | 192.168.2.201 | UP    | vertica-9.1.1.1 | test_db
v_test_db_node0003      | 192.168.2.202 | UP    | vertica-9.1.1.1 | test_db

If I only want to see the IP addresses and states of the nodes from a particular database, I could combine the Linux grep and awk commands to limit the output of admintools like so:

[[email protected] ~]$ admintools -t list_allnodes | grep test_db | awk '{print $1,$3,$5}'
v_test_db_node0001 192.168.2.200 UP
v_test_db_node0002 192.168.2.201 UP
v_test_db_node0003 192.168.2.202 UP

Helpful link:
https://my.vertica.com/docs/9.1.x/HTML/index.htm#Authoring/ConceptsGuide/Components/TheAdministrationTools.htm

Have fun!

Sign In or Register to comment.