How big will tonight's dump be
David Steffens
eplunix!das at harvard.harvard.edu
Sat Jan 28 18:35:50 AEST 1989
olling at tcgould.tn.cornell.edu (Cliff Olling) asks:
> Is there a better way to determine dump size than dumping to /dev/null
> before doing the real thing?
The following is a fragment of a Bourne shell script that I use to
estimate dump sizes on a 4/280 running SunOS4.0.0. It assumes the
following shell variables have been set appropriately:
LEVEL the dump level to be estimated
DENS tape density in bits per inch ("d" argument for dump)
SIZE tape length in feet ("s" argument for dump)
FILSYS the file system to be estimated
echo yes | /etc/dump ${LEVEL}fds /dev/null $DENS $SIZE $FILSYS 2>&1 | (
: this delay guarantees "dump" will appear in the "ps" listing
sleep 2
set `ps | grep " dump" | grep -v grep`
DUMP_PID=$1
while read LINE
do
echo $LINE
set $LINE
case $2 in
estimated)
kill -INT $DUMP_PID
break
;;
*)
continue
;;
esac
done
)
----
{harvard,mit-eddie,think}!eplunix!das David Allan Steffens
243 Charles St., Boston, MA 02114 Eaton-Peabody Laboratory
(617) 573-3748 Mass. Eye & Ear Infirmary
More information about the Comp.sys.sun
mailing list