Is there a way to pass the server side commands in “asadm” from client code programmatically?
You can execute the server side asadm commands from the client code using the Info calls. However, the commands issued from the client are by default to a specific node and if you wish to execute the command on all the servers then looping around all the nodes in the cluster can be done.
Example 1: Java
To get the statistics from a specific node in the cluster you could do the following:
asinfo -v 'statistics'
Example 2: Java
To get the read latency for a certain duration on a node you could do the following
asinfo -v 'latency:' -l
Info Class C# API reference: https://www.aerospike.com/apidocs/csharp/html/T_Aerospike_Client_Info.htm
Info Class: Java API reference: https://www.aerospike.com/apidocs/java/com/aerospike/client/Info.html
To get the list of
asinfo commands that can be executed using the above method, please see the following link: http://www.aerospike.com/docs/reference/info/