___________________________________________________________
/ "NDV" <[EMAIL PROTECTED]> wrote:
| Je n'arrive plus � retrouver le nom d'un projet... L'id�e tr�s
| simple �tait un script Perl pingant une liste de serveurs et
| retournant le r�sulat bien format� sur une page web. Ce programme
| utilisait fping ou hping?

Voici en attachement une page shtml (ssi - apache) et un script (que
j'ai mis dans /usr/local/bin) et qui fait plus ou moins ce que tu
demandes, me semble-t-il, mon probl�me, c'est le timeout. Si une
machine ne r�ponds pas, la page met un petit temps avant de
s'afficher!

-- Arnaud Vandyck
<http://vbstefi60.fapse.ulg.ac.be/~arnaud/>
<http://www.ulg.ac.be/cgi-bin/ph/search?id=u184137>

�O� est pass� Bob?..�
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>fapse7.gw.ulg.ac.be</title>
</head>

<body>
<h1>fapse7.gw.ulg.ac.be</h1>

<h2>R�seau B�timent C1</h2>

<p>Si les machines suivantes sont accessibles, il ne devrait pas y avoir de 
perturbation du r�seau dans le b�timent C1.</p>

<p>Contact de la <b>�STE-PROG�</b>: 139.165.77.153... <!--#exec cmd="sh 
/usr/local/bin/pingtest.sh 139.165.77.153" --></p>

<p>Contact de la <b>�Patate�</b>: 139.165.77.140... <!--#exec cmd="sh 
/usr/local/bin/pingtest.sh 139.165.77.140" --></p>

<!-- <p>Contact de la <b>�NoNo�</b>: 139.165.77.200... <!--#exec cmd="sh 
/usr/local/bin/pingtest.sh 139.165.77.200" --></p> -->

<p>Contact de la <b>passerelle</b>: 139.165.77.1... <!--#exec cmd="sh 
/usr/local/bin/pingtest.sh 139.165.77.1" --></p>

<hr/>

<h2>R�seau Val Beno�t</h2>

<p>Si la machine suivante est accessible, nous avons une connexion avec le reste du 
Val Beno�t.</p>

<p>Contact de <b>vb1.gw.ulg.ac.be</b>: 139.165.140.1... <!--#exec cmd="sh 
/usr/local/bin/pingtest.sh 139.165.140.1" --></p>

<hr/>

<h2>R�seau ULg</h2>

<p>Si les machines suivantes sont accessibles, nous avons une connexion avec le reste 
de l'ULg.</p>

<p>Contact de <b>segi5.gw.ulg.ac.be</b>: 193.190.228.219... <!--#exec cmd="sh 
/usr/local/bin/pingtest.sh 193.190.228.219" --></p>

<p>Contact de <b>segi3.gw.ulg.ac.be</b>: 193.190.228.211... <!--#exec cmd="sh 
/usr/local/bin/pingtest.sh 193.190.228.211" --></p>

<p>Contact de <b>inet3.gw.ulg.ac.be</b>: 193.190.228.220... <!--#exec cmd="sh 
/usr/local/bin/pingtest.sh 193.190.228.220" --></p>

<hr/>

<h2>R�seau Belnet</h2>

<p>Si la machine suivante est accessible, nous avons une connexion avec le �provider� 
de l'ULg.</p>

<p>Contact de <b>www.belnet.be</b>: 193.190.198.53... <!--#exec cmd="sh 
/usr/local/bin/pingtest.sh 193.190.198.53" --></p>

<hr/>

<h2>R�seau Internet</h2>

<p>Si <b>Google.com</b> va, tout va!</p>

<p>Contact de www.google.com: 216.239.51.101... <!--#exec cmd="sh 
/usr/local/bin/pingtest.sh 216.239.51.101" --></p>

<hr>
<address><a href="mailto:[EMAIL PROTECTED]";>Arnaud Vandyck</a></address>
<!-- hhmts start -->Last modified: Tue Jan 14 09:33:08 CET 2003 <!-- hhmts end -->
</body> </html>
#! /bin/sh

ping -c 1 -q -n $1 > /dev/null && \
echo "<font color='green'>OK</font>" || \
echo "<font color='red'>KO</font>"

Attachment: msg09002/pgp00000.pgp
Description: PGP signature

Répondre à