cancel
Showing results for 
Search instead for 
Did you mean: 

How to use logs

Soumyaa
Level 4

Hello All,

I had a very basic doubt in using logs in Netbackup. I dont need info of where logs will reside, but I need ways to use them

For example, today I had an error 84 for a client at 4:27:00. To check the log I was in bptm and listed out the files and I found todays log log.122011

I am on AIX Master server putty

now when I tried to read this with more <logfilename>, I am getting more information. I think verbose is set at 5.

Now my requirement is to search the whole log with client name or with specified timeline. How to do this in AIX? 

Thanks,

Soumya

1 ACCEPTED SOLUTION

Accepted Solutions

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

99% of errors can be traced with level 0 log.

 Level 5 makes the logs very big and very difficult to read. I only ever increase logging level to 5 when I cannot figure out what the problem is and need to log a call with Symantec support and the engineer asks for level 5 logs.

2 things you need to know about NBU logs:

1. debug codes in these brackets: < >
<2>  debug
<4>  info
<8>  warning
<16> error
<32> sever error

2. Process id in square brackets [ ]
These days the bptm PID is listed in the job details.
Each backup job will have its own PID. If multiplexing is used, there could be a number of different PID's logged bptm log at more or less the same time.

So, if bptm PID in job details is 12345 for example, I would start with
grep 12345 logfile   (today's logfile should be 123011.log)
(DON'T 'grep [12345] logfile - square brackets have special meaning in Unix shell - it will look for all lines containing 1 or 2 or 3 or 4 or 5.)

Look for the <16> that will have the error. The couple of lines above the <16> will contain debug info <2> that will tell you what happened/lead up to the error.

 

Please also understand that bptm log on MEDIA server must be looked at. If the master is also the media server, then you need bptm log on master.

View solution in original post

6 REPLIES 6

Will_Restore
Level 6

is just a text file so standard commands will work, i.e. grep <timestamp> <logfile>

J_H_Is_gone
Level 6

if you are using the more command and you have the file displayed on your screen

press the / key  - this starts the search function

then type in your server name at the prompt (remember unix is CASE Sensitive) so if your server is in your client list with all caps search for it with all caps, of all lower - search for it with all lower.  and hit return it will take you to the next place in the file it finds it.

you can the scroll backwards (up the file) if needed with the 'b' key.  or down with the return or space key.

if you then hit the letter 'n'  it will take you to the next place it finds the word you are searching for.

you can go online and look up instructions on how to use vi - the search function that you use in more is the same search you use in vi.

Douglas_A
Level 6
Partner Accredited Certified

I would suggest simply using a search string in the file.

 

ex. file name is 122911.log

cmd: cat 122911.log | more

then do <esc> :

/search criteria

enter

keep pressing enter till you find the start of what you are looking for.

 

Alternativly if you are looking up a specific job PID, you can get it from the Detailed Status log of the failed job and search the corrisponding log file for the PID. This will give you both the start/end time of a job and the client information.

J_H_Is_gone
Level 6

cat 122911.log | more

is the same as

more 122911.log

what extra do you get our of using the cat command?

Douglas_A
Level 6
Partner Accredited Certified

Nothing extra.. i just happen to like it better :) if i remember correctly they both do the samn thing.

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

99% of errors can be traced with level 0 log.

 Level 5 makes the logs very big and very difficult to read. I only ever increase logging level to 5 when I cannot figure out what the problem is and need to log a call with Symantec support and the engineer asks for level 5 logs.

2 things you need to know about NBU logs:

1. debug codes in these brackets: < >
<2>  debug
<4>  info
<8>  warning
<16> error
<32> sever error

2. Process id in square brackets [ ]
These days the bptm PID is listed in the job details.
Each backup job will have its own PID. If multiplexing is used, there could be a number of different PID's logged bptm log at more or less the same time.

So, if bptm PID in job details is 12345 for example, I would start with
grep 12345 logfile   (today's logfile should be 123011.log)
(DON'T 'grep [12345] logfile - square brackets have special meaning in Unix shell - it will look for all lines containing 1 or 2 or 3 or 4 or 5.)

Look for the <16> that will have the error. The couple of lines above the <16> will contain debug info <2> that will tell you what happened/lead up to the error.

 

Please also understand that bptm log on MEDIA server must be looked at. If the master is also the media server, then you need bptm log on master.