Hi Guys,
Hope everyone is doing good.
Is there in windows command to be used on the MA to check if there are any running jobs on that MA ?
Kind regards.
Hi Guys,
Hope everyone is doing good.
Is there in windows command to be used on the MA to check if there are any running jobs on that MA ?
Kind regards.
Good morning. There is no way to do this from Windows as Windows would only see processes.
You could use powershell to tail a log file.
For example:
Get-Content <log file path\filename> -Wait
You can also filter on specific keywords by using:
Get-Content <log file path\filename> -Wait | where { $_ -match “Enter what you want to filter on” }
But this will not report a list, this will only provide insight just as gxtail would.
Depending on the log selection it will show you job id's.
It would be easier to use the java gui in my honest opinion, then you can sort/filter on the media agent column within the Job Controller.
You could go to Command Center and filter the clients based on “Last backed up”.
You could use powershell to tail a log file.
For example:
Get-Content <log file path\filename> -Wait
You can also filter on specific keywords by using:
Get-Content <log file path\filename> -Wait | where { $_ -match “Enter what you want to filter on” }
But this will not report a list, this will only provide insight just as gxtail would.
Depending on the log selection it will show you job id's.
It would be easier to use the java gui in my honest opinion, then you can sort/filter on the media agent column within the Job Controller.
Thanks,
Is there any way to automate this ? With an internal script to power off the MA ? Or regroup all the aux copies into one workflow and after finishing all the aux copies, run a script on the workflow to power off the MA ?
Any suggestion would be great ! :)
Easiest way to achieve what you want to do, is to leverage the APIs and consume them through the Powershell SDK or the Python SDK. Alternatively you could run a qscript on the command line on the MA and parse the output of a qscript → "qoperation execscript -sn GetAllRunningJobs".
Easiest way to achieve what you want to do, is to leverage the APIs and consume them through the Powershell SDK or the Python SDK. Alternatively you could run a qscript on the command line on the MA and parse the output of a qscript → "qoperation execscript -sn GetAllRunningJobs".
Hi
Thanks for the reply.
Actually, the main purpose is just to be able to power off a remote MA which will receive multiple Aux Copies. I know it's possible to automate and achieve this through workflows.
Theoretically, I got the scenario of how it can happen, but I’m not used to workflows, unfortunately.
I wanted to create and schedule a workflow which checks if there is any Aux Copy running on the remote MA, if it founds that there is still some, the workflow ends. If no Aux Copy is running, then ask the remote MA to execute a command to Power OFF itself.
I hope your Windows VM runs virtualized on VMware, because in that case you could look at a feature called power management which exactly does this trick, even while taking into account AUX-copies https://documentation.commvault.com/11.26/essential/101313_cloud_mediaagent_power_management.html
In case you are running it on physical hardware or virtualized on an unsupported hypervisor type than I would automate it through Powershell or Python and stay away from workflows. The amount of people who have great understanding of workflows while the audience who know how to right code in either PS or Python is so much bigger.
I hope your Windows VM runs virtualized on VMware, because in that case you could look at a feature called power management which exactly does this trick, even while taking into account AUX-copies https://documentation.commvault.com/11.26/essential/101313_cloud_mediaagent_power_management.html
In case you are running it on physical hardware or virtualized on an unsupported hypervisor type than I would automate it through Powershell or Python and stay away from workflows. The amount of people who have great understanding of workflows while the audience who know how to right code in either PS or Python is so much bigger.
Yes, we are using Virtualized MA VMs, but they are not in the cloud, which as per my understanding Power Management is not feasible in this case.
See→ https://documentation.commvault.com/11.24/essential/101313_cloud_mediaagent_power_management.html#support-for-cloud-vendor-systems
You could use powershell to tail a log file.
For example:
Get-Content <log file path\filename> -Wait
You can also filter on specific keywords by using:
Get-Content <log file path\filename> -Wait | where { $_ -match “Enter what you want to filter on” }
But this will not report a list, this will only provide insight just as gxtail would.
Depending on the log selection it will show you job id's.
It would be easier to use the java gui in my honest opinion, then you can sort/filter on the media agent column within the Job Controller.
Hi
But I strongly recommend to leverage the APIs!
But I strongly recommend to leverage the APIs!
Thanks a lot
Actually, the client wants to manually automate the process without using nor Cloud controller nor APIs unfortunately, but only scripts.
The qscripts that you provided are really helpful, unfortunately didn’t find one which may give me the list of MediaAgent of the running jobs, so I thought of adding a description on the jobs that I need to filter, the description will be used as an ID for my filtering.
The qscript I gave you shows the MediaAgent that is running the job. But you'll have to parse it somehow correctly to make sure you extract the right information. Anyway API's are consumed through Powershell or Python so you could argue this is also some form of programming/scripting ;-)
The qscript I gave you shows the MediaAgent that is running the job. But you'll have to parse it somehow correctly to make sure you extract the right information. Anyway API's are consumed through Powershell or Python so you could argue this is also some form of programming/scripting ;-)
Thanks a lot
The qscript I gave you shows the MediaAgent that is running the job. But you'll have to parse it somehow correctly to make sure you extract the right information. Anyway API's are consumed through Powershell or Python so you could argue this is also some form of programming/scripting ;-)
Thanks a lot
Hi
Had another question if you don’t mind, from the qscript that you shared previously "qoperation execscript -sn GetAllRunningJobs", I can retrieve the list of all the running jobs with the list of used MAs as expected, is there a way (Maybe an option added to the command) to filter the output to only display the column of the MediaAgents ? That way, I can use findstr to filter only the list of the MAs that I need.
The qscript I gave you shows the MediaAgent that is running the job. But you'll have to parse it somehow correctly to make sure you extract the right information. Anyway API's are consumed through Powershell or Python so you could argue this is also some form of programming/scripting ;-)
Thanks a lot
Hi
Had another question if you don’t mind, from the qscript that you shared previously "qoperation execscript -sn GetAllRunningJobs", I can retrieve the list of all the running jobs with the list of used MAs as expected, is there a way (Maybe an option added to the command) to filter the output to only display the column of the MediaAgents ? That way, I can use findstr to filter only the list of the MAs that I need.
see → https://documentation.commvault.com/11.24/expert/45269_qoperation_execscript.html
Thanks in advance.
I’m getting an error while running this qscript :
"qoperation execscript -sn GetAllRunningJobs"
"Failed at RunStringQuery_QS! Error: rFailed to execute SQL Script!]."
I was trying to run this using workflow , and the activity fails.
it give a list of jobs i can see that in the logs, but activity fails..
or is there an API for this operation?
GetAllRunningJobs
https://api.commvault.com/#32817dcd-1d66-4857-8ff0-6b4a5b8e8fd5
GET job and a bunch more that should provide what you need
somehow i’m not able to filter the DDB verification jobs
i tried filtering with jobCategory=Active & jobFilter=82,100,80
as mentioned in
https://documentation.commvault.com/v11/essential/105923_jobfilter_parameter_values.html
Also when i give jobFilter value as ALLOPS, its giving me null
the output is empty
so ALLOPS means it must include all operations right , like backup/restore/ddb verification/Snapbackup etc
I’m looking to get the data of all active jobs at the moment when i’m running this API
Also i think something is missing in this documentation
What is the jobFilter value to use so that it returns all jobtypes?
in the documentation it says to give like this
All job types - for example, Job?clientId=2&jobFilter=
is this the right way, with jobFilter value empty?
https://documentation.commvault.com/v11/essential/47608_rest_api_get_job.html
Also this api doesn’t return the media agent in use for the active job :(, i was specifically looking for that
I dont see that in the response parameters
I’ll talk to some of our devs about this and have someone get back to you
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.