Solved

mgetty doesn't respawn correctly

Posted on 1998-09-22
8
302 Views
Last Modified: 2010-03-18
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
Comment
Question by:mag062397
  • 4
  • 4
8 Comments
 
LVL 3

Accepted Solution

by:
marcelofr earned 50 total points
ID: 1586924
Add "-x 9" and look for debugging at /var/log/log_mg.ttyS2
0
 

Author Comment

by:mag062397
ID: 1586925
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
 
LVL 3

Expert Comment

by:marcelofr
ID: 1586926
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:mag062397
ID: 1586927
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
 
LVL 3

Expert Comment

by:marcelofr
ID: 1586928
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
 

Author Comment

by:mag062397
ID: 1586929
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
 
LVL 3

Expert Comment

by:marcelofr
ID: 1586930
what's your modem? If it were a usrobotics, load factory defaults 1 (at&f1) and you're done.
0
 

Author Comment

by:mag062397
ID: 1586931
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question