From: Gene Matthews (gene@mmc-inc.com)
Date: Mon Dec 30 2002 - 09:44:12 EST
Thanks to all who responded:
Peter Wallis
Mike Brown
John Riddoch
Patrick O'Reilly
Nico Wieland
Sean Burke
Daniel
John Julian
Lee Webb
Juergen Waiblinger
Gurcan Erim
A. Ayhan Kanmaz
Marco Breedeveld
- A lot of the suggestions were for 'iostat -En". That gave me what I was
looking for on Solaris 8; on my 2.6 boxes, the output wasn't reliable.
- 'df -h' was also suggest by several. I don't have the GNU utils intalled
so I don't have that option. I'll have to investigate that for future use,
though.
- Another suggestion was:
format << eot | grep '^ 2'
0
p
p
eot
That worked also.
Finally, right after I sent the request, I was looking at the 'format' man
page and noticed the -f flag. I used that. I created a file called
'formatcmds' that contained the following lines:
part
print
and then used 'format -f formatcmds -d c0t0d0 .
I think the df -h command may be the way to go for the future.
Thanks again for the input.
Original post is below.
Gene
-----Original Message-----
From: Gene Matthews [mailto:gene@mmc-inc.com]
Sent: Monday, December 30, 2002 9:15 AM
To: 'sunmanagers@sunmanagers.org'
Subject: command line way to determine disk size (in MB or GB)
I feel somewhat silly having to ask this. I must me missing something
searching with 'man -k'.
I'm looking for a way from the command line to determine the size (in MB or
GB) of a disk.
I have looked at prtvtoc and devinfo, but they seem to only give numbers
like 'blocks per cylinder', 'bytes per block', and number of cylinders. I
know I can do the math with those numbers and come up with those commands,
but I was hoping for something that I could do from the command line and
then just grep/awk what I needed from the output.
Is there command that will provide this information? I thought prtvtoc
might do it since with the 'format' command when you print the partition
table it will show you sizes by partition in gigabytes. If I could get that
output from the command line, I can grep/awk out what I need.
Any thoughts? Am I missing something obvious?
Thanks,
Gene
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:25:31 EDT