Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

mgetty doesn't respawn correctly

I'm using mgetty version 1.1.17-Aug07 on Redhat 5.1. (kernel 2.0.35) and I'm having trouble with mgetty answering the phone.

I have the following line in my /etc/inittab file:
S2:2345:respawn:/usr/local/sbin/mgetty -D ttyS2

And it answers fine for awhile and then just doesn't answer anymore until I reboot.  Example: I can call it right off the bat from a clean boot and hang up and then call back just fine.  However when I try back later that day (or night) it doesn't answer the phone.  

It still appears in the process table, but it doesn't answer the phone.

Where should I look for trying to trace this problem?  Log files?

Thanks in advance.
0
mag062397
Asked:
mag062397
  • 4
  • 4
1 Solution
 
marcelofrCommented:
Add "-x 9" and look for debugging at /var/log/log_mg.ttyS2
0
 
mag062397Author Commented:
The -x 9 definitly gives more details.

I have also narrowed down the problem to this:  mgetty doesn't
reset itself correctly if it receives a voice call (a hang up
from a wrong number).  With the -x 9 option it just keep on logging to my /var/log/mgetty.ttyS2 log file until I killed the
process.  The log grow to about 500KB in a matter of just several
seconds.  It kept logging stuff like [98]f[98]...

It started with at getlogname (no opts), read:[06][fe]x[fd][98]... and so on and so on until I killed it.

Is there any way to get mgetty to timeout and RESET itself?
0
 
marcelofrCommented:
AFAIK you can't change it without recompiling (I have to look at the last sources... YES SOURCES...) RH versions always used 240 secs timeout to log in and then reset (put a dumb terminal and leave the login there... you'll see a warning and afterwards a reset with a messages...) Any way I see it's too long for you...
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
mag062397Author Commented:
My version isn't even timing out after 24 hours.  It never times out once it goes into this state.  Once it logs getlogname (for a wrong number) it just hangs until I kill it.

Currently I did this (but I don't like it)... I created a simple cron job that wakes up every hour and checks to see if the modem is locked if it is it then checks to see if anyone is logged in using ttyS2 if not it waits 60 seconds and checks again (in case someone was in the process of logging in) if still noone is using ttyS2, the cron job then kills mgetty (which init then respawns correctly).
0
 
marcelofrCommented:
I think you must re-check your modem setup... mgetty doesn't hang up if it keeps getting characters from the modem, but where do this garbage come from? I think that your modem is echoing back the garbage to mgetty... have a look at the log and doble check your modem initialisation. Use init-chat if you need to...
0
 
mag062397Author Commented:
Hmm.... that's sounds like a good guess.  The modem hangs up the line; however your right it does keep sending garbage or at least the mgetty keeps logging it.  Can you think of any setting that would cause the modem to keep sending stuff even after hanging up the line?  I'll look into the current settings and I'll also get out the manual.
0
 
marcelofrCommented:
what's your modem? If it were a usrobotics, load factory defaults 1 (at&f1) and you're done.
0
 
mag062397Author Commented:
My modem is an MCT (basicly a no name brand).  I'll RTFM.
I think you have given me enough insight to track it down--Thanks!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now