- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script help
Operating System - HP-UX
1754014
Members
7653
Online
108811
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-01-2009 03:34 AM
тАО10-01-2009 03:34 AM
Script help
Hi,
I need one script for.
First it need to check one service.If that service is not running,it should execute a command.
1. ovstatus -c
2. not running then start ovstart -c
3. if running then exit.
Please help me
Thanks in advance
I need one script for.
First it need to check one service.If that service is not running,it should execute a command.
1. ovstatus -c
2. not running then start ovstart -c
3. if running then exit.
Please help me
Thanks in advance
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-01-2009 04:55 AM
тАО10-01-2009 04:55 AM
Re: Script help
what would "ovstatus -c" return if the services is running? Not running?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-01-2009 05:14 AM
тАО10-01-2009 05:14 AM
Re: Script help
What service would you be checking to see if it is running? How would you check to see if that service is running? (ps, top, some other command, etc.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2009 05:31 AM
тАО10-02-2009 05:31 AM
Re: Script help
you could try this:
# PROCESS=inetd;ps -ef | grep -v grep | grep -q $PROCESS && echo "BINGO!"
BINGO!
#
# PROCESS=no_such_process;ps -ef | grep -v grep | grep -q $PROCESS && echo "BINGO!"
#
replace 'echo "BINGO!"' with your 'ovstart -c' command, and give the PROCESS variable the name of the process you want to check. Be sure that it is unique in the 'ps -ef' output!
# PROCESS=inetd;ps -ef | grep -v grep | grep -q $PROCESS && echo "BINGO!"
BINGO!
#
# PROCESS=no_such_process;ps -ef | grep -v grep | grep -q $PROCESS && echo "BINGO!"
#
replace 'echo "BINGO!"' with your 'ovstart -c' command, and give the PROCESS variable the name of the process you want to check. Be sure that it is unique in the 'ps -ef' output!
****
Unix operates with beer.
Unix operates with beer.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP