- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Want to determin the file system having more than ...
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
12-17-2008 02:51 AM
12-17-2008 02:51 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2008 03:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2008 03:13 AM
12-17-2008 03:13 AM
Re: Want to determin the file system having more than or equal to 80% usage
There are a number of scripts posted to itrc that will do this job, based on bdf output.
http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=178514
This thread is the largest repsoitory.
Yes you will have to hunt a bit but that thread has the best selection.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2008 03:15 AM
12-17-2008 03:15 AM
Re: Want to determin the file system having more than or equal to 80% usage
bdf /tmp/
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol4 524288 215128 306848 41% /tmp
bdf /tmp/ | awk '/\//{print $5}'
41%
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2008 03:34 AM
12-17-2008 03:34 AM
Re: Want to determin the file system having more than or equal to 80% usage
Thanks for the reply.
Is there any way rather using script.
Can i determine it by using the command like bdf and using any option with it.
Regards,
Durvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2008 03:46 AM
12-17-2008 03:46 AM
Re: Want to determin the file system having more than or equal to 80% usage
It uses the df -k command and was written on Tru64. May work on HP-UX.
Basically it displays mount points exceeding a threshold I control in the script. The DEFAULT is 85.
You can also manually assign a threshold when you run from prompt:
# dut 74
This would report any mount points exceeding 74%.
Cheers
(rename the script from dut.ksh to dut so it's easier to type at prompt)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2008 03:48 AM
12-17-2008 03:48 AM
Re: Want to determin the file system having more than or equal to 80% usage
Tou should use a script to calculate that.
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2008 03:48 AM
12-17-2008 03:48 AM
Re: Want to determin the file system having more than or equal to 80% usage
The first line looks like
#!/usr/bin/ksh#
it should be
#!/usr/bin/ksh
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2008 03:50 AM
12-17-2008 03:50 AM
Re: Want to determin the file system having more than or equal to 80% usage
Use the "which" command on your system to find out where they are.
such as
which awk
which grep
etc etc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2008 07:48 PM
12-17-2008 07:48 PM
Re: Want to determin the file system having more than or equal to 80% usage
This is the single line help you to get equal or more than 80%
#bdf | awk '{print $6,$5}' | awk '$2 >= 80'
REGARDS,
Jenith Christopher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2008 08:25 PM
12-17-2008 08:25 PM
Re: Want to determin the file system having more than or equal to 80% usage
Please download this file (bdfmesg) from below link you will find this is a great tool written by Mr.Bill Hassell.
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1291639
Just give
#bdfmesg -P 80 ##to find all file system which is using 80 or more then 80
Like so many output you can take from bdfmesg
Many Thanks to Mr.Bill Hassell to create a nice and useful tool.
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2008 08:26 PM
12-17-2008 08:26 PM
Re: Want to determin the file system having more than or equal to 80% usage
Others gave you lot of useful choices.
One more (an example when you want to look
for file systems that used more than 80% os
space:
# bdf -k | sed -e 's/%//g' | awk '$5 >= 80'
But be warned, such simple one-lineRs can
fail if the names of logical volumes (LVM)
or plexes (VxVM) are longer and wrap into
second line. In that case, you need a
smarter solution (see references in previous posts in the Forum).
Cheers,
VK2COT (amateur radio and Morse code
instructor since 1971)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2008 08:50 PM
12-17-2008 08:50 PM
Re: Want to determin the file system having more than or equal to 80% usage
Everytime you see a pipe ('|') a new process is spawned. THe 'awk' utility as the ability to match regular expressions and to perform substitutions without resorting to pipes with 'grep' and 'sed'. For instance:
# bdf|awk '{sub("%","",$(NF-1));if ($(NF-1)>80) {print}}'
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2008 12:32 AM
12-18-2008 12:32 AM
Re: Want to determin the file system having more than or equal to 80% usage
I modified your statement to add the % back in for the print. As well as formatted it a bit so the output is easier to read.
df -k |awk '{sub("%","",$(NF-1));if ($(NF-1)>80) {printf "%-25s %-12s %-12s %-12s %-12s %s \n", $1, $2, $3, $4, $5, $6}}'
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2008 08:12 AM
12-19-2008 08:12 AM
Re: Want to determin the file system having more than or equal to 80% usage
Thank u all.
Regards,
Durvesh