You would need to have a user account on the cluster with ssh access and a public ssh key added to the cluster to avoid having to provide the password every time.
See the man page for "security login publickey" for more details.
To get the information you want, just run a command like:
ssh <clustername> volume show -volume <volumename> -fields policy, used, total
and parse the output.
Hope this helps.