|
Home > Archive > Unix administration > February 2004 > Telnet Scripts
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Steve Birchfield 2004-01-27, 9:35 am |
| I have a SCO Unix server that I need to reboot on a regular basis
throughout the day due to an application problem. I would like a
script to run that does the following:
login as root
tcp stop (command)
netbios stop (command)
reboot (command)
That's all I need to do. I am using a windows PC to telnet in with
and I would like to create a batch file so I can just launch it and
let it reboot the server. Can anyone tell me a way to do this? I was
able to script in ftp but have not found a way so far with telnet.
| |
| Dave Hinz 2004-01-27, 12:35 pm |
| On 27 Jan 2004 14:07:20 -0800, Steve Birchfield <sbirchfield1@yahoo.com> wrote:quote:
> I have a SCO Unix server that I need to reboot on a regular basis
> throughout the day due to an application problem.
I'm sorry to hear that, on several counts.
quote:
> I would like a script to run that does the following:
(snip)quote:
> reboot (command)
quote:
> That's all I need to do.
Well, that might be one way of dealing with it, but I'm not sure you're
fixing the right problem. Have you talked to either SCO support (better
hurry...) or the vendor of the software to see if they have suggestions
on how to stop the app from screwing up the system?
How, exactly, is the system behaving when it's wedged?
Does killing the application's processes fix it, or is a full reboot
really needed?
If it really does need a reboot, is there a reason you couldn't open an
ssh session to the box and execute a script that is on that box?
Can you, instead, find a way to have the box recognize when it has
this problem and take remedial action?
quote:
> I am using a windows PC to telnet in with
> and I would like to create a batch file so I can just launch it and
> let it reboot the server.
Yeah, that might work, maybe "expect" would be a useful language to
work in if there's a Windows port, but I think you're solving the wrong
problem, and doing it the wrong way around.
Dave Hinz
| |
| phn@icke-reklam.ipsec.nu 2004-01-27, 6:34 pm |
| Steve Birchfield <sbirchfield1@yahoo.com> wrote:quote:
> I have a SCO Unix server that I need to reboot on a regular basis
> throughout the day due to an application problem. I would like a
> script to run that does the following:
quote:
> login as root
> tcp stop (command)
> netbios stop (command)
> reboot (command)
quote:
> That's all I need to do. I am using a windows PC to telnet in with
> and I would like to create a batch file so I can just launch it and
> let it reboot the server. Can anyone tell me a way to do this? I was
> able to script in ftp but have not found a way so far with telnet.
Unless an SCO representative will help you, your best option is to
migrate to Linux ( which should be possible to do smoothly).
You did not write which part of the globe this system is located, but i'm
shure you will be able to search for a competent Linux-consultant with
experiences of SCO that can help you migrating your current apps.
--
Peter Håkanson
IPSec Sverige ( At Gothenburg Riverside )
Sorry about my e-mail address, but i'm trying to keep spam out,
remove "icke-reklam" if you feel for mailing me. Thanx.
| |
| Bill Marcum 2004-01-28, 6:39 am |
| On 27 Jan 2004 14:07:20 -0800, Steve Birchfield
<sbirchfield1@yahoo.com> wrote:quote:
> I have a SCO Unix server that I need to reboot on a regular basis
> throughout the day due to an application problem. I would like a
> script to run that does the following:
>
> login as root
> tcp stop (command)
> netbios stop (command)
> reboot (command)
>
> That's all I need to do. I am using a windows PC to telnet in with
> and I would like to create a batch file so I can just launch it and
> let it reboot the server. Can anyone tell me a way to do this? I was
> able to script in ftp but have not found a way so far with telnet.
Rsh or ssh would be easier to script.
--
Absurd Procrustean Egghead Cornstarch Variant Bill Marcum
| |
|
| You are definitely solving the wrong problem. But since that 'may' be
your only way to fix the issue why not just write a script that runs
from cron, the script can e-mail everyone of concern that a reboot is
about to take place and then reboot the system.
Steve Birchfield wrote:
> I have a SCO Unix server that I need to reboot on a regular basis
> throughout the day due to an application problem. I would like a
> script to run that does the following:
>
> login as root
> tcp stop (command)
> netbios stop (command)
> reboot (command)
>
> That's all I need to do. I am using a windows PC to telnet in with
> and I would like to create a batch file so I can just launch it and
> let it reboot the server. Can anyone tell me a way to do this? I was
> able to script in ftp but have not found a way so far with telnet.
|
|
|
|
|