Skip to main content
Answer

Command line query the status of a MediaAgent

  • October 21, 2021
  • 3 replies
  • 649 views

Forum|alt.badge.img

Are there any command line (qscript?) methods to query the state of a MediaAgent (on-line/maintenance mode)?

From time to time things get busy at the end of a maintenance window and the MA is stranded in maintenance mode. I’d like to scan all MAs at the end of the business day and flag any that are in maintenance mode, or put them into service.

Thanks.


Marc

Best answer by Stuart Painter

Hi @MarcS 

This thread explains how you can change MA maintenance status:
 

 

It doesn’t query or return status, the script mentioned simply sets/unsets the maintenance mode flag on the MA.

Thanks,

Stuart

3 replies

Forum|alt.badge.img
  • Author
  • Novice
  • October 21, 2021

Details: Hyperscale 1.5, RHEL 7.9, Ansible, qscript, shell scripting all in common use


Mike Struening
Vaulter
Forum|alt.badge.img+22

Try this one:

https://documentation.commvault.com/11.24/expert/45252_qoperation_checkready.html

It’s not Media Agent specific, but will work for your needs.

Let me know if that helps!


Forum|alt.badge.img+15

Hi @MarcS 

This thread explains how you can change MA maintenance status:
 

 

It doesn’t query or return status, the script mentioned simply sets/unsets the maintenance mode flag on the MA.

Thanks,

Stuart