Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

How to list jobs PDOS (CLI)

Created: 05 Nov 2012 | 2 comments
tocals's picture

Hello All.

Is there some command to list all PDOS jobs like bpdbjobs in NetBackup? I Was trying to create a similar report using the opsceter, but all clients recorded in the opscenter database has the client's name the puredisk server name.

Regards

Comments 2 CommentsJump to latest comment

Sachin Pathare's picture

Hi,

There is a command available using PureDisk CLI:

Location:/opt/pdcli/calls

Command # ./pdlistjob

Below is the link which can help if you need more information on other commands:

http://www.symantec.com/business/support/resources...

Hope that helps !!

Thank you.

Sachin Pathare
Sr. SQA Engineer
Symantec Corporation
Testing and Supporting NetBackup Appliances, NetBackup Puredisk, NetBackup Media Server Deduplication

f25's picture

PureDisk standard CLI is not that flexible as I would like it to be, but enjoy these:

This should be more usefull and less verbose.

1. List Data Selections:
# export PGPASSWORD=`/opt/pdag/bin/php /opt/pdconfigure/upgrade/legacy/actions/doafter/GetEntry.php /etc/puredisk/spa.cfg spadb password`
#  /opt/pddb/bin/psql -U pddb ca -c "select id,name,agentid,dstypeid from dataselection"

2. List agents:
# /opt/pddb/bin/psql -U pddb ca -c "select id,hostname,statustypeid,mbeid FROM agent where (isserveragent=0 and statustypeid >0)"

3. Query the "constant" table for job status:
# /opt/pddb/bin/psql -U pddb ca -c "select * from executionstatustype"

4. Query for job type:
# /opt/pdcli/calls # /opt/pddb/bin/psql -U pddb ca -c "select * from jobtype"

5. Combining 3 and 4 you can query for all the jobs that have failed or were aborted by watchdog:
# /opt/pddb/bin/psql -U pddb ca -c "select job.id,job.workflowid,job.agentid,job.dsid,workflow.name,dataselection.name from job,workflow,dataselection where (executionstatus=3 or executionstatus=8) and job.workflowid=workflow.id and job.dsid=dataselection.id"

6. You may want to have just the numbers, so query for a numbers of jobs that: failed/aborted by watchdog/success with errors jobs

Failed:
# /opt/pddb/bin/psql -U pddb ca -t -c "select count(job.id) from job where executionstatus=3"
Aborted by watchdog:
# /opt/pddb/bin/psql -U pddb ca  -t -c "select count(job.id) from job where executionstatus=8"
Success with errors:
# /opt/pddb/bin/psql -U pddb ca -t -c 'select count(job.id) from job where executionstatus=6'

7. List all jobs:
# /opt/pddb/bin/psql -U pddb ca -c "select * from job"

Disclaimer:
All those queries work(ed) for me at some point, I have not checked them "now" before pasting. This is a "non-supported" method. If you use "UPDATE" instead of select: you are on your own then. Be carefull with complicated queries as you may simply kill the DBMS hosting your SPA and MBE. Check the quotation marks and line breaks as this forum might have automatically affected it.

Never the less: have fun :)