Quick Review: Boxee Box
December 27, 2011 – 12:22 am | 3 Comments

Some of the technical issues with Boxee Box could have been fixed if the dev team was paying more attention to addressing the bugs rather than adding “features” of dubious value. In the final analysis, for the price and ease of use, Boxee Box is the best in its class and price range. You just need to be mindful of its limitations and buy it in hope of future improvements to its usability.

Read the full story »
Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Backups, Veritas

NetBackup statistics, Part II

Submitted by on November 21, 2005 – 5:04 pmNo Comment
NetBackup statistics, Part II

This script uses the output of the script in the previous example to calculate yearly backup load for each Veritas NetBackup client.

#!/bin/ksh
 
WORKDIR=/var/adm/bin/bpstat
BACKUPS=$WORKDIR/backups
STATDIR=$WORKDIR/stats
PROCESS=1
gzip="/usr/local/bin/gzip"
 
if [ ! -d $WORKDIR ] || [ ! -d $BACKUPS ] || [ ! -d $STATDIR ] || [ `find $BACKUPS -type d | wc -l` -eq 0 ]
then
        echo "Souce directories not found. Exiting..."
        exit
fi
 
if [ $PROCESS -eq 1 ]
then
        if [ `find $STATDIR -type f | wc -l` -gt 0 ]
        then
                rm $STATDIR/*
        fi
 
        month="01"
        day="01"
        year="01"
 
        for year in 03 04 05 06 07 08 09 10
        do
                for month in 01 02 03 04 05 06 07 08 09 10 11 12
                do
                        for day in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31
                        do
                                if [ -d $BACKUPS/$month$day$year ]
                                then
                                        echo "Processing $BACKUPS/$month$day$year"
                                        if [ -f $BACKUPS/$month$day$year/final_output_cron.txt.gz ]
                                        then
                                                $gzip -d $BACKUPS/$month$day$year/final_output_cron.txt.gz
                                                cat $BACKUPS/$month$day$year/final_output_cron.txt | grep -v ZZTOTAL | while read line
                                                do
                                                        HOST=$(echo "$line" | awk -F',' '{print $1}')
                                                        SIZE=$(echo "$line" | awk -F',' '{print $2}')
                                                        if [ $HOST ] && [ $SIZE ]
                                                        then
                                                                echo "$HOST,$month-$day-$year,$SIZE" >> "$STATDIR/$HOST"
                                                        fi
                                                done
                                                $gzip $BACKUPS/$month$day$year/final_output_cron.txt
                                        fi
                                fi
                        done
                done
        done
fi
 
if [ -f $WORKDIR/combined_yearly_stats.csv ]
then
        rm $WORKDIR/combined_yearly_stats.csv
fi
 
find $STATDIR -type f | while read file
do
        cat $file >> $WORKDIR/combined_yearly_stats.csv
done
 
if [ -f $WORKDIR/combined_yearly_stats.csv ]
then
        chmod 777 $WORKDIR/combined_yearly_stats.csv
fi
 
chmod -R 777 $STATDIR
 
ftp -in webserver << bye
user username password
lcd /var/adm/bin/bpstat
cd /var/apache/htdocs/bpstat
put combined_yearly_stats.csv
lcd /var/adm/bin/bpstat/stats
cd /var/apache/htdocs/bpstat/stats
mput *
bye
 
(( MINUTES = SECONDS / 60 ))
 
echo "Processing and transfers complete in $MINUTES minutes"

Popularity: 2% [?]

Related posts:

  1. NetBackup statistics, Part I
  2. Using NetBackup to restore boot disk
  3. Database operations with SQL and Korn shell

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.