09-26-2010 10:13 PM
Hi,
Solaris 9 with NetBackup Enterprise 6.5.4
I'm trying to monitor if there are any active jobs and that they really are writing to tape.
I get the status of bpdbjobs and check for "Active" jobs, after that I try to see if it is really writing by grepping for the bpbrm process.
That is when job type is 0=Backup AND Job state is 1=Active
I've tried "pgrep bpbrm" but that seems to work 99.5% of the time
I've tried "bpps | grep bpbrm" same there, works 99.5%.
Is there a better way to see that the "Active" job is really writing to tape?
I would like to see a Netbackup process so that I know netbackup is writing not something else.
- Roland
Solved! Go to Solution.
09-27-2010 12:35 AM
bptm is the process writing to tape, but an active bptm process is no guarantee that it's actually writing - the tape could be 'ready and waiting' for data to come through from the client(s). bptm can only write to tape once it has a full buffer.
O/S command such as :
# iostat -xn 3 |grep rmt
will tell you if there's real I/O.
09-27-2010 12:35 AM
bptm is the process writing to tape, but an active bptm process is no guarantee that it's actually writing - the tape could be 'ready and waiting' for data to come through from the client(s). bptm can only write to tape once it has a full buffer.
O/S command such as :
# iostat -xn 3 |grep rmt
will tell you if there's real I/O.
09-27-2010 12:48 AM
I would also use bpdbjobs but a simple grep is properly not enough. If you do a bpdbjopbs -most_columns you can script a job that check field:
1 (jobtype) is 0 or 4
2 (state) is 1
9 (elapsed time) is not 0
39 (kilobytes) Raise a alarm is field 39 is 0
0 = Activity monitor jobid
1 = Jobtybe 0 = backup 4 =duplicate 6 = catalog backup 17 = image cleanup
2 = State 0 = queued 1=active 2=wait for retry 3=done
4 = Policy
5 = Schedule
6 = Client
9 = elapsed time in EPOCH timeformat.
39 = kilobytes
Do a "man bpdbjobs" for full details about the different fields of bpdbjobs
09-27-2010 03:28 PM
I'm using bpdbjobs, but as I don't know when the monitor script is running it is hard to script all possible solutions.
Often I see that the monitor script is running when the backup process is in the middle of starting.
ie. it has no elapsed time yet, it has no kbytes yet.
maybe I should just make a loop and sleep 10sec and grep for bpbrm again.
ps. 10 = elapsed
15 = kilobytes
http://www.symantec.com/business/support/index?page=content&id=TECH65123
09-27-2010 03:36 PM
Isn't bptm a child process of bpbrm?
If there is no bpbrm, bptm can't exist?
Or is this a faulty assumption?
I have a debuglog of my monitor script that says that there is no pbbrm even when the job is actually writing to tape.
Is this possible? or is this maybe a bug in Solaris pgrep?
09-27-2010 10:10 PM
Correct - bptm is a child process of bpbrm but neither process is guarantee that there's actual I/O.
I personally use iostat when I want to check actual throughput.