- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script for capture bdf
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
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
10-29-2003 09:30 AM
10-29-2003 09:30 AM
I need create a script for capture the %use and name the logical volume, with this information send mail for monitoring volumen with 90% use.
Help me.
Regards
Rene
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 09:36 AM
10-29-2003 09:36 AM
Re: Script for capture bdf
http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x29720ea029a2d711abdc0090277a778c%2C00.html&admit=716493758+1067466958083+28353475
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 09:48 AM
10-29-2003 09:48 AM
Solutionlogname=/tmp/$(date +%Y%m%d).log
bdf | awk '$5 ~ "9[0-9]%|100%" {printf ("filesystem mounted at %s is running at
%s\n", $1, $5) ;}' > ${LOGNAME}
if [[ -s ${LOGNAME} ]]; then
cat ${LOGNAME} | mailx -s "Critical" mailid@yours.com
if [[ $? -eq 0 ]]; then
rm -f ${LOGNAME}
fi
fi
exit 0
HTH.
- ramd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 02:36 PM
10-29-2003 02:36 PM
Re: Script for capture bdf
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 06:29 PM
10-29-2003 06:29 PM
Re: Script for capture bdf
tail +2|
awk '{ printf "%s", prev
if (substr($0,1,1) == "/")
{
}
prev=$0
}
END {
print prev
}'|
while read fs kbytes used avail pused mount
do
if [[ ${used} -ge 90 ]]
then
echo "${fs} ${used}| mailx -s "highwatermark exceeded" user@dom.com
fi
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 06:53 PM
10-29-2003 06:53 PM
Re: Script for capture bdf
I have attached an example config file as comments at the bottom of the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2003 03:33 AM
10-30-2003 03:33 AM
Re: Script for capture bdf
run you script and output is:
#./prueba2
awk: The string filesystem cannot contain a newline character.
The source line is 1.
The error context is
$5 ~ "9[0-9]%|100%" {printf ("filesystem mounted at %s is running at >>>
<<<
syntax error The source line is 2.
awk: The statement cannot be correctly parsed.
The source line is 2.
awk: There is a missing } character.
awk: There is a missing ) character.
Regards
Rene
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2003 03:45 AM
10-30-2003 03:45 AM
Re: Script for capture bdf
- ramd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2003 04:05 AM
10-30-2003 04:05 AM
Re: Script for capture bdf
Script work but the nombre de lovical volumen is large and awk no take 5 colum and no work: Ejm:
/dev/vgbin/sybase12
2097152 501948 1495557 25% /sybase12
/dev/vgdb/tempdb01_log
720896 675077 42963 94% /tempdb01_log
/dev/vgdb/tempdb01_dat
2727936 2556663 160576 94% /tempdb01_dat
/dev/vgbck/deposito1
94355456 17457496 76298336 19% /deposito1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2003 04:18 AM
10-30-2003 04:18 AM
Re: Script for capture bdf
Merci.
That's the little bit of French i know.
But I guess that you have a problem here - so please attach the output of your bdf command (as a text file) here and I'll try to provide you a fixed script which works!
- ramd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2003 04:27 AM
10-30-2003 04:27 AM
Re: Script for capture bdf
I send the dbf output the awk no capture the 5 column
Regards
Rene
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2003 04:48 AM
10-30-2003 04:48 AM
Re: Script for capture bdf
Bill should've seen this coming - thanks.
- ramd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2003 05:08 AM
10-30-2003 05:08 AM
Re: Script for capture bdf
Script work perfect.
Thanks
Regards
Rene