HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Starting own program from init.d causes hang
Operating System - HP-UX
1827713
Members
2666
Online
109967
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
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
03-27-2008 12:19 PM
03-27-2008 12:19 PM
I am having trouble starting an application from the init configuration, this causes the startup to hang ("Busy/wait" stays on forever)
From script /sbin/init.d/PowerMonitor (attached):
-------------------------------------------
if [ "$POWERMONITOR" -eq 1 -a -x /usr/Powerware/LanSafe/Bin/PowerMonitor ]; then
/usr/Powerware/LanSafe/Bin/PowerMonitor
echo "PowerMonitor started"
set_return
--------------------------------------------
This is linked to from /sbin/rc2.d/ :
S995PowerMonitor -> /sbin/init.d/PowerMonitor
Testing the script starts the process OK, but the init prosess also remains active:
>/sbin/rc2.d/S995PowerMonitor start &
[1] 3199
>ps-ef |grep Power
root 2967 2966 3 21:02:30 pts/1 0:00 /usr/Powerware/LanSafe/Bin/PowerMonitor
root 2966 2923 0 21:02:30 pts/1 0:00 /sbin/sh /sbin/rc2.d/S995PowerMonitor start
The same happens when I restart the computer, causing "Start PowerMonitor" to remain in the busy/wait state indefinitely.
I had to telnet from another machine and kill the two processes.
I suspect that I have made some error in the script, I would expect the init process to terminate when it has done it's work.
Best regards,
From script /sbin/init.d/PowerMonitor (attached):
-------------------------------------------
if [ "$POWERMONITOR" -eq 1 -a -x /usr/Powerware/LanSafe/Bin/PowerMonitor ]; then
/usr/Powerware/LanSafe/Bin/PowerMonitor
echo "PowerMonitor started"
set_return
--------------------------------------------
This is linked to from /sbin/rc2.d/ :
S995PowerMonitor -> /sbin/init.d/PowerMonitor
Testing the script starts the process OK, but the init prosess also remains active:
>/sbin/rc2.d/S995PowerMonitor start &
[1] 3199
>ps-ef |grep Power
root 2967 2966 3 21:02:30 pts/1 0:00 /usr/Powerware/LanSafe/Bin/PowerMonitor
root 2966 2923 0 21:02:30 pts/1 0:00 /sbin/sh /sbin/rc2.d/S995PowerMonitor start
The same happens when I restart the computer, causing "Start PowerMonitor" to remain in the busy/wait state indefinitely.
I had to telnet from another machine and kill the two processes.
I suspect that I have made some error in the script, I would expect the init process to terminate when it has done it's work.
Best regards,
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2008 12:39 PM
03-27-2008 12:39 PM
Solution
It would seem PowerMonitor does not exec itself. As you did on the command line with the rc script, background it...
if [ "$POWERMONITOR" -eq 1 -a -x /usr/Powerware/LanSafe/Bin/PowerMonitor ]; then
/usr/Powerware/LanSafe/Bin/PowerMonitor &
echo "PowerMonitor started"
set_return
You may need to nohup that also if it dies after the init process completes.
if [ "$POWERMONITOR" -eq 1 -a -x /usr/Powerware/LanSafe/Bin/PowerMonitor ]; then
/usr/Powerware/LanSafe/Bin/PowerMonitor &
echo "PowerMonitor started"
set_return
You may need to nohup that also if it dies after the init process completes.
--
Jeff Traigle
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2008 12:18 AM
03-28-2008 12:18 AM
Re: Starting own program from init.d causes hang
That solves it
Thanks!
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2008 12:19 AM
03-28-2008 12:19 AM
Re: Starting own program from init.d causes hang
.
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
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP