🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #12926

Re: Matar un ping si tarda mucho

#12926
From: linuxx
Date: Thu, 26 Apr 2001 18:05
52 lines
2525 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, 21 Apr 2001 03:17:14 +0200, AGS <aguillam[nospam]@pie.xtec.es> wrote:
> Hola,
> En un servidor web, ejecuto un ping (<!--#exec cmd="ping -c 1
> 192.168.0.80"--> desde una pagina html para saber si dicha maquina esta
> funcionando, pero si el destino esta desconectado me tarda muchisimo y me
> bloquea la pagina. ���Como podria matar este proceso de forma automatica si
> la respuesta me tarda mas de dos segundos???
> 
> Gracias por las respuestas.
> 
> 

case `ping -c 5 google.com` in
 *'100% packet loss'*)
  echo "No hay web"
   echo
    exit 0
     ;;
      esac 
      echo 'La web esta ok'

      
- -- 
 Luis Toro Teijeiro                                       THANKS FOR YOUR TIME.

               ()
               (o_|||
A�O 3021 del   //\ |   demoniaco.
            <<-V_/_| 

ICQ : 42466380
pasate por http://www.gulic.org  y veras Canarias y los linuxeros
http://jaya.dyndns.org  ------pagina personal
Firma gnupg disponible en https://jaya.dyndns.org/linux/GNUPG/
GnupgFingerprint: 8F06 3E9A F610 89BF 0B09  3DEB 0C7E 9AE1 6CE0 B251 
                              Windows Where do you want to go today?
                              MacOS   Where do you want to be tomorrow?
                              Linux           Are you coming, or what?
    

    
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE66GNWDH6a4WzgslERAtZeAJ47A3qKRTCpaE1TbBjERd5RVIwE3ACgiTn/
ktjK7PfYQYXdvOLdp917WXo=
=nTRh
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <slrn9egoqj.bfr.linuxx@jaya.dyndns.org>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!132-lasp-x4.red.retevision.ES!not-for-mail
References: <9bqnei$feh$1@noucreus.cesca.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,930b9e44b4b8413e
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2001-04-26 10:16:45 PST
Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!132-lasp-x4.red.retevision.ES!not-for-mail
From: linuxx@jaya.dyndns.org (linuxx)
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Matar un ping si tarda mucho
Date: Thu, 26 Apr 2001 14:05:10 -0400
Lines: 52
Message-ID: <slrn9egoqj.bfr.linuxx@jaya.dyndns.org>
References: <9bqnei$feh$1@noucreus.cesca.es>
Reply-To: linuxx25@worldonline.es
NNTP-Posting-Host: 132-lasp-x4.red.retevision.es (62.174.194.132)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 988305396 13430063 62.174.194.132 (16 [81859])
X-Orig-Path: linuxx
User-Agent: slrn/0.9.7.0 (Linux)