- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- System Administration
- >
- check system
-
- Forums
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- OEM Solutions
- Servers: The Right Compute
- Shifting to Software-Defined
- Telecom IQ
- Transforming IT
- Infrastructure Solutions German
- L’Avenir de l’IT
- IT e Trasformazione Digitale
- Enterprise Topics
- ИТ для нового стиля бизнеса
- Blogs
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Forums
-
Blogs
-
InformationEnglish
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-19-2009 11:41 PM
08-19-2009 11:41 PM
check system
if the directory size larger than xxx KB or no.of files is more that xxx , then send alert mail to me , can adivse what can i do ?
can advise what can i do ? thx
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-19-2009 11:56 PM
08-19-2009 11:56 PM
Re: check system
first advice - use the search option of this forum!
Examples:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=419106
http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1237836
http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=847833
General tipps:
http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=131801
HTH
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-20-2009 12:09 AM
08-20-2009 12:09 AM
Re: check system
hopefully i did understand correct what you need - try this:
#!/usr/bin/sh
alert=0
alertsize=20000
alertfiles=500
alertemail=someone@domain.com
checkdir=/tmp
checksize=$(bdf $checkdir | tail -n 1 | awk '{print $3}')
checkcount=$(ll $checkdir | wc -l)
if [[ $checksize -ge $alertsize ]]
then
alert=1
fi
if [[ $alert = 1 ]]
then
echo "$(hostname): $checkdir contains $checkcount files and has $checksize kb used Space" | mailx -s "ALERT" $alertemail
fi
New Forum Locations by ITRC Tree
New Forums Site Map
Want Good Answers? Ask Good Questions...
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-20-2009 02:04 AM
08-20-2009 02:04 AM
Re: check system
#!/usr/bin/sh
alert=0
alertsize=20000
alertfiles=500
alertemail=someone@domain.com
checkdir=/tmp
checksize=$(bdf $checkdir | tail -n 1 | awk '{print $3}')
checkcount=$(ll $checkdir | wc -l)
if [[ $checksize -ge $alertsize ]]
then
alert=1
fi
if [[ $checkcount -ge $alertfiles ]]
then
alert=1
fi
if [[ $alert = 1 ]]
then
echo "$(hostname): $checkdir contains $checkcount files and has $checksize kb used Space" | mailx -s "ALERT" $alertemail
fi
New Forum Locations by ITRC Tree
New Forums Site Map
Want Good Answers? Ask Good Questions...
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2019 Hewlett Packard Enterprise Development LP