- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Hpux to Sco script getting stuck on startup..
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
06-21-2001 07:38 AM
06-21-2001 07:38 AM
Hpux to Sco script getting stuck on startup..
I am working on a script sitting on Hpux that will stop and start a procces on a many Sco Boxes. What is happening is that we have over 19 IVRs (Interactive Voice Response) that run on Sco. But everyone in a while the process needs to be stoped and started on each box. And for a while now we would have to telenet into each box and stop and start. But I am working on a script that will go in and stop and start everything from one box. I have tried it 2 ways. First and rcmd command from a sco box to the other sco boxes. *comments
#rcmd sco hosts -l ./stopivr *works
#rcmd sco hosts -l ./startivr * hangs
This works when I try to stop the process but when I try to start it then it gets stuck. And I would have to go and kill -9 the pid of the rcmd process. Then I did a remsh from an Hpux box and once again I can stop it fine but when I try to start it then it gets hung. * comments
#remsh scohost -l root ./stopivr *works
#remsh scohost -l root ./stopivr *hangs
The weird thing is that if I go check the box it gets hung on ( both from Hpux and Sco) The process is stuck yes .. but the remote process that I was try to start is started. But only on the first box the other ones are not. I have even tired
#remsh sco hosts -l ./startivr &
This gives me the command promt back but it still gets stuck. Anyone have any ideas?
Thanks in advance for your help
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 07:41 AM
06-21-2001 07:41 AM
Re: Hpux to Sco script getting stuck on startup..
After reading
Theese two lines
#remsh scohost -l root ./stopivr *works
#remsh scohost -l root ./stopivr *hangs
should be
#remsh scohost -l root ./stopivr *works
#remsh scohost -l root ./startivr *hangs
Cuss I can stop it just not start it.
And I even tried to add the full path
remsh scho host -l root "PATH=/usr/bin:/usr/sbin;./startivr"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 07:51 AM
06-21-2001 07:51 AM
Re: Hpux to Sco script getting stuck on startup..
Does the startivr script require any input? Does it have any standard output?
I worked with several hundred SCO Unix boxes for over three years. This problem seems vaguely familiar. I'll dig around a little and see what I can remember. Of course, the old brain isn't what it used to be!
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 07:56 AM
06-21-2001 07:56 AM
Re: Hpux to Sco script getting stuck on startup..
And no it does not require any input.
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 08:09 AM
06-21-2001 08:09 AM
Re: Hpux to Sco script getting stuck on startup..
remsh scohost -l root "nohup startivr"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 08:15 AM
06-21-2001 08:15 AM
Re: Hpux to Sco script getting stuck on startup..
And it is always the startivr that gets stuck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 08:25 AM
06-21-2001 08:25 AM
Re: Hpux to Sco script getting stuck on startup..
Can you try the 'remsh' command with the -n option? This option redirects standard input to remsh from /dev/null. Please try this and let us know what happens:
#remsh scohost -l root -n ./startivr
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 08:30 AM
06-21-2001 08:30 AM
Re: Hpux to Sco script getting stuck on startup..
still sticks ..
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 08:33 AM
06-21-2001 08:33 AM
Re: Hpux to Sco script getting stuck on startup..
Can you post the startivr script please? I'd like to see what it is doing.
Thanks.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 08:49 AM
06-21-2001 08:49 AM
Re: Hpux to Sco script getting stuck on startup..
On the remote host.
Here is the stop script
PIDS=`ps -ef | grep /usr/bin/ivr | grep -v grep | awk '{print $2}'`
if [ -n "$PIDS" ]
then
kill $PIDS
fi
PIDS=`ps -ef | grep /usr/bin/comcen | grep -v grep | awk '{print $2}'`
if [ -n "$PIDS" ]
then
kill $PIDS
fi
# do it again for those diehard respawning processes.
PIDS=`ps -ef | grep /usr/bin/ivr | grep -v grep | awk '{print $2}'`
if [ -n "$PIDS" ]
then
kill $PIDS
fi
PIDS=`ps -ef | grep /usr/bin/comcen | grep -v grep | awk '{print $2}'`
if [ -n "$PIDS" ]
then
kill $PIDS
fi
---------
here is the start script ..
echo "removing logs..."
cd /var/proc/log
rm *.log
df -tvk >/dev/null
/usr/bin/comcen
sleep 1
/usr/bin/ivr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 10:15 AM
06-21-2001 10:15 AM
Re: Hpux to Sco script getting stuck on startup..
Do you know where in the startivr script that things are hanging? Can you put an echo statement before each line and send the standard output and standard error to a file? If you can figure out which command it is hanging on that would be a big clue.
Also, I'm curious about the 'df -tvk' command. I understand what it does, but the output gets sent to /dev/null. Why is that command in the start script?
Can you give that a try? I'm getting curiouser and curiouser!
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 12:13 PM
06-21-2001 12:13 PM
Re: Hpux to Sco script getting stuck on startup..
And I am getting stuck on
/usr/bin/comcen
and
/usr/bin/ivr
where do I put the echo to see the output ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 12:25 PM
06-21-2001 12:25 PM
Re: Hpux to Sco script getting stuck on startup..
echo "removing logs..."
cd /var/proc/log
rm *.log
echo "running df"
df -tvk >/dev/null
echo "starting comcen"
nohup /usr/bin/comcen &
sleep 1
echo "starting ivr"
nohup /usr/bin/ivr &
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 12:35 PM
06-21-2001 12:35 PM
Re: Hpux to Sco script getting stuck on startup..
Now the problem is making the change to all the scripts on your SCO systems! :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 01:04 PM
06-21-2001 01:04 PM
Re: Hpux to Sco script getting stuck on startup..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 01:05 PM
06-21-2001 01:05 PM
Re: Hpux to Sco script getting stuck on startup..
Edit the startivr script on the SCO box and put the nohup commands in there.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 01:16 PM
06-21-2001 01:16 PM
Re: Hpux to Sco script getting stuck on startup..
removing logs ..
running df
starting comcen
Sending output to nohup.out
starting ivr
# Sending output to nohup.out
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 01:21 PM
06-21-2001 01:21 PM
Re: Hpux to Sco script getting stuck on startup..
Any more ideas?
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 03:11 PM
06-21-2001 03:11 PM
Re: Hpux to Sco script getting stuck on startup..
remsh sco '/bin/sh /startivr'
Do not use a -n, because I have seen this hang certain systems. ESP BSD systems.
Check the paths above, and see if it works with them corrected. if /bin/sh is a link, use the real path, and not the link...same with startivr.
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2001 03:36 PM
06-21-2001 03:36 PM
Re: Hpux to Sco script getting stuck on startup..
Just to eliminate another variable, I would try running the command between two of the SCO boxes. If it fails there, it is probably a problem with either the comcen or ivr programs. If it works, it must be a problem with the remote command machinery between HP and SCO. Either way, it should narrow down things a bit.
Also, when you run the script from a telnet session to the SCO box, do a 'ps -f' afterwards. I'd be curious to know what that shows.
I think I have another way to get it done, but we'll save that for a last resort.
This one is getting interesting.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2001 07:15 AM
06-22-2001 07:15 AM
Re: Hpux to Sco script getting stuck on startup..
Fist of all I want to thank you all for your help on this issue.
Let me start of telling everyone how I test this. First of all I have 2 telnet sessions open. 1 in the HPUX box that I am doing the remsh from and the second one where I am in the SCO box to see if the process stopped and started. Well now to what I discovered today.
I was doing what shannon suggested.
And in the SCO box the proccess were started and in the HPUX box they still got stuck and didnt give me back a command promt.
But what I did in the SCO box was a stopivr.
And that unlocked the script on the HPUX box and a command promt came back. I thought that was weird.
John , you suggest for me to do it from the SCO box to another SCO box. Is there any specific way for me to try this? Becuase just regular rcmd scobox2 -l root 'startivr'
gets stuck too. And when I do a ps -ef|grep rcmd I see the rcmd procces there.
Thanks
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2001 07:39 AM
06-22-2001 07:39 AM
Re: Hpux to Sco script getting stuck on startup..
Can you post your new startivr script please.
When you added the nohup did you also add an & to the end of the command so that it would run in the background?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2001 07:47 AM
06-22-2001 07:47 AM
Re: Hpux to Sco script getting stuck on startup..
startivr
# more startivr2
echo "removing logs .."
cd /var/proc/log
rm *.log
echo "running df"
df -tvk >/dev/null
echo "starting comcen"
nohup /usr/bin/comcen &
sleep 1
echo "starting ivr"
nohup /usr/bin/ivr &
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2001 07:53 AM
06-22-2001 07:53 AM
Re: Hpux to Sco script getting stuck on startup..
You just gave us more good information. Since the remote command is hanging up when you try it from an HP box and also from a SCO box, it sounds like the problem is with the 'startivr' program on the SCO box. I'm not a wizard with the remote command machinery (my Stevens networking books are at home-darn!), but it seems that the remsh/rcmd program is waiting for the program it executes (startivr) to finish up and return an exit code. It must do this from a regular telnet session, but something is causing it not to when it is run remotely
Ok. Looking at the remsh man page, it says, "..remsh exits when the sockets associated with stdout and stderr of the remote command are closed." Could it be that the 'startivr' program is sloppy when it comes to closing all the files and sockets it might have open?
Also, the man page for remsh says "The following command line causes remsh to return immediately without waiting for the remote command to complete:
remsh otherhost -n "command 1>&- 2>&- &"
So you could try:
remsh scohost -l root "./startivr 1>&- 2>&- &"
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2001 09:02 AM
06-22-2001 09:02 AM
Re: Hpux to Sco script getting stuck on startup..
is there something else I can do in sco or hpux besides a remsh or a rcmd ?