From owner-freebsd-questions@FreeBSD.ORG Tue Jan 3 09:49:14 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B59216A420 for ; Tue, 3 Jan 2006 09:49:14 +0000 (GMT) (envelope-from maslak@ihlas.net.tr) Received: from mailhub.ihlas.net.tr (mailhub.ihlas.net.tr [213.238.128.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC67243D55 for ; Tue, 3 Jan 2006 09:49:12 +0000 (GMT) (envelope-from maslak@ihlas.net.tr) Received: (qmail 41971 invoked from network); 3 Jan 2006 09:50:49 -0000 Received: from unknown (HELO ihlasnetym) (maslak@213.238.150.220) by 0 with ESMTPA; 3 Jan 2006 09:50:49 -0000 Message-ID: <019a01c6104a$ec9c7a20$dc96eed5@ihlasnetym> From: "Halid Faith" To: Date: Tue, 3 Jan 2006 11:49:00 +0200 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: check script for tcp connection X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2006 09:49:14 -0000 Hello=20 I use FreeBSD6.0. I want to use a script to check two or more case.=20 My first cases are as below; First case My Server will check the remote ip address alive or not as = icmp=20 Second case My server will connect to other remote ip address as tcp = protocol like connected or not. if my server could not see the remote ip address AND not connect tcp = connection, My server will send an email me. How can I write a simple script about that ? Thanks