Support Questions

Find answers, ask questions, and share your expertise

How many users connected to HiveServer2

avatar
Explorer

Hi Folks,

Can anyone tell me how to check how many users are connected to the hive server2?

And  along with can we see which user is connected ?

1 ACCEPTED SOLUTION

avatar
Expert Contributor

Hi @Nil_kharat 

 

Question: Can anyone tell me how to check how many users are connected to the hive server2?

Answer: Login to the server where hiveserver2 is running and run the below command to figure out the number of connections to the HS2

# netstat -ntpl | grep 10000
In the above command 10000 is the HS2 port number

You can also check this from Cloudera manager

CM > Hive_on_Tez > Instances > HiveServer2 > Open Connections


And along with can we see which user is connected?

If you enable Hiveserver2 UI then under Active Sessions you can see which user connected from which IP.
Please check the below link.
https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2#SettingUpHiveServer2-WebUIfo...

 

If you are happy with the answer, mark it Accept as solution

View solution in original post

3 REPLIES 3

avatar
Expert Contributor

Hi @Nil_kharat 

 

Question: Can anyone tell me how to check how many users are connected to the hive server2?

Answer: Login to the server where hiveserver2 is running and run the below command to figure out the number of connections to the HS2

# netstat -ntpl | grep 10000
In the above command 10000 is the HS2 port number

You can also check this from Cloudera manager

CM > Hive_on_Tez > Instances > HiveServer2 > Open Connections


And along with can we see which user is connected?

If you enable Hiveserver2 UI then under Active Sessions you can see which user connected from which IP.
Please check the below link.
https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2#SettingUpHiveServer2-WebUIfo...

 

If you are happy with the answer, mark it Accept as solution

avatar
Explorer

Thank you so much @Shifu 

can we have these command also

lsof -i:10000 | grep 'ESTABLISHED' | wc -l

avatar
Expert Contributor

Hi @Nil_kharat 

 

Yes, you can also use the particular lsof command as well to figure out the number of established connections to the particular port.