- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to get disk size for all disk drives on a serv...
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-14-2001 07:03 AM
05-14-2001 07:03 AM
Is there a way via a shell script to get the
number of disks on a server and the size of
each disk as well. With this information I can
calculate how much total disk space capacity we have.
Example: A L2000 HP-UX 11.0 server has 6 hard drives that are 18GB each. So we have 108GB
of disk space capacity.
Thank you in advance.
Gino
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2001 07:12 AM
05-14-2001 07:12 AM
Solution1) ioscan -fn -C disk and note the /dev/rdsk/cxtydz device nodes. You may see a CD-ROM listed; ignore it.
2) for each /dev/rdsk/cxtydz do a diskinfo /dev/rdsk/cxtydz.
The diskinfo will list drive capacity as well as other data.
man ioscan,diskinfo for details.
This should get you started, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2001 07:18 AM
05-14-2001 07:18 AM
Re: How to get disk size for all disk drives on a server.
ioscan -funCdisk
after this you will mostlikely beable to determin the size of each based on the model# of a disk you know they will most likely be most of the same disk, ignore the cdrom. And any disk you are not sure of do a
diskinfo /dev/dsk/c_t_d_
and this will tell you the rest,
Good luck,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2001 07:24 AM
05-14-2001 07:24 AM
Re: How to get disk size for all disk drives on a server.
for i in `cat /tmp/lsfdisk`
do
diskinfo -v /dev/rdsk/$i
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2001 07:37 AM
05-14-2001 07:37 AM
Re: How to get disk size for all disk drives on a server.
Do the following:
ioscan -funC disk
diskinfo -v /dev/rdsk/c#t#d#
That will give you required information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2001 08:46 AM
05-14-2001 08:46 AM
Re: How to get disk size for all disk drives on a server.
diskinfo /dev/rdsk/c_t_d_
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2001 08:57 AM
05-14-2001 08:57 AM
Re: How to get disk size for all disk drives on a server.
while read i
do
var=$(diskinfo $i|grep Kbytes|awk '{print $2}')
echo $var+$var|bc
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2001 09:34 AM
05-14-2001 09:34 AM
Re: How to get disk size for all disk drives on a server.
try this :
ioscan -fnC disk | grep rdsk > /tmp/test
cat test | cut -l 54-69 > /tmp/test1
for i in 'cat /tmp/test1'
do
diskinfo $i
done .
Manoj Srivastava