Problem in getting total Disk space using iostat -En command


 
Thread Tools Search this Thread
Operating Systems Solaris Problem in getting total Disk space using iostat -En command
# 1  
Old 08-05-2013
Problem in getting total Disk space using iostat -En command

Hi Everyone,

I try to calculate the total hard disk space of a solaris machine using iostat -En command. Iterating the output and summing up all the number present near the Size: will give the exact size of the harddisk. But it is not working for a machine.

This command works in many flavors of solaris. This specific issue is with solaris 5.10 Generic_137137-09 sun4u sparc SUNW,Sun-Fire-V890.

Have attached the sample output of the iostat command's output.

Actual size of the machine is 12272.8 GB, but what i got is 25809 GB.

Kindly let me know, whether the way i calucalating the total hard disk size is wrong or is there any way to remove duplicates from the output and getting the exact size.

Since the output is too longs, i have copied the sample output,

Code:
bash-3.00$ uname -a
SunOS deltabackup01 5.10 Generic_137137-09 sun4u sparc SUNW,Sun-Fire-V890
-bash-3.00$
-bash-3.00$
-bash-3.00$
-bash-3.00$ iostat -En
c0t0d0           Soft Errors: 2 Hard Errors: 0 Transport Errors: 22
Vendor: TSSTcorp Product: DVD-ROM TS-H352C Revision: SI00 Serial No:
Size: 0.00GB <0 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 2 Predictive Failure Analysis: 0
c1t3d0           Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
Vendor: HITACHI  Product: HUS1014FASUN146G Revision: 2A08 Serial No: 0610TX03WL
Size: 146.80GB <146800115712 bytes>


Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 1 Predictive Failure Analysis: 0
c1t1d0           Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
Vendor: HITACHI  Product: HUS1014FASUN146G Revision: 2A08 Serial No: 0610TX040W
Size: 146.80GB <146800115712 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 1 Predictive Failure Analysis: 0
c1t2d0           Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
Vendor: HITACHI  Product: HUS1014FASUN146G Revision: 2A08 Serial No: 0610TX01H3
Size: 146.80GB <146800115712 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 1 Predictive Failure Analysis: 0
c1t0d0           Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
Vendor: HITACHI  Product: HUS1014FASUN146G Revision: 2A08 Serial No: 0610TX018X
Size: 146.80GB <146800115712 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 1 Predictive Failure Analysis: 0
c2t5006048452A6A886d0 Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 0.00GB <2949120 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 1 Predictive Failure Analysis: 0
c5t5006048452A6A889d0 Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 0.00GB <2949120 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 1 Predictive Failure Analysis: 0
c2t5006048452A6A8A7d0 Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 0.00GB <2949120 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 1 Predictive Failure Analysis: 0
c5t5006048452A6A8A8d0 Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 0.00GB <2949120 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 1 Predictive Failure Analysis: 0
c2t5006048452A6A8A7d119 Soft Errors: 3 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 73.10GB <73096888320 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 3 Predictive Failure Analysis: 0
c2t5006048452A6A8A7d118 Soft Errors: 3 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 73.10GB <73096888320 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 3 Predictive Failure Analysis: 0
c2t5006048452A6A8A7d117 Soft Errors: 3 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 73.10GB <73096888320 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 3 Predictive Failure Analysis: 0
c2t5006048452A6A8A7d116 Soft Errors: 3 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 73.10GB <73096888320 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 3 Predictive Failure Analysis: 0
c2t5006048452A6A8A7d115 Soft Errors: 3 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 73.10GB <73096888320 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 3 Predictive Failure Analysis: 0
c2t5006048452A6A8A7d114 Soft Errors: 3 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 73.10GB <73096888320 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 3 Predictive Failure Analysis: 0
c2t5006048452A6A8A7d113 Soft Errors: 3 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 73.10GB <73096888320 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 3 Predictive Failure Analysis: 0
c2t5006048452A6A8A7d112 Soft Errors: 3 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 73.10GB <73096888320 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 3 Predictive Failure Analysis: 0
c2t5006048452A6A8A7d111 Soft Errors: 3 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 73.10GB <73096888320 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 3 Predictive Failure Analysis: 0
c2t5006048452A6A8A7d110 Soft Errors: 3 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 73.10GB <73096888320 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 3 Predictive Failure Analysis: 0
c2t5006048452A6A8A7d109 Soft Errors: 3 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 73.10GB <73096888320 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 3 Predictive Failure Analysis: 0
c2t5006048452A6A8A7d108 Soft Errors: 3 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 73.10GB <73096888320 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 3 Predictive Failure Analysis: 0
c2t5006048452A6A8A7d107 Soft Errors: 3 Hard Errors: 0 Transport Errors: 0
Vendor: EMC      Product: SYMMETRIX        Revision: 5773 Serial No:
Size: 73.10GB <73096888320 bytes>


