Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determining the size of a sysb to tape 2

Status
Not open for further replies.

Einstein47

Programmer
Nov 29, 2001
737
US
*** URGENT ***

I need to determine the size of the last sysb that I made on our development box. The command used to create the tape archive is mksysb -i /dev/rmt0.

I seached for other message threads, but they talk about counting the files, not finding the size of the archive. Any thoughts anyone? I'm desparate! Einstein47
(Love is like PI - natural, irrational, endless, and very important.)
 
I don't suppose you are able to generate an image file to disk? That is the only way I know to find the size, by actually running a `mksysb -i /path/to/image.file`. IBM Certified -- AIX 4.3 Obfuscation
 
Figured it out - at least in my case.

I used the restore command to display a list of all the files and their sizes. The command I used is:
restore -s4 -Tqvf /dev/rmt0.1 2>&1 > /tmp/sysb.out

Then I used awk to rip thru the file and add up the sizes:
awk '$2 ~ /^\.\/*/ { size += $1 } END { print "total size" size }' /tmp/sysb.out

The result was 9.77407e+09 I assume that is in bytes.

Hope this helps others. Einstein47
(Love is like PI - natural, irrational, endless, and very important.)
 
Genius. :p

I might test that for accuracy, a 9GB image seems sort of large to me, mine are typically 2-3GB. Depends on what's in rootvg though. =) IBM Certified -- AIX 4.3 Obfuscation
 
The 9.7 GB is the sum of all the file sizes - does sysb use compression to reduce the size on tape? I read that it doesn't copy null spaces over, but I don't know about compression.

If there is some compression, what is the correct way of finding the actual size of the mksysb? Do I have to run the command and create a file that contains the archive (as aposed to writing the archive to tape)?

What do you think? Einstein47
(Love is like PI - natural, irrational, endless, and very important.)
 
The -p option disables software packing. I am not sure if "packing" means "compression" or if it just makes a solid archive, or both.

Just checking one of my systems quickly,
rootvg = USED PPs: 991 (7928 megabytes)

The fs where we archive the sysb = 1966080 kb.
The image I just made with the -p option is ~1.2GB:
-rw-r--r-- 1 root sys 1247948800 Jun 06 09:21 host.image

I think you are going to have to gen an image to disk to be sure. IBM Certified -- AIX 4.3 Obfuscation
 
Try the command
restore -s4 -Tvf /dev/rmt0.1 (if rmt0 is your tape)

whait for the read process...
the last 2 lines are similar to:

The total size is xxxxxxxxxx bytes.
The number of archived files is xxxxxxxx.

or try the tcopy /dev/rmt0 command.
 
Thanks guys,

I just realized that the restore command I used is exactly what klasan suggested. So I didn't need that funky awk script. But is was nice to double check.

I didn't need the actual size on tape, I needed the full size after restore. So I appologize if my initial question wasn't clear.

These forums are great - I really learn something everyday.

/images/star.gifs for both of you. Einstein47
(Love is like PI - natural, irrational, endless, and very important.)
 
Ah ha, once again I completely missed the point of the question. =) IBM Certified -- AIX 4.3 Obfuscation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top