Hello David!
As I do not know whether or not the first message I posted has been sent
(France is no longer connected to the rest of the world ;-( ), i post it again
as I found another feed. I hope I will be sent this time.
------------------------------------------------------------------------------
/.. On (Le) 10-24-99 20:33,
Subject (Sujet) : FrontDoor/Mailser and Re,
David Noon wrote to (ecrivait a) Francois Massonneau ../
Hi David,
Sorry for the delay, I'm just back home but for a few days only.
DN> I would use = rather than == to compare the value to zero.
DN> if files.0 = 0 then
OK, I changed that.
FM>I removed the "do forever" at the beginning and the "end" at the end of
FM>the script.
DN> This means it will terminate after one poll. Also, the conditional
DN> leave statement (mentioned above for its IF part) will need to be
DN> changed to:
DN> if files.0 = 0 then
DN> exit 0 /* was leave */
I did that, but it doesn't work as expected.
If I put "exit 0", when no more files are in the subdirectory, the
window is closed, but the windows that launched the script and the one
where the dialer is running are still opened and wait for the signal the
script must send to tell everything is done.
so I left the "leave" statement.
FM>And finally I removed those lines :
FM> call SysSleep SleepTime
FM> call stream SemaMailer, 'c', 'open write'
FM> call lineout SemaMailer, 'inetmail semafore file'
FM> call stream SemaMailer, 'c', 'close'
DN> So you are no longer using a semphore file.
It's no longer a semafore file, but the script sends a signal to HWAIT.
FM>3) At the end of the script, I saw you write two times (one before and
FM>one after the subroutine "StopDialler"), the following lines :
FM> /* Reset elapsed time counter */
FM> CALL TIME 'R'
FM>RETURN
FM>I suppose one is for the subroutine StartDialler, and the second one is
FM>for the subroutine StopDialler. Is it a code to give the time on line ?
DN> It is part of that code.
DN> There should be a TIME('E') call somewhere in the StopDialler
DN> subroutine that should display the elapsed time.
Where ?
May I put at the beginning :
CALL TIME('E')
for example, just after the "CALL DIRECTORY DialerDir" statement and
before the "ADDRESS 'CMD' KillDialer" line ?
This is the subroutine you wrote :
/* Subroutine to stop the dialer program and its related address spaces
*/
StopDialer:
PROCEDURE EXPOSE DialupLogFile DialerDir KillDialer kill inetmail pop3d
smtpd
CurDir = DIRECTORY()
CALL DIRECTORY DialerDir
ADDRESS 'CMD' KillDialer
CALL LogMsg 'dialer, if running, is killed.'
CALL LogMsg 'Dialer disconnected after ' || TIME('E') || '
seconds.'
CALL DIRECTORY CurDir
ADDRESS 'CMD' kill inetmail
CALL LogMsg 'inetmail, if running, is killed.'
ADDRESS 'CMD' kill pop3d
CALL LogMsg 'pop3d process, if running, is killed.'
ADDRESS 'CMD' kill smtpd
CALL LogMsg 'smtpd process, if running, is killed.'
CALL SysSleep 2 /* just give it a little time to shut down... */
/* Reset elapsed time counter */
CALL TIME 'R'
RETURN
FM>If so, where in the log file do I find it ??
FM>22 Oct 1999 08:32:54 Dialler disconnected after 0 seconds.
DN> Here. For some reason the elapsed timer has been reset again, giving a
DN> time of zero seconds.
FM>So the time on line is not 0 second, but about 8 minutes.
DN> That would be about 480 seconds then. That is what should have been
DN> returned by the TIME('E') call. Since there are 2 calls to StopDialler,
DN> the second one should have the correct elapsed time logged.
OK.
Is it possible to add something to the routine to give the cost of the
call. One parameter could be the cost for one minute on line
"CostperMinute", and at the end of each run, the log could record the
total time on line, and the resulting cost ?
I saw a problem with the log generated.
A file is created in my root directory, named DIALUPLOGFILE. In it I
have all the sentences that should be put in the dialup.log file, but
the sentences are the ones generated by the PingServer Procedure.
It seems that a "CALL LogMsg ..." statement contained in the PingServer
procedure is not written in the dialup.log file, but in a dialuplogfile
file in my root directory.
Is it because I have the beginning of the procedure written that way :
PingServer:
procedure
call LogMsg 'PingServer starting'
.../.
instead of :
PingServer:
PROCEDURE EXPOSE DialupLogFile
call LogMsg 'PingServer starting'
.../.
FM>4) From time to time Injoy (the dialler), gives me problems as I said
FM>Is there a way to check what's going on with the dialler,
FM>restart the BBS node ?
DN> Not a good idea. You would then need this REXX program to monitor the
DN> other REXX program. If InJoy can be monitored at all, you can do it
DN> from within the current REXX program. Does InJoy write its output to
DN> stdout, allowing it to be redirected? If so, you can use a REXX queue
I don't know. I'm gonna try to find out.
--------------------------------------------------------------------------
Bye, Francois!
Email: fmas@celtes.com
Web : http://www.worldnet.net/~island/
---
209/7211
911
* Origin: Island's BBS, a Node in the Atlantic Ocean (2:326/2)
|