Re: Not able to know the device is alive or not after rebooting...

From: Arjen Markus (arjen.markus_at_wldelft.nl)
Date: 02/02/05


Date: Wed, 02 Feb 2005 16:11:22 +0100

Puneet wrote:
>
> Ok I tell in detail,
>
> - I am just spawn on that device and issuing the reboot command.
> - after issuing command devies has been rebooted.
> - reboot time not fixed it can varied.
> - but i am doing all these stuffs via tcl code. now i want to know that
> device (ip address) is alive or not (alive when device is up) through
> my code.
> so how i know that it is alive or not. Shell i do ping every time
> that ip address. or as you suggest and i also think that we can through
> a process in background of shell that ping that ip and whenever ip is
> enable it ends that process automatically.
>

ping can be run to see if the addressee is alive and then finish, right?
Then the sketch of a script that Chris gave (and my example when
properly
debugged :)) should give you a solution.

> For doing this thing i hear about fileevent utility in tcl but i dont
> able to understand how to use it. If you know some another way , please
> explain me with example :-)
>

fileevent does wonders, but it requires a socket or pipe that is alive.
During reboot there will be no such thing possible. So, you have to
try to connect, for instance, via ping - if that fails, the machine
is not up yet. If it succeeds, then you know it is up.

There is nothing fileevent can usefully do in these circumstances.

But for examples: see the Wiki - there are plenty of scripts that
use it out there - http://wiki.tcl.tk/880 discusses the command
as such.

Regards,

Arjen



Relevant Pages

  • RE: asynchronous methods or create my own threads?
    ... "djc" wrote: ... I am writing a command line utility that I can use to quickly reboot some ... In simple terms I just need to repeatedly ping the ...
    (microsoft.public.dotnet.languages.csharp)
  • asynchronous methods or create my own threads?
    ... I am writing a command line utility that I can use to quickly reboot some ... In simple terms I just need to repeatedly ping the ... down, then no ping replies indicate its down, then when ping replies come ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: bug w2k
    ... it seems to work with command line programs other than ping - i've ... > - A reboot is required to kill the session. ... >Subject: bug w2k ...
    (Vuln-Dev)
  • Re: EWF/DUA help needed
    ... > Your script does not reboot the device because it likely fails on the EXECUTE command. ... I have changed the script file, ... it may not be good implementation of your script for the purpose of changing running app with EWF on. ... > With EWF command you just commit a registry change to move/replace the JP.exe file on next reboot. ...
    (microsoft.public.windowsxp.embedded)
  • WG: Problem with ACPI / reboot: Black Screen? Part No 2
    ... The problem is the "reboot" command. ... I have testet with pfsense 1.2.3 and then works the reboot command. ... I habe testet wirth Knoppix 6.7.1 (Kernel 3.0.x) and the reboot command works. ... swap pager pageins ...
    (freebsd-current)