Solved

Commvault CLI Command that Lists the Jobs in Pending Status with their "Client Computer"

  • 24 March 2023
  • 8 replies
  • 527 views

Badge +1

Is there a Commvault CLI command that will return a list of jobs and the “Client Computer” name with the job?

The command below does not list the “Client Computer” name.

qlist job

 

JOBID       OPERATION                STATUS       PHASE                 JOB DESCRIPTION    COMPLETE PERCENTAGE
-----       ---------                ------       -----                 ---------------    -------------------
21644490    Backup                   Queued       Backup                                   25
21731016    Backup                   Pending      Scan                                     5
21751110    Backup                   Pending      Scan                                     5

 

 

icon

Best answer by Jos Meijer 24 March 2023, 21:54

View original

8 replies

Userlevel 7
Badge +16

Hi @Donald Weihl Jr 

You can add different options to the command, for example:

-c  Client computer name

-a  Agent type installed on the client

-i  Instance name

-b Backup set name

-s Subclient name

Source:

https://documentation.commvault.com/2022e/expert/45167_qlist_job.html

 

 

Badge +1

Thank you for the information. 

 

As the documentation suggests, the CLI will not list the “Client Computers” that corresponds to the jobs.  I do not want to specify the client computer name.   I want the list of jobs that are pending with the corresponding client computer names.

 

All I can get are the job Ids.   I am looking for corresponding “Client Computers” that go with the Job Ids (like the Commcell Console’s Job Controller has but in text format).

Userlevel 7
Badge +16

My apologies you are correct.

I was under the impression it was for output options, but it is not 😑😔

Badge +1

I was hoping I was wrong and was just not seeing or finding the switch that would list the client computers  in the pending state.  

Userlevel 7
Badge +16

It's a dirty solution, but hope this helps a bit.

Will keep thinking about a more elegant solution, but this is not my best area to be honest:

for /f "tokens=1 skip=2 delims= " %i in ('qlist client') DO qlist job -c %i

Result is that per client name the jobs are shown, unfortunately in separate commands:

 

Badge +1

Thank you for the solution.  That will get the job done.  I can loop though several hundred client computers in a script and determine if they have a job in the pending status.  This will also facilitate troubleshooting the job/server as well.

 

Thank you again.

 

I just thought that Commvault would have a more elegant solution since the Commcell Console lists the job Id, job status, computer client, etc. all together in one window in a table format.

Userlevel 7
Badge +16

Your welcome 🙂

If I find a way to refine the output I will let you know

Userlevel 7
Badge +19

I would strongly recommend to look into the Powershell or Python SDKs as they offer way more flexibility and not invest a lot of time in scripting around these CLI-commands. 

Reply