Solved

mgetty doesn't respawn correctly

Posted on 1998-09-22
8
268 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
 

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now