- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: pearl script
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-28-2005 02:58 PM
12-28-2005 02:58 PM
pearl script
i want a pearl script which has to monitor a log file of a database, which has to send a mail weather it is growing or not, every 5 minutes once. can i get that from someone.
thanks
prasad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2005 04:51 PM
12-28-2005 04:51 PM
Re: pearl script
What you ask for has been done to a great extent.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=51050
There are links in this thread to over 200 sysadmin scripts in there. One of them probably does exactly what you want.
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-28-2005 05:23 PM
12-28-2005 05:23 PM
Re: pearl script
#!/bin/sh
# Change this to your log file
LOGFILE=/tmp/test.log
while [ 1 ]
do
SIZE=$(ls -l ${LOGFILE} | awk '{ print $9; }')
let OLDSIZE=SIZE
if [[ ${SIZE} -gt ${OLDSIZE} ]]
then
echo "${LOGFILE} is growing" | mailx -s "logfile size alert" mailid
else
echo "${LOGFILE} is not growing" | mailx -s "logfile size alert" mailid
fi
# Sleep time - 5 min
sleep 300
done
# END
exit 0
############
# chmod u+x script.sh
# ./script.sh 1>/tmp/logfile 2>&1 &
# tail -f /tmp/logfile
gives details.
-Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2005 05:11 PM
12-30-2005 05:11 PM
Re: pearl script
thanks for your replies.
since it is a log file, whenever it modifies the file i need some kind of notification, the same script i wanted include in even aix server also.
prasad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2006 06:00 PM
01-01-2006 06:00 PM
Re: pearl script
echo "${LOGFILE} is growing" | mailx -s "logfile size alert" mailid
else
echo "${LOGFILE} is not growing" | mailx -s "logfile size alert" mailid
with your mail setting. It will send mails to your account.
Script will work on aix server also.
-Muthu