Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: eplunix!das@harvard.harvard.edu (David Steffens) Newsgroups: comp.sys.sun Subject: Re: How big will tonight's dump be Message-ID: <8901201911.AA09639@rice.edu> Date: 28 Jan 89 08:35:50 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 38 Approved: Sun-Spots@rice.edu Original-Date: Thu, 19 Jan 89 16:15:00 est X-Sun-Spots-Digest: Volume 7, Issue 126, message 11 of 12 X-Issue-Reference: v7n101 olling@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