#!/bin/bash # # Program: Netbackup throughput # # Author: Matty < matty91 at gmail dot com > # # Current Version: 1.0 # # License: # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. PATH=/bin:/usr/bin:/usr/openv/netbackup/bin/admincmd export PATH NUM_CLIENTS=5 # # Get the top hosts by bytes written # echo "" echo "Top $NUM_CLIENTS hosts by data written" echo "" echo "Policy Schedule Storage Unit Bytes Bytes/s" echo "-------------------- -------------------- --------------- ---------- -------" bpdbjobs -report | \ awk '/Backup/{ printf "%-20s %-20s %-15s %-10s %-7s\n", \ substr($5,0,20), \ substr($6,0,20), \ substr($9,0,15), \ substr($11,0,10), \ substr($12,0,10) }' | sort -r -n -k 4,4 | head -${NUM_CLIENTS} # # Get the top hosts sorted by throughput # echo "" echo "Fastest $NUM_CLIENTS clients (processed 10MB+)" echo "" echo "Policy Schedule Storage Unit Bytes Bytes/s" echo "-------------------- -------------------- --------------- ---------- -------" bpdbjobs -report | \ awk '/Backup/ && $11 > 1000000 && $12 != 0 \ { printf "%-20s %-20s %-15s %-10s %-10s\n", \ substr($5,0,20), \ substr($6,0,20), \ substr($9,0,15), \ substr($11,0,10), \ substr($12,0,10) }' | sort -r -n -k 5,5 | head -${NUM_CLIENTS} # # Display the slowest clients # echo "" echo "Slowest $NUM_CLIENTS clients (processed 10MB+)" echo "" echo "Policy Schedule Storage Unit Bytes Bytes/s" echo "-------------------- -------------------- --------------- ---------- -------" bpdbjobs -report | \ awk '/Backup/ && $11 > 1000000 && $12 != 0 \ { printf "%-20s %-20s %-15s %-10s %-10s\n", \ substr($5,0,20), \ substr($6,0,20), \ substr($9,0,15), \ substr($11,0,15), \ substr($12,0,10) }' | sort -n -k 5,5 | head -${NUM_CLIENTS}