- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- shell about diskinfo and total size
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2002 07:35 PM
05-19-2002 07:35 PM
shell about diskinfo and total size
But it takes long time and show different result waht I expect
I want to see
TOTAL DISK SIZE= xxx.xxGB
How can I get this result help me ! !
########## disk script#######
#!/usr/bin/sh
/sbin/ioscan -fknC disk|awk '{print $1}'|grep -v disk|sed 's/^=*//g;s/Class//g;s/dsk/rdsk/g' 1>emcoutfile 2>/dev/null
sub=0
for disk_name in `cat emcoutfile` ; do
disk=$(/usr/sbin/diskinfo $disk_name|grep size|awk '{print$2}')
sub=$sub+$disk
done
echo "INTERNAL DISK SIZE=($sub/1024)/1024 GB"
#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2002 08:09 PM
05-19-2002 08:09 PM
Re: shell about diskinfo and total size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2002 08:27 PM
05-19-2002 08:27 PM
Re: shell about diskinfo and total size
what I want to know is that
How could I calculate the total size of some disk ; like internal disk, external disk , emc disk and so on
To get the information I divided some groups and willing to running that script.
In this point I can't show the exact result.
Do you have any good idea or better formula ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2002 08:51 PM
05-19-2002 08:51 PM
Re: shell about diskinfo and total size
use like this
sub=`expr $sub + $disk`
done
sub=`expr $sub / 1024`
sub=`expr $sub / 1024`
echo "INTERNAL DISK SIZE = $sub GB"
CTK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2002 09:51 PM
05-19-2002 09:51 PM
Re: shell about diskinfo and total size
the result like this
########## disk script#######
#!/usr/bin/sh
/sbin/ioscan -fknC disk|awk '{print $1}'|grep -v disk|sed 's/^=*//g;s/Class//g;s
/dsk/rdsk/g' 1>emcoutfile 2>/dev/null
sub=0
for disk_name in `cat emcoutfile` ; do
disk=$(/usr/sbin/diskinfo $disk_name|grep size|awk '{print$2}')
sub=`expr $sub+$disk`
done
sub=`expr $sub/1024`
sub=`expr $sub/1024`
echo "INTERNAL DISK SIZE=$sub GB"
#
hanatest:/tmp/jj]./je
INTERNAL DISK SIZE=0+4194157+4194157+4194157+4194157+4194157+0/1024/1024 GB
But I want to see INTERNAL DISK SIZE= 20GB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2002 09:58 PM
05-19-2002 09:58 PM
Re: shell about diskinfo and total size
It was very simple problem
The point is that ; numeric or not
So I put following letter typeset -i sub=0
and then I got it
hanatest:/tmp/jj]./je
INTERNAL DISK SIZE=19 GB
Thanks All
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2002 10:00 PM
05-19-2002 10:00 PM
Re: shell about diskinfo and total size
hi
########## disk script#######
#!/usr/bin/sh
/sbin/ioscan -fknC disk|awk '{print $1}'|grep -v disk|sed 's/^=*//g;s/Class//g;s/dsk/rdsk/g' 1>emcou
tfile 2>/dev/null
sub=0
for disk_name in `cat emcoutfile` ; do
disk=$(/usr/sbin/diskinfo $disk_name|grep size|awk '{print$2}')
sub=`expr $sub + $disk`
done
sub=`expr $sub / 1024`
sub=`expr $sub / 1024`
echo "INTERNAL DISK SIZE = $sub GB"
put space near + , / etc
CTK