Sponsored Content
Operating Systems AIX calculating the size of the luns using script Post 302526363 by samsungsamsung on Tuesday 31st of May 2011 10:19:10 AM
Old 05-31-2011
calculating the size of the luns using script

Hi

This is the lspv output of my server :

cbspsdb01 [/] #lspv

hdisk0 00c7518d2d512fd4 cdgvg active
hdisk1 00c7518d2dcbc9d6 cdgvg active
hdisk2 00c7518dcda9199a appvg active
hdisk3 00c7518dcda9388c itcamvg active
hdisk4 00c7518d85724ca6 rootvg active

Can anyone help me to write a script which will sum the size of all the hdisks and give the value ?

The script should give the sum value of (bootinfo -s hdisk0 + bootinfo -s hdisk1 + bootinfo -s hdisk2 + bootinfo -s hdisk3 + bootinfo -s hdisk4) in GigaBytes ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Scripts for calculating size and remaining space of a directory automatically.

I would like to create a script for calculating size and remaining space of a directory automatically every 24 hours, then send an email to report to the admin. * POSIX and PERL are preferred. Can anyone help, please? (1 Reply)
Discussion started by: leonall
1 Replies

2. Programming

calculating size of int

Hi, Is there any way to calculate the size of a built in data type without using 'sizeof' operator? I also don't have the option to read it from std .h file. regards Apoorva Kumar (10 Replies)
Discussion started by: apoorvasharma80
10 Replies

3. UNIX for Dummies Questions & Answers

CAlculating page file size

hello dont know if this is the correct forum for this post but i have a question. i am revising for a exam on operating systems and i have the question... A system has a 32bit virtual address divided into 2kbyte pages and each entry in the page table is 6 bytes in length. what is the size... (0 Replies)
Discussion started by: Fortune
0 Replies

4. Shell Programming and Scripting

Help with calculating size of files.

Hi All, I am very new to shell scripting. I have a text file which is the output of another utility. This text file has a list of SAF files which is basically a list of orphan attachments in the attachments directory. Now I want to read each file name from the file, get its size and repeat this... (6 Replies)
Discussion started by: RajeshReddy
6 Replies

5. AIX

Getting size of all the luns immediately via script

Hi I know that to see the size of the lun I need to give the command as "bootinfo -s hdisk*" Can any one assist me with a script which if run will get the size of all the luns allocated to the server. The output of the script should be something like the one below : hdisk0 size = 24GB... (2 Replies)
Discussion started by: samsungsamsung
2 Replies

6. Shell Programming and Scripting

Calculating average of 100 different files of same size

Hey guys..... I have many files (lets say 100 or more) of same size, and I want to create a new output file and calculate the average of first row fifth column in all files and print it in first row of output file, then 2nd row fifth col in all 100 files and print it in 2nd row of output... (1 Reply)
Discussion started by: CAch
1 Replies

7. Shell Programming and Scripting

Calculating the epoch time from standard time using awk and calculating the duration

