- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- monitor file system size
Operating System - HP-UX
1752785
Members
6293
Online
108789
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
Discussions
Discussions
Forums
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
тАО10-04-2006 04:26 AM
тАО10-04-2006 04:26 AM
monitor file system size
I run the following command out of cron, but what i get is the last file system that is listed when a bdf command is ran. What i need is to be notified of the actual filesystem that is over the percentage of usage. Thanks for your help.
P.S. If some one could explain to me the details on how this command works i would really appreciate it. I have researched it but have not come up with anything in my script book.
bdf | awk 'z[split($5,z,"%")-1]>85' | elm -s "Filesystem > 85%"
P.S. If some one could explain to me the details on how this command works i would really appreciate it. I have researched it but have not come up with anything in my script book.
bdf | awk 'z[split($5,z,"%")-1]>85' | elm -s "Filesystem > 85%"
just when you thought you had the answer
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2006 10:08 AM
тАО10-04-2006 10:08 AM
Re: monitor file system size
You will need to add an email address at the end of that command:
bdf | awk 'z[split($5,z,"%")-1]>85' | elm -s "Filesystem > 85%" keith@company.com
It will split "%" from 5th column of the bdf output (so only number leaft)and put the numbers in array "z". If numbers in "z" bigger than "85" then pass the bdf output of those related lines to "elm" -- an email tool and send the results to keith@company.com with subject "Filesystem > 85%".
BTW, you want to monitor the file system on MPE or Unix machine?
Yang
bdf | awk 'z[split($5,z,"%")-1]>85' | elm -s "Filesystem > 85%" keith@company.com
It will split "%" from 5th column of the bdf output (so only number leaft)and put the numbers in array "z". If numbers in "z" bigger than "85" then pass the bdf output of those related lines to "elm" -- an email tool and send the results to keith@company.com with subject "Filesystem > 85%".
BTW, you want to monitor the file system on MPE or Unix machine?
Yang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2006 11:37 PM
тАО10-04-2006 11:37 PM
Re: monitor file system size
Thanks for your help. What i did was i added an 85 inside of the ($5,z,"85%") and it worked the way it was suppose to. In other words i have one filesystem on my unix box that is actually over 85% and that line showed up in my e-mail not the last file sytem with only 9%.
just when you thought you had the answer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2006 12:02 AM
тАО10-05-2006 12:02 AM
Re: monitor file system size
If you run bdf | awk 'z[split($5,z,"85%")-1]>85' | elm -s "Filesystem > 85%" xxx@xxx.xxx
then you won't get what you want to get.
There is bdf output:
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 204800 124192 80184 61% /
/dev/vg00/lvol1 295024 37600 227920 14% /stand
/dev/vg00/lvol7 8704000 4289040 4380512 49% /var
5th column is the one with 61%, 14%, 49%. The reason we want to split "%" from this column is that we want to check if 61 > 85 or not. Because if we compare 61% with 85% directly, it will not work.
If you do split($5,z,"85%") means you want to split "85%" from 61%, it will not work.
If you want to change the threshold from 85% to 70% you should run
bdf | awk 'z[split($5,z,"%")-1]>70' | elm -s "Filesystem > 70%" xxx@xxx.xxx
Yang
then you won't get what you want to get.
There is bdf output:
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 204800 124192 80184 61% /
/dev/vg00/lvol1 295024 37600 227920 14% /stand
/dev/vg00/lvol7 8704000 4289040 4380512 49% /var
5th column is the one with 61%, 14%, 49%. The reason we want to split "%" from this column is that we want to check if 61 > 85 or not. Because if we compare 61% with 85% directly, it will not work.
If you do split($5,z,"85%") means you want to split "85%" from 61%, it will not work.
If you want to change the threshold from 85% to 70% you should run
bdf | awk 'z[split($5,z,"%")-1]>70' | elm -s "Filesystem > 70%" xxx@xxx.xxx
Yang
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP