- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: help in shell scripting
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
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
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
тАО05-11-2010 05:04 AM
тАО05-11-2010 05:04 AM
Can any one help me for creating the shell scripting in which i run the cron job and hold only those file system in which 70% full.
Appreciate the prompt support.
Thanks & Regards,
Dev
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2010 05:17 AM
тАО05-11-2010 05:17 AM
SolutionA search of this forum will unearth many threads of this kind, including:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1178106
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2010 01:11 PM
тАО05-11-2010 01:11 PM
Re: help in shell scripting
Hello,
U can use this script in cron which will update u the Filesystem size with the date.
#/bin/sh
#
echo " " >> /tmp/script/filesystem.log
echo " " >> /tmp/script/filesystem.log
date >> /tmp/script/filesystem.log
echo "=================================" >> /tmp/script/filesystem.log
bdf | awk '{if($5 > 70)print $5, " ", $6}' >> /tmp/script/filesystem.log
Hope this should solve your problem
Regards
Ishwar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2010 01:40 PM
тАО05-11-2010 01:40 PM
Re: help in shell scripting
#!/usr/bin/ksh
USED=$(df -k $file_system | head -3 | tail -1 | awk '{print $1}')
TOTAL=$(df -k $file_system | head -1 | awk -F: '{print $2}' |awk '{print $1}')
if [[ $(($USED*100/$TOTAL)) -gt 70 ]]
then
hold
fin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-13-2010 08:21 PM
тАО05-13-2010 08:21 PM
Re: help in shell scripting
I am sorry to delay the response. I was busy with otherwork. Really the URL is so worthfull. Thanks to all for suggesting me to right approach.
Regards,
Dev