- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script Needed
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
07-07-2006 07:47 AM
07-07-2006 07:47 AM
Script Needed
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2006 08:02 AM
07-07-2006 08:02 AM
Re: Script Needed
# di -l -k -t
Filesystem Mount KBytes Used Avail %Used fs Type
/dev/hda2 / 38064816 31918884 6145932 84% reiserfs
udev /dev 388180 172 388008 0% tmpfs
Total 38064816 31918888 6145928 84%
Or in Gb
# di -gt
Filesystem Mount Gigs Used Avail %Used fs Type
/dev/hda2 / 36.3 30.4 5.9 84% reiserfs
udev /dev 0.4 0.0 0.4 0% tmpfs
Total 36.3 30.4 5.9 84%
Di is available on my site:
http://mirrors.develooper.com/hpux/downloads.html
http://mirrors.develooper.com/hpux/di-4.5-10.20.sd.bz
http://mirrors.develooper.com/hpux/di-4.5-11.00.sd.bz
http://mirrors.develooper.com/hpux/di-4.5-11.11.sd.bz
http://mirrors.develooper.com/hpux/di-4.5-11.23.sd.bz
use bzip2 to uncompress the depot
Or use perl:
# df -k | perl -pe'@x=split/\s+/,$_;$x{$_}+=$x[$_]for 2..4;END{printf"Total Gbytes: %29.2f%9.2f%9.2f\n",map{$_/1024}@x{2..4}}'
Filesystem Mount KBytes Used Avail %Used fs Type
/dev/vg00/lvol3 / 212992 54136 157656 26% vxfs
/dev/vg00/data /data 8388608 7260721 1061670 87% vxfs
/dev/vg00/lvol5 /home 32768 2280 30264 8% vxfs
/dev/vg00/opt /opt 1048576 987689 57666 95% vxfs
/dev/vg00/pro /pro 18874368 16640408 2210728 88% vxfs
/dev/vg00/lvol1 /stand 298928 48088 220944 26% hfs
/dev/vg00/tmp /tmp 524288 4358 488198 7% vxfs
/dev/vg00/u /u 1048576 466091 547783 48% vxfs
/dev/vg00/lvol7 /usr 1376256 1083376 291248 79% vxfs
/dev/vg00/lvol8 /var 4718592 815248 3873944 18% vxfs
/dev/vg00/wrk /wrk 2097152 1263035 783185 63% vxfs
Total Gbytes: 37715.92 27954.52 9495.40
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2006 08:12 AM
07-07-2006 08:12 AM
Re: Script Needed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2006 08:16 AM
07-07-2006 08:16 AM
Re: Script Needed
di for hp-ux-11.11 (temporary) available here: http://www.xs4all.nl/~procura/di
just fetch it, put it in your own /bin folder, chmod 777 di and run
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2006 09:05 AM
07-07-2006 09:05 AM
Re: Script Needed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2006 09:05 AM
07-07-2006 09:05 AM
Re: Script Needed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2006 11:22 AM
07-07-2006 11:22 AM
Re: Script Needed
just cut and paste the command that procura has given and you will find it
DP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2006 08:47 PM
07-07-2006 08:47 PM
Re: Script Needed
For the df solution ...
# df -k | perl -pe'@x=split/\s+/,$_;$x{$_}+=$x[$_]for 2..4;END{printf"Total Gbytes: %29.2f%9.2f%9.2f\n",map{$_/1024}@x{2..4}}'
just cut-n-paste
If you only want the last line
# df -k | perl -ne'@x=split/\s+/,$_;$x{$_}+=$x[$_]for 2..4;END{printf"Total Gbytes: %29.2f%9.2f%9.2f\n",map{$_/1024}@x{2..4}}'
(note that I just changed the invocation from -pe to -ne)
If you just want the total in Gb
total:
# df -k | perl -ne'@x=split/\s+/,$_;$x{$_}+=$x[$_]for 2..4;END{printf"%9.2f\n",$x{2}/1024}'
used:
# df -k | perl -ne'@x=split/\s+/,$_;$x{$_}+=$x[$_]for 2..4;END{printf"%9.2f\n",$x{3}/1024}'
avail:
# df -k | perl -ne'@x=split/\s+/,$_;$x{$_}+=$x[$_]for 2..4;END{printf"%9.2f\n",$x{4}/1024}'
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2006 05:17 AM
07-08-2006 05:17 AM
Re: Script Needed
giving 6 more brother ... i gave 4 earlier ...thx again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2006 05:18 AM
07-08-2006 05:18 AM