Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

mgetty doesn't respawn correctly

Posted on 1998-09-22
8
Medium Priority
?
317 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 3

Accepted Solution

by:
marcelofr earned 200 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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

636 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