Re: Waiting for modem to come free

Christo Labuschagne <[email protected]>
Newsgroups gmane.comp.telephony.fax.hylafax.user
Message-ID <E9504166C8F77C4B8CCA70C6215A3487011578DC387A@ntq-ex.nanoteq.co.za>
Hi Lee

Here follows the feedback after running your commands.  Attached also the logs of the prints in question.  Seems like it only happens on printing.  It should be noted that I create my own sendq file and call it using faxsend and not sendfax.  From the logs I see it gets stuck at atd command.  With the setup we have, it blind dials, and we only go off hook when the modem state is correct (not waiting for modem).  This works more than 95% of the time.  From the time stamps it does seem like it is actually not in a waiting for modem state, as it did the atd, but is now not training because we are still on hook, waiting for the correct hylafax state.

Mon Dec 21 11:56:24 UTC 2015

> ps | grep $(cat /var/lock/LCK..ttyS1 | tr -d '[[:space:]]') | head -n1
 4510 root      6320 S    faxsend -l -m ttyS1 /var/spool/hylafax/sendq/q34

> lsof | grep ttyS1
4510    /usr/sbin/faxsend       /var/spool/hylafax/status/ttyS1
4510    /usr/sbin/faxsend       /dev/ttyS1
25743   /usr/sbin/faxgetty      /var/spool/hylafax/status/ttyS1
25743   /usr/sbin/faxgetty      /var/spool/hylafax/FIFO.ttyS1
25743   /usr/sbin/faxgetty      /var/spool/hylafax/FIFO.ttyS1

> cat /var/lock/LCK..ttyS1
      4510

> ps | grep fax
  153 uucp      6240 S    /usr/sbin/faxq
  164 uucp      5888 S    /usr/sbin/hfaxd -i hylafax
 4509 root      3068 S    sh -c cd /var/spool/hylafax/; faxsend -l -m ttyS1 /v
 4510 root      6320 S    faxsend -l -m ttyS1 /var/spool/hylafax/sendq/q34
 5013 root      3072 S    grep fax
25743 uucp      6356 S    /usr/sbin/faxgetty ttyS1
25747 root      3068 S    /bin/sh -c faxwatch "R<ttyS1>*" > /tmp/ntq_faxwatch_
25749 root      5676 S    faxwatch R<ttyS1>*
25751 uucp      5896 S    /usr/sbin/hfaxd -i hylafax


Mon Dec 21 12:18:14 UTC 2015

> ps | grep $(cat /var/lock/LCK..ttyS1 | tr -d '[[:space:]]') | head -n1
10854 root      6320 S    faxsend -l -m ttyS1 /var/spool/hylafax/sendq/q42

> lsof | grep ttyS1
5029    /usr/sbin/faxgetty      /var/spool/hylafax/status/ttyS1
5029    /usr/sbin/faxgetty      /var/spool/hylafax/FIFO.ttyS1
5029    /usr/sbin/faxgetty      /var/spool/hylafax/FIFO.ttyS1
10854   /usr/sbin/faxsend       /var/spool/hylafax/status/ttyS1
10854   /usr/sbin/faxsend       /dev/ttyS1

> cat /var/lock/LCK..ttyS1
     10854

> ps | grep fax
  153 uucp      6240 S    /usr/sbin/faxq
  164 uucp      5888 S    /usr/sbin/hfaxd -i hylafax
 5029 uucp      6356 S    /usr/sbin/faxgetty ttyS1
10853 root      3068 S    sh -c cd /var/spool/hylafax/; faxsend -l -m ttyS1 /v
10854 root      6320 S    faxsend -l -m ttyS1 /var/spool/hylafax/sendq/q42
11366 root      3072 S    grep fax
25747 root      3068 S    /bin/sh -c faxwatch "R<ttyS1>*" > /tmp/ntq_faxwatch_
25749 root      5676 S    faxwatch R<ttyS1>*
25751 uucp      5896 S    /usr/sbin/hfaxd -i hylafax


-----Original Message-----
From: Lee Howard [mailto:[email protected]]
Sent: 08 December 2015 09:45 PM
To: Christo Labuschagne
Cc: [email protected]
Subject: Re: [hylafax-users] Waiting for modem to come free

What were the results of the commands that I suggested?

Thanks,

Lee.


On 12/08/2015 08:58 AM, Christo Labuschagne wrote:
> Good day Lee
>
> Thank you for the feedback, but unfortunately there was no lock file when I struck the issue.  Any other idea's I can look for?
>
> Kind regards
> Christo
>
> -----Original Message-----
> From: Lee Howard [mailto:[email protected]]
> Sent: 08 December 2015 12:18 AM
> To: Christo Labuschagne
> Cc: [email protected]
> Subject: Re: [hylafax-users] Waiting for modem to come free
>
> On 12/06/2015 09:11 PM, Christo Labuschagne wrote:
>> Good day
>>
>> I?ve tried to find something on the internet about this, but there
>> was not much about it. What causes Hylafax+ 5.5.6 to go into the
>> state ?Waiting for modem to come free?? I have implemented code that
>> hard reboots the device and restarts the faxgetty service when I
>> detect it, but it does not always come up again. This feels like a
>> band aid though. How do I go about finding the cause of the problem?
>> I did read that I should use the wedging application/script, but again, a band aid.
>>
>> I?m using a Davicom modem on an embedded linux os.
>>
> "Waiting for modem to come free" means that a process (usually faxgetty but also possibly faxsend) is wanting to access the modem, but that it sees a lock-file (from some other process) and is waiting for the lock-file to disappear.
>
> HylaFAX does check the lock-file to see if the process is still running.
> It should clear the lock-file if the process is not alive.
>
> So, to troubleshoot it when this happens you need to see what processes are using the modem device, what process is listed in the lock-file, and see which HylaFAX processes are running.
>
> So, these commands may help:
>
> lsof | grep /dev/ttyS3 (where /dev/ttyS3 is your modem device) cat
> /var/lock/lck..ttyS3 ps aux | grep fax
>
> Thanks,
>
> Lee.
>
>
>
> Important Notice:
>
> This e-mail and its contents are subject to the Nanoteq (Pty) Ltd e-mail legal notice available at:
> http://www.nanoteq.com/AboutUs/EmailDisclaimer.aspx
>
>
>
>
>
>




Important Notice:

This e-mail and its contents are subject to the Nanoteq (Pty) Ltd e-mail legal notice available at:
http://www.nanoteq.com/AboutUs/EmailDisclaimer.aspx
c000000034 (application/octet-stream, 515 B) - not displayed
c000000042 (application/octet-stream, 515 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.