0

I have device from which I need parse telnet log.

My system consists from two scripts:

  • autologin.sh (this is expect script which auto connect to telnet server)

  • telnet-parsing.py (this is python script which parse incoming data)

This two scripts launch like following:

./autologin.sh | ./telnet-parsing.py

From time to time my telnet server disconnect me.

To avoid this problem I've had bash script (launch every 5 minutes with Cron) which check's sum of input packets with iptables and reload service if this sum less than some constant.

This is my solution for monitoring active telnet session. This is not very elegant, because in 5 minutes of disconnection I can lose a lot of important data from telnet.

What other solutions can I use in my case ?

pynexj
  • 19,215
  • 5
  • 38
  • 56

0 Answers0