backups

How do I check for long running backups in NetBackup?

Monitoring long running backups in NetBackup can be a somewhat difficult task unless you check the activity monitor regularly. To make things easier, I wrote a script that will monitor active jobs and report on those that have been running for longer than 24 hours.

/usr/openv/netbackup/bin/admincmd/bpdbjobs -report -all_columns | nawk -F”,” ‘BEGIN{printf (“%-25s %-25s %-25s %-25s\n”, “Client”, “Policy”, “Schedule”, “Run Time\n=================================================================================================”)} $3!=3 && $10>86400 {printf (“%-25s %-25s %-25s %-25s\n”, $7, $5, $6, $10/3600 ” hours”)}’

The $10>86400 means if the 10th field (run time in seconds) is greater than 86400 seconds (24 hours). To change that value to some other time, just multiply by 60 to convert it to seconds. For example, if you want to check for backups running longer than 4 hours, you need to convert that to seconds. 4 x 60 x 60 = 14400 seconds. Just plug in 14400 in where 86400 currently is and you’ll be all set.

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

To Top