Kindly let me know if there any other way to get the harddisk size by any other commands.

Thanks,
Prasanna

Last edited by DukeNuke2; 08-05-2013 at 02:36 AM.. Reason: code tags
# 2  
Old 08-05-2013
I think you are calculating the space of mirror disks also..
# 3  
Old 08-05-2013
Hi,

How to remove the mirror disks from the iostat -En command output. Please help.

Last edited by prasankn; 08-05-2013 at 03:55 AM.. Reason: Since, the command output is too big, removed it for readablility.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need Generic command for disk space usage

Given this directory /web I need to get the current usage (in %) on Linux and Unix both using the same command on bash shell ? The command i tried was working on Unix (solaris) but does not filter the desired same value when run of Linux. My command df -h /web | awk '{print $5}' | sed -n... (5 Replies)
Discussion started by: mohtashims
5 Replies

2. Red Hat

Command for cumulative disk space

I wanted to know the Red Hat Linux command for cumulative disk space usage and the free space as df -h gives used and free space individually for the drives. Or, a command to check free space on the server would also be fine. I hope, my question is clear. Please revert with the reply to my... (2 Replies)
Discussion started by: RHCE
2 Replies

3. Solaris

iostat as a tool for generating disk IO

Hi All Currently i had a server directly connect to the EMC box. The EMC storage is a FC Direct Attached Storage to the server without going through SAN switches And i had download the Daily data file in /var/adm/sa/sardd But i not sure which one in /var/adm/sa/sardd is the correct... (14 Replies)
Discussion started by: SmartAntz
14 Replies

4. Solaris

command to get the total disk space (available + free)

is there a command to get the total disk space (available + free) on the solaris server ? thanks (3 Replies)
Discussion started by: sudhiroracle
3 Replies

5. Solaris

swap size, total disk space

Hi experts, In my solaris system when i run the command df -h i got the below response.I have some confusion which i want to share with you guys.1)there are two SWAP file system shows are they same or different?2)if i want to count the total disk space should i take both the swap space or only... (2 Replies)
Discussion started by: rafiassam
2 Replies

6. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

7. UNIX for Dummies Questions & Answers

Help a newbie with an iostat/disk space question.

Hello, On Solaris 10, iostat -E gives me the following results: sd1 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: FUJITSU Product: MAY2073RCSUN72G Revision: 0501 Serial No: 0708S08M2L Size: 73.40GB <73400057856 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0... (1 Reply)
Discussion started by: lieselr
1 Replies

8. AIX

used PPs not match the total disk space showed by df

Hi, I see from lsvg the total used PPs is 1050 (67200 megabytes), but when I check the disk space with df command I can only see 31G total space, can somebody tell how this come? Thanks! Victor # lsvg rootvg # lsvg rootvg VOLUME GROUP: rootvg VG IDENTIFIER: ... (2 Replies)
Discussion started by: victorcheung
2 Replies

9. Solaris

command to find free disk space on solaris

In linux df is the command to find free space what is the equivalent command in the Solaris (2 Replies)
Discussion started by: harishankar
2 Replies

10. UNIX for Dummies Questions & Answers

problem knowing disk space

i am a fresh person learning sco open server 5.5:confused: how should i know that how much space is occupied & how much is free on a particular partition?please help (1 Reply)
Discussion started by: buntty
1 Replies
Login or Register to Ask a Question