HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Scritping Problem
Operating System - HP-UX
1839233
Members
2801
Online
110137
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
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
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
03-28-2003 12:19 AM
03-28-2003 12:19 AM
Scritping Problem
Hi Folks,
I have a scripting problem here.If anyone can help me on this.I have a simple script like below :
numwork=`hrtest getconf|grep local | wc -l`
echo Number of workers is $numwork
if [ $numwork -lt 1 ]; then
echo HyperRoll is down.Send alert to DM
fi
where hrtest is a specific application command. But sometime hrtest command got hang on the system, and did not give any error. So how can I detect this problem when hrtest got hang? can I add a logic to detect it? or how can we stop the hang process? so it will give an information that hrtest is hang.
Thanks in advance.
Regards,
Dewa Negara
I have a scripting problem here.If anyone can help me on this.I have a simple script like below :
numwork=`hrtest getconf|grep local | wc -l`
echo Number of workers is $numwork
if [ $numwork -lt 1 ]; then
echo HyperRoll is down.Send alert to DM
fi
where hrtest is a specific application command. But sometime hrtest command got hang on the system, and did not give any error. So how can I detect this problem when hrtest got hang? can I add a logic to detect it? or how can we stop the hang process? so it will give an information that hrtest is hang.
Thanks in advance.
Regards,
Dewa Negara
Dewa Negara
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2003 12:27 AM
03-28-2003 12:27 AM
Re: Scritping Problem
a simple logic i use normally
save this as a separate script. use another script to run this in background. and sleep for some time. after that see if this process is still running. in that case ur has hung and just kill it.
do let me know in case u need more info.
hth
-balaji
save this as a separate script. use another script to run this in background. and sleep for some time. after that see if this process is still running. in that case ur has hung and just kill it.
do let me know in case u need more info.
hth
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2003 12:40 AM
03-28-2003 12:40 AM
Re: Scritping Problem
Balaji,
Thanks alot. Can I put like below :
#cat /tmp/script1
numwork=`hrtest getconf | grep local |wc -l`
Then on the script itself I put :
(. /tmp/script1;sleep 60) &
if [ $? -ne 0 ];then
kill -9
exit
fi
echo Number of workers is $numwork
if [ $numwork -lt 1 ]; then
echo HyperRoll is down.Send alert to DM
fi
Please confirm.
Thanks alot.
Regards,
Dewa Negara
Thanks alot. Can I put like below :
#cat /tmp/script1
numwork=`hrtest getconf | grep local |wc -l`
Then on the script itself I put :
(. /tmp/script1;sleep 60) &
if [ $? -ne 0 ];then
kill -9
exit
fi
echo Number of workers is $numwork
if [ $numwork -lt 1 ]; then
echo HyperRoll is down.Send alert to DM
fi
Please confirm.
Thanks alot.
Regards,
Dewa Negara
Dewa Negara
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2003 01:10 AM
03-28-2003 01:10 AM
Re: Scritping Problem
hi,
dont call the /tmp/script in background and run it from the same script. because there will be one instance always running. if you are not going to process further, then this is ok.
else, it should be another script.
-balaji
dont call the /tmp/script in background and run it from the same script. because there will be one instance always running. if you are not going to process further, then this is ok.
else, it should be another script.
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
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 2025 Hewlett Packard Enterprise Development LP