This post is more than 5 years old

2 Intern

 • 

63 Posts

2105

August 11th, 2011 02:00

Clone job follow-up via CLI

Hi all,

I'm looking for something to do a follow-up of a clone job, via command-line.

I'm able to find information about the clone job via the jobquery command:

[bellatrix:/] echo "show

print type: clone job; job state: SESSION ACTIVE" | jobquery -i-

Will show all attributes

                         type: clone job;

             actual exit code: ;

                     authtype: ;

                   automatic: False;

           clone volumes list: ;

                     command: \ "nsrclone -vv -s bellatrix -J homan -b CloneNonNAS -y 10 year -S -f - ";

         completion severity: 20;

           completion status: ;

             dependent job id: 0;

                     end time: ;

             exit code known: ;

             failed savesets: ;

                         host: bellatrix;

                   input flag: False;

                       job id: 7495094;

                 job log file: ;

                   job state: SESSION ACTIVE;

                         name: "nsrclone of group ";

                   ndmp flag: False;

             number of files: ;

           NW Client name/id: ;

               parent job id: 0;

             previous job id: 0;

   Reason job was terminated: ;

               redirect stdio: False;

             remote password: ;

                 remote user: ;

                   saveset id: 2268892598, 3527186091;

               sibling job id: ;

                         size: ;

                   start time: 1313047326;

         successful savesets: ;

                       userid: root;

And I get some useful information from this output.

But I would also like to see how many data this cloning has already cloned.

Is it possible to get this information?

Kind regards

Tim

6 Operator

 • 

14.4K Posts

 • 

56.2K Points

August 11th, 2011 04:00

Of course you can.  From your output you get parent id which is 7495094.  Use that to query session info file where 7495094 would match "Jobid from session info".  Attributes you can use/query (unless you want them all):

# cat 01/0e996fea00000000000000004e42baa20af6f050 | cut -d: -f1
client name
completed
current pool
current read/write total
Device path
Jobid from session info
number of volumes used
recover file count
recover file total
savegroup name
saveset id
saveset name
Session end time
session id
Session mode
Session start time
total amount to be read/written
total volumes needed
transfer rate
type
volume name
resource identifier

736 Posts

August 11th, 2011 03:00

Hi Tim,

You could use nsradmin like this:

printf "show session;session statistics;session device name\nprint" | nsradmin -i - | tr -s "\n"

This gives a lot of session statistics data and you might want to play with it a bit to narrow it down to what you need.

More info on how this command works here:

How to run nsradmin commands in one line

-Bobby

2.4K Posts

August 11th, 2011 09:00

And you can use nsrwatch - with NW 762 even on Windows.

6 Operator

 • 

14.4K Posts

 • 

56.2K Points

August 12th, 2011 02:00

I didn't say parent id - I said "Jobid from session info".  This record is type session info as said before meaning it is located in /nsr/res/jobsdb/ssninfo.

2 Intern

 • 

63 Posts

August 12th, 2011 02:00

Thanks, those file contain some usefull info.

2 Intern

 • 

63 Posts

August 12th, 2011 02:00

Hrvoje Crvelin,

The parent id is always 0, it's the job id that is 7495094 in this example.

Where do you get the "session info file" you mention?

Kind regards

No Events found!

Top