GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Scripts Problems ... Please Help Me!
Operating System - HP-UX
1845907
Members
4614
Online
110250
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
Forums
Discussions
Discussions
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
05-04-2005 12:23 AM
05-04-2005 12:23 AM
Hello guys!!!
I'm going bananas with a script here!!!
The aim of the script is to check when a database process goes down.
The script is very simple... Like this one:
#-----------------------------------------
#!/usr/bin/sh
# set path to prevent trojan horses
PATH=/usr/bin:/opt/OV/bin/OpC
# Check the number of processes running
PROC=`ps -ef | grep -i $1 | grep -v grep | wc -l`
echo $PROC
#-------------------------------------------
So the problem is the following:
I call the script this way:
sh teste.sh ora_pmon_openview
Where ora_pmon_openview is the name of the process that I want to know if is running or not. This process runs once a time one my server, so the script should echo the number 1 on the screen alright?
But that's the problem... The script is returning the number 2, but when I execute the command manualy "ps -ef |grep -i ora_pmon_openview |grep -v grep |wc -l" it returns me the right number (1).
Did you see something wrong on the script?
Please, I'm counting on you!
Thanks,
Rafael M. Braga
I'm going bananas with a script here!!!
The aim of the script is to check when a database process goes down.
The script is very simple... Like this one:
#-----------------------------------------
#!/usr/bin/sh
# set path to prevent trojan horses
PATH=/usr/bin:/opt/OV/bin/OpC
# Check the number of processes running
PROC=`ps -ef | grep -i $1 | grep -v grep | wc -l`
echo $PROC
#-------------------------------------------
So the problem is the following:
I call the script this way:
sh teste.sh ora_pmon_openview
Where ora_pmon_openview is the name of the process that I want to know if is running or not. This process runs once a time one my server, so the script should echo the number 1 on the screen alright?
But that's the problem... The script is returning the number 2, but when I execute the command manualy "ps -ef |grep -i ora_pmon_openview |grep -v grep |wc -l" it returns me the right number (1).
Did you see something wrong on the script?
Please, I'm counting on you!
Thanks,
Rafael M. Braga
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2005 12:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2005 12:45 AM
05-04-2005 12:45 AM
Re: Scripts Problems ... Please Help Me!
Thanks a lot!!!
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.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP