In some cases, you may need to gather an information about a given connection to the server. This can be useful for troubleshooting or diagnosing the errors in the server.
In this tutorial, we will learn how to show the information about a connection to the Milvus server using the Milvus CLI.
Requirements:
To follow along with this tutorial, ensure that you have the following:
- Milvus server on your local machine or a remote instance
- Installed Milvus CLI on your machine
With the given requirements met, we can proceed with the tutorial.
Show the Connection Command in Milvus
In order to show the details of the current connection to the Milvus server, we use the “show connection” command.
The command syntax is as follows:
The -a parameter tells the “show connection” command to list the details of all the available commands in the server.
Command Usage
To demonstrate how to use the “show connection” command, let us start by connecting to the Milvus server. You can use the Milvus CLI utility.
The previous command should take you to the Milvus CLI interface. You can run the “connect” command to connect to your target Milvus server.
This should connect to the Milvus server that runs on the localhost on the default port. You can check our tutorial https://linuxhint.com/milvus-connect command to learn more.
Once connected, run the “show connection” command to show the information about the current connection.
Resulting Output:
| Address | localhost:19530 |
| User | |
| Alias | default |
+---------+-----------------+
The command returns an information about the current connection including the connection address, the connected user, and the alias.
To show the information about all the connections to the server, you can use the -a parameter as follows:
This command should return an information about any other connections to the server as demonstrated in the following:
| Alias | Instance |
+---------+-------------------------------------
| default | <pymilvus.client.grpc_handler.GrpcHandler object at 0x7f48d440d1b0> |
+---------+--------------------------------------
In this case, the command shows an information about the connection status on the PyMilvus client.
Conclusion
This post covered the basics of working with the “show connection” command to show an information about the current connection. Feel free to use the documentation to learn more about the commands that are discussed in this post.