Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trylogs - possible to increase verbosity?

Status
Not open for further replies.

NZ1

Technical User
Joined
Jan 24, 2005
Messages
1
Location
US
Hello all,

We've recently upgraded to NetBackup 4.5GA on our Solaris 8 Sun box which acts as our NetBackup Server. I would like to know if there is a way to increase verbosity or have the trylogs print more details (files i'm referring to are in ~/netbackup/db/jobs/trylogs).

This would help us greatly as we have a script that looks in these files to gather and display transfer speeds of backups. This has been working fine prior to our upgrade (3.x) and now the contents of these files have minimal data while the backup is in process (ie, it doesnt show transfer speeds or other/more detailed info anymore):

# more 177029.t
Try 1
PROCESS 1106585977 9037 bpbrm
CONNECT 1106585977
CONNECTED 1106585977
MOUNTED 1106585978
POSITIONING 1106585978 000481 17
POSITIONED 1106585996
BEGIN_WRITING 1106585996
#

Thanks in advance, I tried looking for a trylog from when more data was written to it, but it seems our old logs have been removed.
 
NZ1, thanks for reminding me, i keep meaning to look into this too. Same here, pre 4.5 it was very handy indeed to tail the logs of a particular back, grepping just for the transfer speed. Don't know how to obtain this info in 4.5 yet

Rich
 
Guys,

Hopefully this will help you. I have not made a script to do this yet..

bpdbjobs -report -all_columns

#fields of bpdbjobs output
# 0 jobid
# 1 jobtype
# 2 state
# 3 status
# 4 class
# 5 schedule
# 6 client
# 7 server
# 8 started
# 9 elapsed
# 10 ended
# 11 stunit
# 12 try
# 13 operation
# 14 kbytes
# 15 files
# 16 pathlastwritten
# 17 percent
# 18 jobpid
# 19 owner
# 20 subtype
# 21 classtype
# 22 schedule_type
# 23 priority
# 24 group
# 25 masterserver
# 26 retentionunits
# 27 retentionperiod
# 28 compression
# 29 kbyteslastwritten
# 30 fileslastwritten
# 31 filelistcount
# 32 [files]...
# 33 trycount
# 34 trypid
# 35 trystunit
# 36 tryserver
# 37 trystarted
# 38 tryelapsed
# 39 tryended
# 40 trystatus
# 41 trystatusdescription
# 42 trystatuscount
# 43 [trystatuslines]...
# 44 tryfileswritten]
 
I needed a break from work so.. I ended up with this..

#!/bin/perl
open(INFILE, "/usr/openv/netbackup/bin/admincmd/bpdbjobs -report -most_columns |");
while (<INFILE>) {
# These are from bpdbjobs (-all_columns, if using with -most_columns, YMMV)
# 0 jobid
# 1 jobtype
# 2 state
# 3 status
# 4 class
# 5 schedule
# 6 client
# 7 server
# 8 started
# 9 elapsed
# 10 ended
# 11 stunit
# 12 try
# 13 operation
# 14 kbytes
# 15 files
# 16 pathlastwritten
# 17 percent
# 18 jobpid
# 19 owner
# 20 subtype
# 21 classtype
# 22 schedule_type
# 23 priority
# 24 group
# 25 masterserver
# 26 retentionunits
# 27 retentionperiod
# 28 compression
# 29 kbyteslastwritten
# 30 fileslastwritten
# 31 filelistcount
# 32 [files]...
# 33 trycount
# 34 trypid
# 35 trystunit
# 36 tryserver
# 37 trystarted
# 38 tryelapsed
# 39 tryended
# 40 trystatus
# 41 trystatusdescription
# 42 trystatuscount
# 43 [trystatuslines]...
# 44 tryfileswritten]
# 34 KB/sec (from -most_columns, -all_columns is 54 or 55)

chomp $_;
@f = &parse_csv ($_);

$jobid = @f[0];
$jobtype = @f[1];
$state = @f[2];
$status = @f[3];
$class = @f[4];
$schedule = @f[5];
$client = @f[6];
$server = @f[7];
$started = @f[8];
$elapsed = @f[9];
$ended = @f[10];
$stunit = @f[11];
$try = @f[12];
$operation = @f[13];
$kbytes = @f[14];
$files = @f[15];
$pathlastwritten = @f[16];
$percent = @f[17];
$jobpid = @f[18];
$owner = @f[19];
$subtype = @f[20];
$classtype = @f[21];
$schedule_type = @f[22];
$priority = @f[23];
$group = @f[24];
$masterserver = @f[25];
$retentionunits = @f[26];
$retentionperiod = @f[27];
$compression = @f[28];
$kbyteslastwritten = @f[29];
$fileslastwritten = @f[30];
$filelistcount = @f[31];
$trycountrow = $fileslistcount + 32;
$trycount = @f[$trycountrow];
$kbsec = @f[34];

chomp($masterserver);
print "$jobid,$status,$kbsec,$client,$masterserver\n";
}

close(INFILE);

sub parse_csv {
my $text = $_[0];
my @new = ();
push(@new, $+) while $text =~ m{
"([^\"\\]*(?:\\.[^\"\\]*)*)",?
| ([^,]+),?
| ,
}gx;
push(@new, undef) if substr($text, -1,1) eq ',';
return @new;
}


This will produce output like..

4630440,0,2939,server1.site.com,master.site.com
4630439,0,2952,server2.site.com,master.site.com
4615138,,,,master.site.com

The first two lines show job, success 0, 2939KB/sec, server, and master.. the last is a job still running..

*shrug* its somewhere to start =)
 
lol :)
what i'm after is the ability to monitor a particular job at command line, like we used to pre 4.5. - and watch for things like path written, or more helpfully, the actual KB Written, as it happens. Don't necessarily trust the KB/sec you get from the GUI. While a job is running, the gui can't be trusted for this figure...

Rich
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top