LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-02-2006, 01:25 AM   #1
assafde
LQ Newbie
 
Registered: Jan 2006
Posts: 1

Rep: Reputation: 0
Unhappy Service check script


Hello all,

I am tryng to write a short telnet script with no success.
Issue is to establish a telnet session every 10 sec to verify our service vs. a remote machin.
Thing is I do not need logon the remote machine ONLY telnet to port 13 ex: telnet xxx.xxx.xxx.xxx 13
it goes:
#####################################################
#!/bin/sh
logfile1=/tmp/telnet_mon.log
host=HOST
command1='telnet'
port='13'
cat /dev/null > ${logfile1} > /dev/null 2>&1
#
while :
do
${command1} ${host} ${port}|grep 2006 >> ${logfile1}
echo ------------------------------------------- >> ${logfile1}
sleep 10
done
######################################################
Problem is while running script in BG (&) mode, after one round script is DEAD by system (Suspended TTY):
[1] + Suspended (tty output) ./net_mon2.sh
OS is SUN solaris 9.
Please advise.
 
Old 02-02-2006, 06:46 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Now you could be bent on inventing the wheel again and if you do: good for you, but there's tools out there like Monit that will do just that and much, much more.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I start ftp service and check if port open? quintan Linux - Software 2 01-15-2018 02:02 AM
way to check and see if a service is running nephish Linux - Software 10 02-11-2006 03:36 PM
Service check script MPowers Linux - Networking 1 01-24-2006 12:42 AM
check vulnerablity for all service in Linux yuva_mca Linux - Security 1 04-25-2004 04:10 AM
script to check if the service is running eyt Linux - Newbie 2 02-16-2004 07:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration