- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Sleep process problem
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
Forums
Discussions
Discussions
Discussions
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
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
04-01-2004 11:42 PM
04-01-2004 11:42 PM
I have a script that is respawned by the inittab. When the script is already running, sometimes we need to stop it for some work to be done. Unfortunately not all of us have the root password, so instead of waking the UNIX administrator up at 0'clocks in the morning, we put the script to sleep by editing the header (adding sleep 6000). When the script is killed and subsequently respawned, the script obviously spawns a sleep process. The problem we are having, is that when the sleep process 'only' is killed, and the script starts up again, eventually it will die (after a few hours), and respawn 'again'. We do not know what is causing this, and are obviously keen to find out.
many thanks
John
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2004 12:17 AM
04-02-2004 12:17 AM
Re: Sleep process problem
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2004 12:18 AM
04-02-2004 12:18 AM
Re: Sleep process problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2004 12:20 AM
04-02-2004 12:20 AM
Re: Sleep process problem
Mark I dont think John can kill HUP if he is not root !
John you could ask your sys admin to install sudo and give you the ability to kill HUP
:-) John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2004 12:34 AM
04-02-2004 12:34 AM
Re: Sleep process problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2004 12:42 AM
04-02-2004 12:42 AM
Re: Sleep process problem
The sleep values etc are irrelevant in my case as I am just preventing the script from running so I can prevent users from logging onto a weblogic instance (started, stopped by the script). The weird thing is that when I create the sleep process, kill it so that the script starts running from where it left off, the application crashes and restarts again after a time period. This time period is much larger (2-3 times) than the sleep value I specified, so it can't be that.
This has happened a couple of times now.
thanks again chaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2004 12:43 AM
04-02-2004 12:43 AM
Re: Sleep process problem
If the script is basically looping, I'd do something along the lines of getting the script to check for the presence of a file. If it finds a file, sleep. If it doesn't, then continue. The flow would be:
init program loop
if file exists
sleep 500
else
process normally
fi
endloop
Just touch the file its looking for to start the sleep process, then delete it when you want processing to continue.
Col.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2004 01:07 AM
04-02-2004 01:07 AM
SolutionCan't the script be made loop arouns a "sleep" itself if, for example a file exists and you can touch and remove that file.
I do have another alternative for you which may be a bit of overkill for what you want.
THe attached script behaves like init in that it can "respawn" processes. However, with this script, processes are given named run levels. A process runs (and is respawned) within one or more run levels. Thus you could respawn your script and when you want to stop it, you just change to a run level that the script isn't in.
As an encore, the script also does various alerting things and monitors itself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2004 01:08 AM
04-02-2004 01:08 AM
Re: Sleep process problem
Here's the attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2004 01:09 AM
04-02-2004 01:09 AM
Re: Sleep process problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2004 04:00 AM
04-02-2004 04:00 AM
Re: Sleep process problem
Lateral thinking:
Get the sys admin to give you full permision on the script.
if script is called fred then create an empty one called fred-do-nothing.
Routine will them be
cp fred fred.bak
cp fred-do-nothing fred
When finished reverse it
cp fred.back fred
Reason
Init will not report errors if the script exists.
Simple
Paula