HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Adding up a bdf output
Operating System - HP-UX
1834417
Members
1676
Online
110067
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
04-08-2005 06:55 AM
04-08-2005 06:55 AM
I have a bdf listing like:
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 143360 60946 77357 44% /
/dev/vg00/lvol1 82480 31168 43064 42% /stand
/dev/vg00/lvol7 770048 681256 84561 89% /var
/dev/vg00/lvol6 770048 735307 32574 96% /usr
/dev/vg00/lvol4 204800 43809 150979 22% /tmp
/dev/vg00/lvol5 307200 241522 61909 80% /opt
/dev/vg01/data
102400 1133 94945 1% /data
/dev/vg02/data3
102400 1133 94945 1% /data3
/dev/vg03/emc 102400 1133 94945 1% /emc_mt
How can I add up of the sizes under Kbytes, Used, and avail.
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 143360 60946 77357 44% /
/dev/vg00/lvol1 82480 31168 43064 42% /stand
/dev/vg00/lvol7 770048 681256 84561 89% /var
/dev/vg00/lvol6 770048 735307 32574 96% /usr
/dev/vg00/lvol4 204800 43809 150979 22% /tmp
/dev/vg00/lvol5 307200 241522 61909 80% /opt
/dev/vg01/data
102400 1133 94945 1% /data
/dev/vg02/data3
102400 1133 94945 1% /data3
/dev/vg03/emc 102400 1133 94945 1% /emc_mt
How can I add up of the sizes under Kbytes, Used, and avail.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2005 07:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2005 07:14 AM
04-08-2005 07:14 AM
Re: Adding up a bdf output
integer kbytes=0
integer used=0
integer avail=0
bdf | grep -v "^Filesystem" | \
awk '{print $2, $3, $4}' | while read -r k u a
do
kbytes=$kbytes+$k
used=$used+$u
avail=$avail+$a
done
echo KBytes = $kbytes
echo Used = $used
echo Avail = $avail
- Biswajit
integer used=0
integer avail=0
bdf | grep -v "^Filesystem" | \
awk '{print $2, $3, $4}' | while read -r k u a
do
kbytes=$kbytes+$k
used=$used+$u
avail=$avail+$a
done
echo KBytes = $kbytes
echo Used = $used
echo Avail = $avail
- Biswajit
:-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2005 07:19 AM
04-08-2005 07:19 AM
Re: Adding up a bdf output
Thanks Biswajit and RAC. Both ideas helped me. I have submitted your points.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP