[Comm] Отладка mgetty
Eugene Prokopiev
=?iso-8859-1?q?prokopiev_=CE=C1_stc=2Edonpac=2Eru?=
Пт Дек 30 10:50:44 MSK 2005
Anton Gorlov пишет:
> Eugene Prokopiev пишет:
>
>>> Никакого pppd вы видеть не должны - лишь в логах mgetty должна быть
>>> видна
>>> прозвонка и waiting for CONNECT...
>>> Как сказал AG, звоните модемом! ;-)
>>
>> вопрос в том, как увидеть логи mgetty :(
>
> /var/log/mgetty
да проблема была в нечтении мана на предмет опции -x в /etc/inittab :(
>> звоню модемом.
>
>
> А чем именно звонили? Что бы запустился этот скрипт должны придти
> спакеты для ppp
ifup ppp0 c другой машины. Вот что при этом происходит на работающем
dial-in сервере:
# tail -f -n 200 /var/log/mgetty/ttyS0.log
--
12/30 10:07:59 yS0 mgetty: experimental test release 1.1.30-Dec16
12/30 10:07:59 yS0 check for lockfiles
12/30 10:07:59 yS0 locking the line
12/30 10:08:00 yS0 WARNING: DSR is off - modem turned off or bad cable?
12/30 10:08:00 yS0 lowering DTR to reset Modem
12/30 10:08:00 yS0 send: \dATQ0V1H0[0d]
12/30 10:08:01 yS0 waiting for ``OK'' ** found **
12/30 10:08:01 yS0 send: ATS0=0Q0&D3&C1[0d]
12/30 10:08:01 yS0 waiting for ``OK'' ** found **
12/30 10:08:02 yS0 waiting...
12/30 10:09:42 yS0 wfr: waiting for ``RING''
12/30 10:09:42 yS0 send: ATA[0d]
12/30 10:09:42 yS0 waiting for ``CONNECT'' ** found **
12/30 10:09:57 yS0 send:
12/30 10:09:57 yS0 waiting for ``_'' ** found **
12/30 10:10:04 ##### data dev=ttyS0, pid=4736, caller='none', conn='LAPM
COMPRESSED', name='', cmd='/usr/sbin/pppd', user='/AutoPPP/'
--
12/30 10:10:31 yS0 mgetty: experimental test release 1.1.30-Dec16
12/30 10:10:31 yS0 check for lockfiles
12/30 10:10:31 yS0 locking the line
12/30 10:10:32 yS0 WARNING: DCD line still active, check modem settings
(AT&Dx)
12/30 10:10:32 yS0 lowering DTR to reset Modem
12/30 10:10:33 yS0 send: \dATQ0V1H0[0d]
12/30 10:10:33 yS0 waiting for ``OK''
12/30 10:10:53 yS0 timeout in chat script, waiting for `OK'
12/30 10:10:53 yS0 init chat timed out, trying force-init-chat
12/30 10:10:53 yS0 send: \d[10][03]\d\d\d+++\d\d\d[0d]\dATQ0V1H0[0d]
12/30 10:10:57 yS0 waiting for ``OK'' ** found **
12/30 10:10:58 yS0 send: \dATQ0V1H0[0d]
12/30 10:10:58 yS0 waiting for ``OK'' ** found **
12/30 10:10:58 yS0 send: ATS0=0Q0&D3&C1[0d]
12/30 10:10:58 yS0 waiting for ``OK'' ** found **
12/30 10:10:59 yS0 waiting...
а вот что на неработающем:
# tail -f -n 100 /var/log/mgetty/ttyS0.log
--
12/30 19:23:22 yS0 mgetty: experimental test release 1.1.30-Dec16
12/30 19:23:22 yS0 check for lockfiles
12/30 19:23:22 yS0 checklock: stat failed, no file
12/30 19:23:22 yS0 locking the line
12/30 19:23:22 yS0 makelock(ttyS0) called
12/30 19:23:22 yS0 do_makelock: lock='/var/lock/serial/LCK..ttyS0'
12/30 19:23:22 yS0 lock made
12/30 19:23:22 yS0 tio_get_rs232_lines: status: RTS CTS DTR
12/30 19:23:22 yS0 WARNING: DSR is off - modem turned off or bad cable?
12/30 19:23:22 yS0 lowering DTR to reset Modem
12/30 19:23:23 yS0 tss: set speed to 57600 (10001)
12/30 19:23:23 yS0 tio_set_flow_control( HARD )
12/30 19:23:23 yS0 waiting for line to clear (VTIME), read:
12/30 19:23:23 yS0 send: \dATQ0V1H0[0d]
12/30 19:23:24 yS0 waiting for ``OK''
12/30 19:23:24 yS0 got: ATQ0V1H0[0d]
12/30 19:23:24 yS0 CND: ATQ0V1H0[0d][0a]OK ** found **
12/30 19:23:24 yS0 send: ATS0=0Q0&D3&C1[0d]
12/30 19:23:24 yS0 waiting for ``OK''
12/30 19:23:24 yS0 got: [0d]
12/30 19:23:24 yS0 CND: OK[0a]ATS0=0Q0&D3&C1[0d]
12/30 19:23:24 yS0 CND: ATS0=0Q0&D3&C1[0d][0a]OK ** found **
12/30 19:23:24 yS0 waiting for line to clear (VTIME), read: [0d][0a]
12/30 19:23:24 yS0 removing lock file
12/30 19:23:24 yS0 waiting...
12/30 19:28:42 yS0 select returned 1
12/30 19:28:42 yS0 checking lockfiles, locking the line
12/30 19:28:42 yS0 makelock(ttyS0) called
12/30 19:28:42 yS0 do_makelock: lock='/var/lock/serial/LCK..ttyS0'
12/30 19:28:42 yS0 lock made
12/30 19:28:42 yS0 wfr: waiting for ``RING''
12/30 19:28:42 yS0 got: [0d][0a]RING[0d]
12/30 19:28:42 yS0 CND: RING
12/30 19:28:42 yS0 wfr: rc=0, drn=0
12/30 19:28:42 yS0 CND: check no: 'none'
12/30 19:28:42 yS0 send: ATA[0d]
12/30 19:28:42 yS0 waiting for ``CONNECT''
12/30 19:28:42 yS0 got: ATA[0d]
12/30 19:28:42 yS0 CND: OKATA[0d][0a]NO CARRIER
12/30 19:29:45 yS0 found action string: ``NO CARRIER''
12/30 19:29:45 ##### failed A_FAIL dev=ttyS0, pid=1308, caller='none',
conn='', name=''
12/30 19:29:45 yS0 removing lock file
--
12/30 19:29:45 yS0 mgetty: experimental test release 1.1.30-Dec16
12/30 19:29:45 yS0 check for lockfiles
12/30 19:29:45 yS0 checklock: stat failed, no file
12/30 19:29:45 yS0 locking the line
12/30 19:29:45 yS0 makelock(ttyS0) called
12/30 19:29:45 yS0 do_makelock: lock='/var/lock/serial/LCK..ttyS0'
12/30 19:29:45 yS0 lock made
12/30 19:29:46 yS0 tio_get_rs232_lines: status: RTS CTS DTR
12/30 19:29:46 yS0 WARNING: DSR is off - modem turned off or bad cable?
12/30 19:29:46 yS0 lowering DTR to reset Modem
12/30 19:29:46 yS0 tss: set speed to 57600 (10001)
12/30 19:29:46 yS0 tio_set_flow_control( HARD )
12/30 19:29:46 yS0 waiting for line to clear (VTIME), read:
12/30 19:29:46 yS0 send: \dATQ0V1H0[0d]
12/30 19:29:47 yS0 waiting for ``OK''
12/30 19:29:47 yS0 got: ATQ0V1H0[0d]
12/30 19:29:47 yS0 CND: ATQ0V1H0[0d][0a]OK ** found **
12/30 19:29:47 yS0 send: ATS0=0Q0&D3&C1[0d]
12/30 19:29:47 yS0 waiting for ``OK''
12/30 19:29:47 yS0 got: [0d]
12/30 19:29:47 yS0 CND: OK[0a]ATS0=0Q0&D3&C1[0d]
12/30 19:29:47 yS0 CND: ATS0=0Q0&D3&C1[0d][0a]OK ** found **
12/30 19:29:47 yS0 waiting for line to clear (VTIME), read: [0d][0a]
12/30 19:29:48 yS0 removing lock file
12/30 19:29:48 yS0 waiting...
Конфиги на серверах идентичны (ну разве что уровень отладки на
неработающем больше). Модемы одинаковы - MT2834L, переключатели на них
также выставлены одинаково.
На всякий случай еще раз:
# cat /etc/mgetty+sendfax/dialin.config
# cat /etc/mgetty+sendfax/login.config
/AutoPPP/ - - /usr/sbin/pppd auth -chap +pap login debug
* - - /bin/login @
# cat /etc/mgetty+sendfax/mgetty.config
debug 9
speed 57600
port ttyS0
debug 9
data-only y
speed 57600
В чем мсжет быть проблема?
--
С уважением, Прокопьев Евгений
Подробная информация о списке рассылки community