NetWorker
Posts
Unsolved
This post is more than 5 years old
14 Posts
0
986
July 20th, 2017 07:00
Clients in VBA
Is there a way to get a count of clients in each VBA?
Responses(1)
No Events found!
Unsolved
This post is more than 5 years old
14 Posts
0
986
Is there a way to get a count of clients in each VBA?
Top
Anonymous
5 Practitioner
5 Practitioner
•
274.2K Posts
0
April 13th, 2018 12:00
Yes a small script you can get the count of clients protected by VBA=
1. First get the vcenter name using the below command :-
cat /usr/local/vdr/etc/vcenterinfo.cfg | grep vcenter-hostname | cut -d '=' -f 2
2.Using the output from the above command , use that in below command:-
avmgr getl --path=/$vcenter_name/VirtualMachines | awk '{print $2}' | tail -n+2 | wc -l
==========================================================
To be simplified if you want in a script then :-
1. ssh to vba and then create a file using ==> vi count.sh
2.Paste the below lines in it and save using :wq!
#!/bin/bash
clear
vcenter_name=$(cat /usr/local/vdr/etc/vcenterinfo.cfg | grep vcenter-hostname | cut -d '=' -f 2)
client_count=$(avmgr getl --path=/$vcenter_name/VirtualMachines | awk '{print $2}' | tail -n+2 | wc -l)
echo $client_count
3.After that change the permission of the file using => chmod 755 count.sh
4.Run the script using ==> ./count.sh
====================================
Hope that helps !!
Remember to mark the thread as helpful and resolved if that resolves your query.
Aayush.