- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- problem_in 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
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
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-31-2009 02:00 AM
тАО12-31-2009 02:00 AM
i tried one script for monitoring service and to start the service if its not running (even i am not good at scripting).But this one is not giving the desired o/p. Please check this.
########################################
#this is a sample script for starting the services
while
read service
do
/opt/OV/bin/ovstatus -v $service >>./status.log
if
[ "{/opt/OV/bin/ovstatus -c $service |awk '{print $3}'|grep -v State}" = "NOT_RUNNING" ]
then
/opt/OV/bin/ovstart -v $service >>./started.log
fi
done < ./servicelist
#########################################
Thanks & Regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-31-2009 02:08 AM
тАО12-31-2009 02:08 AM
Re: problem_in script
# cat servicelist
rgs,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-31-2009 02:16 AM
тАО12-31-2009 02:16 AM
Re: problem_in script
# cat servicelist
ovet_poll
ovactiond
pmd
Thks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-31-2009 02:27 AM
тАО12-31-2009 02:27 AM
Re: problem_in script
FLOG=./ovstatus.log
date >> $FLOG
ovstatus -v >> $FLOG
echo "------------------------------------------" >> $FLOG
while read service
do
STATUS=$(ovstatus -c ${service}|tail -1|awk '{print $3}')
if [ "$STATUS" != "RUNNING" ]
then
echo "ovstart -v ${service}" >> $FLOG
fi
done < ./servicelist
rgs,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-31-2009 02:31 AM