How to run "summary" command outside of asadm prompt?

We have a requirement to get the aerospike cluster details via a shell script, so trying to find a way to run “summary” command outside of “Admin>” prompt i.e. without running asadm and to enter “Admin>” prompt.

Below is working but hard to script

aerospike@xxxx [/home/aerospike]
==>asadm
Seed:        [('127.0.0.1', 3000, 'xxxx')]
Config_file: /home/aerospike/.aerospike/astools.conf, /etc/aerospike/astools.conf
Aerospike Interactive Shell, version 0.3.3

Enter Password:
Found 3 nodes
Online:  

Admin> summary

=======

Is there any way we can run it out side asadm like asinfo -v “summary” ?

The summary command is implemented in asadm, so you will have to use asadm to run that particular command. That said are you familiar with the “-e” option?

-e --execute Execute a single or multiple asadm commands and exit.
The input value is either string of ‘;’ separated asadm
commands or path of file which has asadm commands (ends with ‘;’).

You can invoke the “summary” command by issuing:

asadm -h "127.0.0.1" -e "summary"

(Note that the host address, “-h "127.0.0.1”, is only is only needed when Aerospike is running on a remote machine.)

Awesome, thanks for a quick response and the asadm with -e option works great.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.