- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: calculating total and free disk space on a sys...
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
Discussions
Discussions
Forums
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
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
тАО07-23-2009 08:27 AM
тАО07-23-2009 08:27 AM
Solutionvgdisplay 2>/dev/null |grep "VG Name"|awk '{print $3}'|while read a
do
vgdisplay $a|grep "PE Size"|awk '{print $4}'|read b
vgdisplay $a|grep "Total PE"|awk '{print $3}'|read c
vgdisplay $a|grep "Free PE"|awk '{print $3}'|read d
echo "$a $((b*c)) $((b*d))"
done
it should work like a charm:
# vgdisplay 2>/dev/null |grep "VG Name"|awk '{print $3}'|while read a
> do
> vgdisplay $a|grep "PE Size"|awk '{print $4}'|read b
> vgdisplay $a|grep "Total PE"|awk '{print $3}'|read c
> vgdisplay $a|grep "Free PE"|awk '{print $3}'|read d
> echo "$a $((b*c)) $((b*d))"
> done
/dev/vg00 139968 63712
/dev/vghomeora 139968 103968
/dev/vgquorum1 14368 13856
/dev/vgignite 115072 30336
#
Unix operates with beer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2009 08:29 AM
тАО07-23-2009 08:29 AM
Re: calculating total and free disk space on a system
(and i added the error redirection just to don't get confused because of disabled VGs)
Unix operates with beer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2009 10:39 AM
тАО07-23-2009 10:39 AM
Re: calculating total and free disk space on a system
@Amit, Please find attached script, which will give total size of vg, Free size in VG
Regards
Sanjeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-24-2009 01:57 AM
тАО07-24-2009 01:57 AM
Re: calculating total and free disk space on a system
Can we get the sum of total space and free space in all VGs?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-24-2009 03:11 AM
тАО07-24-2009 03:11 AM
Re: calculating total and free disk space on a system
Yes, With this Script you can have both
Regards
Sanjeev
- « Previous
-
- 1
- 2
- Next »