Hi All, I have the following time stamp data in 2 columns Date TimeStamp(also with milliseconds) 05/23/2012 08:30:11.250 05/23/2012 08:30:15.500 05/23/2012 08:31.15.500 . . etc From this data I need the following output. 0.00( row1-row1 in seconds) 04.25( row2-row1 in... (5 Replies)
Discussion started by: ks_reddy
5 Replies

8. Shell Programming and Scripting

Python Script Calculating Average

Can anyone explain what each line of the code does and how it works? I have no experience with python so I am not sure how the arrays and such work. I found this code while looking through the forums. f = open("exams","r") l = f.readline() while l: l = l.split(" ") values = l ... (22 Replies)
Discussion started by: totoro125
22 Replies

9. UNIX for Beginners Questions & Answers

Calculating size of backups

hi everyone i have a backup share mounted with me on solaris 10 which have daily backups. everyday i need to calculate all individual sizes of files and need to report somewhere. e.g i have .rman 7backup files daily . what i need that is there any commnd or variation of du command which can add... (1 Reply)
Discussion started by: janakors
1 Replies

10. UNIX for Beginners Questions & Answers

Calculating size of backups

hi everyone i have posted this query but i dont where it has gone i am posting again . my issue is that i have many backup files in a backup nfs share and i need to calculate it size just by adding their individual file sizes which is repetitive jobs. so is there any command or variation of du... (1 Reply)
Discussion started by: janakors
1 Replies
BLESS(8)						    BSD System Manager's Manual 						  BLESS(8)

NAME
bless -- set volume bootability and startup disk options SYNOPSIS
bless -help bless -folder directory [-folder9 directory] [-mount directory] [-bootinfo file] [-bootBlocks | -bootBlockFile file] [-save9] [-saveX] [-use9] [-system file] [-systemfile file] [-label name | -labelfile file] [-openfolder directory] [-setBoot] [-quiet | -verbose] bless -device device [-format [fstype] [-fsargs args] [-label name | -labelfile file]] [-bootBlockFile file] [-mount directory] [-wrapper file] [-startupfile file] [-system file] [-setBoot] [-quiet | -verbose] bless -info [directory] [-getBoot] [-bootBlocks] [-plist] [-quiet | -verbose] [-version] DESCRIPTION
bless is used to set volume bootability characteristics for PowerPC-based Macintoshes. It can also modify Open Firmware to select a different device to boot off of. bless has 3 modes of execution: Folder Mode, Device Mode, and Info Mode. Folder Mode allows you to select a folder on a mounted volume to act as the ``blessed'' system folder, and optionally update Open Firmware to boot from that volume. Device Mode is normally only used to format and setup a volume for the first time. Info Mode will print out the currently-blessed folder(s) of a volume, or if no mountpoint is specified, the volume that OF is set to boot from. Additionally, -help can be used to display the command-line usage summary. FOLDER MODE Folder Mode has the following options: -folder directory A blessed Mac OS X/Darwin system folder, containing a BootX secondary loader for New World machines. -folder9 directory A Mac OS 9/Classic system folder. If both -folder and -folder9 are given, preference can be given to boot into Mac OS 9 by also using the -use9 flag. -mount directory In lieu of specifying folders to bless, -mount can be given, and the pre-existing blessed folders are used. -bootinfo file Create a BootX file in the Mac OS X/Darwin system folder using file as a source. -bootBlocks Set the boot blocks on the volume. This is required for booting Mac OS 9. Boot blocks can be retrieved from the System file in the blessed Mac OS 9 system folder, or can be specified more directly using the -bootBlockFile or -system flags. -bootBlockFile file Extract boot blocks from file . The first 1024 bytes are read from the data fork of that file. -save9 Used if no -folder9 flag was given, but if the pre-existing Mac OS 9 system folder should be preserved. -saveX Used if no -folder flag was given, but if the pre-existing Mac OS X/Darwin system folder should be preserved. -use9 Used if both -folder and -folder9 were given, but Mac OS 9 should be the default for the volume. -system file Extract boot blocks from the file System file, using the Carbon resource manager. This will fail under Darwin, where Carbon is not present. -systemfile file Data fork System file to place in blessed System Folder -label name Render a text label used in the OpenFirmware-based OS picker -labelfile file Use a pre-rendered label used for the OpenFirmware-based OS picker -openfolder directory Specify a folder to be opened in the Finder when the volume is attached -setBoot Set the system to boot off the specified partition. This is implemented in a platform-specific manner. On Darwin PPC, the Open Firmware boot-device variable is modified. On Darwin x86, the MBR partition map is adjusted to mark the spec- ified partition as active -setOF Set the boot-device Open Firmware variable to boot off the volume containing. This option is deprecated in favor of the more generic -setBoot option. -quiet Do not print any output -verbose Print verbose output DEVICE MODE Device Mode has the following options: -device device Open the block device device . No volumes should be mounted from device . -format [fstype] Format the device using the fstype filesystem, or if it is not given, default to HFS+ with an HFS wrapper. -fsargs arg Additional arguments to newfs for the given filesystem -label name Give the filesystem the label while formatting, or set an OF-cased OS picker label -labelfile file Use a pre-rendered label used for the OpenFirmware-based OS picker name (in UTF-8 encoding) -bootBlockFile file Extract boot blocks from file . The first 1024 bytes are read from the data fork of that file. -mount directory Use directory as a temporary mount point for the HFS wrapper. -wrapper file Mount the wrapper on -mount and write file into the wrapper as the default System file. -system file Override the file specifications for -bootBlockFile and -wrapper and use this file instead for both those functions. -xcoff file Add the file as the HFS+ StartupFile, and update the partition map to reflect it's location on disk. This is necessary for Old World booting. This option is deprecated in favor of the more generic -startupfile option -setBoot Set the system to boot off the specified partition. This is implemented in a platform-specific manner. On Darwin PPC, the Open Firmware boot-device variable is modified. On Darwin x86, the MBR partition map is adjusted to mark the spec- ified partition as active -setOF Set the boot-device Open Firmware variable to boot off the volume containing. This option is deprecated in favor of the more generic -setBoot option. -startupfile file Add the file as the HFS+ StartupFile, and update other information on disk as appropriate for the startup file type. -quiet Do not print any output -verbose Print verbose output INFO MODE Info Mode has the following options: -info [directory] Print out the blessed system folder for directory . If directory is not specified, print information for the current boot-device (which may not necessarily be '/' . -setBoot Print out which device will be used on next boot, according to the boot-device Open Firmware variable. This option will take into account that OF might be pointing to an auxiliary booter partition, and will print out the correspond- ing root partition for those cases. -bootBlocks Print out salient fields from the boot blocks of the volume. -plist Output all information in Property List (.plist) format, suitable for parsing by CoreFoundation. This is most useful when bless is executed from another program and its standard output must be parsed. -quiet Do not print any output -verbose Print verbose output -version Print bless version and exit immediately FILES
/usr/standalone/ppc/bootx.bootinfo Secondary loader with XML headers, used with -bootinfo flag. Used for booting New World PPC-based Macin- toshes /System/Library/CoreServices Typical blessed folder for Mac OS X and Darwin EXAMPLES
FOLDER MODE To bless a volume with only Mac OS 9: bless -folder9 "/Volumes/Mac OS 9/System Folder" -bootBlockFile "/usr/share/misc/bootblockdata" To bless a volume with only Mac OS X or Darwin, and create the BootX file: bless -folder "/Volumes/Mac OS X/System/Library/CoreServices" -bootinfo "/Volumes/Mac OS X/usr/standalone/ppc/bootx.bootinfo" To set a volume containing either Mac OS 9 and Mac OS X to be the active volume: bless -mount "/Volumes/Mac OS" -setBoot INFO MODE To gather information about the currently selected volume (as determined by Open Firmware), suitable for piping to a program capable of pars- ing Property Lists: bless -info -plist -bootBlocks SEE ALSO
mount(8), newfs(8), nvram(8) Mac OS X August 3, 2003 Mac OS X
All times are GMT -4. The time now is 12:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy