Operating System - HP-UX
1820100 Members
3584 Online
109608 Solutions
New Discussion юеВ

Re: Script for telnet monitor.

 
chapaya_1
Frequent Advisor

Script for telnet monitor.

Hi All ,

I have a problem with one server D Class :
Sometimes no one can access the server with telnet , ping is working ....
The server become stucked ..
I need a script or command to monitor if
telnet is not working .

BYE
6 REPLIES 6
Ralph Grothe
Honored Contributor

Re: Script for telnet monitor.

telnetd is usually spawned by inetd (look at /etc/inetd.conf).
So it's rather inetd you need to monitor.
You could set up a monitoring skript on another host (or even locally) that initiates automated telnet sessions.
A good toolkit for this would be Expect,
which originated from TCL but for which ports to Perl and Python have become available by now.
Madness, thy name is system administration
Ralph Grothe
Honored Contributor

Re: Script for telnet monitor.

Oops, as for Perl, the most obvious module to use would of course be Net::Telnet
Madness, thy name is system administration
Steven E. Protter
Exalted Contributor

Re: Script for telnet monitor.

tail -f /var/adm/syslog/syslog.log

inetd -l

To enhance logging. If you do it on the console you can check the system when its "stuck"

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ralph Grothe
Honored Contributor

Re: Script for telnet monitor.

Is the server heavily loaded, e.g. short of memory?
Is it even swapping?
Do you have high network traffic, very many open sockets, many simultanious connection requests?
Was your inetd started with "-l" option, i.e. is it doing session logging?
Is your DNS name resolution working fast enough for all the connecting clients if you have session logging enabled?
Madness, thy name is system administration
chapaya_1
Frequent Advisor

Re: Script for telnet monitor.


There is no resolving problem .

I need to run this script from other machine ..
A. Clay Stephenson
Acclaimed Contributor

Re: Script for telnet monitor.

This is a rather classic symptom and especially on 10.20. I suspect that your problem is not telnetd at all but rather that inetd has died. Ping's still work but that's about it. Look for and install the latest 10.20 network and inetd patches. On 10.20 boxes (even after fully patching), I always had a cronjob that ran every 10 minutes to make sure that inetd was still alive and restart it if not.
If it ain't broke, I can fix that.