Koozali.org: home of the SME Server

Controlling Connection Times

Graham

Controlling Connection Times
« on: September 02, 2003, 02:37:03 PM »
Hi !

Could anyone advise on controlling the connection times in 5.6 ?

I am using an ISDNT TA and have noticed that even after logging
off all the PC's, one channel of ISDN stays active for about 15mins.

I have in the server setup short connection times for all categories.

If it could be limited to 3 mins that would be great !

Many Thanks

Graham

Peter

Re: Controlling Connection Times
« Reply #1 on: September 02, 2003, 06:49:51 PM »
I would be interested in this too. Recently I've found the SME server has been dialed up for up to 6 hours at a time (3 x 7200 mins) in the evening when no-one is using the network. The start times are always on the hour?

Is there anything in the logs that could tell me the IP address of a machine that might be left on in the evening and doing things under it's own control (gulp).

Thanks

Dave Liquorice

Re: Controlling Connection Times
« Reply #2 on: September 02, 2003, 09:08:08 PM »
Pretty sure that the duration of connection times is controllable via the text based admin program. Login to the server as user "admin" with the same password as "root" and choose "Configure this server".  Take the defaults until you get to the Connection times pages. It doesn't tell you the actual duration but uses textual descriptors like short, medium or long.

Cheers
Dave.

Warren Blackbeard

Re: Controlling Connection Times
« Reply #3 on: September 02, 2003, 11:12:36 PM »
Have a look at the dialmon tool  - Commercial
http://dungog.net/sme/files/dialuptools/dialmon-0.8-1.i386.rpm

This gives you more control over the connection and the $20-00 is cheaper than a run away ISDN connection over same a weekend ?

Cheers

Warren

Graham

Re: Controlling Connection Times
« Reply #4 on: September 03, 2003, 11:51:33 AM »
Thanks

I was hoping to be able to edit a file wehre I could specify
in seconds the maximum connection time after last request
for data.

I will scoure forum to see if i can find anything else on this.

Graham

Graham

Re: Controlling Connection Times
« Reply #5 on: September 03, 2003, 12:10:56 PM »
Warren

Just looked at the dialmon tool and it was uder GPL download ?

How come you say this is commercial ?

Tnx

Graham

Ray Mitchell

Re: Controlling Connection Times
« Reply #6 on: September 03, 2003, 12:54:07 PM »
Do a search on diald.filter, it may help you.
It talks about creating custom templates for 20office 40outside 60weekend

Regs
Ray

Warren Blackbeard

Re: Controlling Connection Times
« Reply #7 on: September 03, 2003, 10:38:03 PM »
Hi Graham ,

Sorry , there is also a ISP connection tool  ( this is Commercial )http://dungog.net/sme/help/index.html?page=smehelp/dialup%20tools.html

Rgds

Warren

Graham

Re: Controlling Connection Times
« Reply #8 on: September 04, 2003, 05:20:02 PM »
OK Thanks for all the help. I checked out /var/log/diald/accounting.log

What puzzles me is that some of the reported connection are just a
few bytes of data yet the call lasts over 180 seconds.

In addition they are at times outside of the 8-10-12-2-4-6 mail collection
points.

I have a time server setup in the NTP time section and I am not sure
how ofen that syncs nor wether it can freely connect. I will check the rest
of /var/log/messages after reading this.

My /etc/e-smith/templates/etc/diald.filter/20office is the stock one
supplied. (http TX gets 3 minutes, all other 30 secs)

I have tried matching my web activity, for instance when viewing this
site and its fairly obvious more data is being transmitted.

I also read on the thread above this one that MSN can cause a problem
so will remove all instances of it on all the workstations.

Many thanks for any advice offered !

Ray Mitchell

Re: Controlling Connection Times
« Reply #9 on: September 05, 2003, 12:47:22 PM »
> I have a time server setup in the NTP time section and I am
> not sure how ofen that syncs nor wether it can freely connect.

I'm on a modem dial up service, and I found with the sme ntp enabled, the time service was synced every time a new modem connection was made. ntp did not sync unless a new modem connection was established.

> In addition they are at times outside of the 8-10-12-2-4-6
> mail collection points.

Any activity on your network that requests Internet access or send/receives mail will cause the server to dial up your ISP and the settings in the diald filters templates control the default connection times ( ie the time the modem stays connected after activity has stopped on your network). Also controlled by the short, medium or long settings you choose when you run the server configuration.

> What puzzles me is that some of the reported connection are
> just a few bytes of data yet the call lasts over 180 seconds.
> My /etc/e-smith/templates/etc/diald.filter/20office is the
> stock one supplied. (http TX gets 3 minutes, all other 30 secs)

That equals 3 minutes which appears to be the setting value you chose.

> I will check the rest of /var/log/messages after reading this.

If you look in some of the logs you can see which workstation by IP is requesting the access. I think it is visible in /var/log/messages or one of the http access logs.

Regs
Ray

Graham

Re: Controlling Connection Times
« Reply #10 on: September 05, 2003, 08:09:40 PM »
Sorry Ray, I didnt explain that very well.

What I meant was, from the logs, there would be a call
lasting 15 minutes and yet during that time only 0.9kb
of data was received. Most HTML emails these days
are larger than that even for a short message. That
small amouint of data wouold be received in very much
less than 15 minutes. I was really trying to figure out
why the link was styaing up yet no process appeared
to be asking for data ?

Ray Mitchell

Re: Controlling Connection Times
« Reply #11 on: September 06, 2003, 09:42:53 AM »
Graham

> What I meant was, from the logs, there would be a call
> lasting 15 minutes and yet during that time only 0.9kb
> of data was received.
> I was really trying to figure out why the link was
> styaing up yet no process appeared to be asking for data ?

As I understand it, that's what sme is designed to do. It's a connect on demand system, and after the connection is established it remains connected if the system remains busy and receives constant or regular requests from users.
When users stop requesting access, then the system will timeout and eventually disconnect. The default connection time when idle is determined by the short. medium or long setting you choose when you configure the server. These values are listed in the diald filters templates and can be changed if you wish by creating custom templates. The manual tells you how many minutes each setting will remain connected for.

Does that make sense ?
Regards
Ray

Graham

Re: Controlling Connection Times
« Reply #12 on: September 06, 2003, 12:33:58 PM »
0.9kb isnt busy though is it ?

Not sure if you got my point Ray.

There are lots of log entries where there is hardly any IP traffic (just a few kb) and yet the total call duration is 15, 20 sometimes 25 mins.

As a side issue - I found this post about QMail making a connection as soon as mail appears in the spool.

I am going to apply this mod (unless anyone knows any different or advises
aainst it ?)

Thanks for the feedback.

=============================================

The following contrib from Brandon Friedman will do this. I'm running on a
5.6u4 server but it _should_ work on 6.0.

http://bfconsult.co.za/downloads/mitel/mitel-qmailconcurrencyremote/

Heres the details on what it does

http://www.mail-archive.com/devinfo@lists.e-smith.org/msg09364.html

Regards
Wayne

================================================

Place the value '0' (the digit zero) in

/var/qmail/control/concurrencyremote

Restart qmail

To start mail delivery, put a larger value in there and
restart qmail.

Warning: that file is templated and may be regenerated by
manager actions. You should override with a custom template.

Gordon

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Author: Brandon Friedman
Contributor:David Fourie
Release supported:  SME 5.x
Last updated: May 28, 2002

Description - By default SME server sends all outbound messages immediately!
For some dial-up users this can become costly. The rpm updates the qmail settings, to queue all outbound mail until the next internet dial-up session.

Instructions:
READ the GPL.txt file!
Download rpm from /RPMS/noarch/:
mitel-qmailconcurrencyremote-1.0-1.noarch.rpm

Install the rpm:
rpm -ivh mitel-qmailconcurrencyremote-1.0-01.noarch.rpm

That's it!
Now to test.... disconnect from the internet and send an e-mail to an external address

The modem shouldn't dial-up and the mail is queued on the server.
Now connect to the internet, and the mail will be sent!

Ray Mitchell

Re: Controlling Connection Times
« Reply #13 on: September 06, 2003, 01:14:12 PM »
> 0.9kb isnt busy though is it ?
> Not sure if you got my point Ray.
>
> There are lots of log entries where there is hardly any IP
> traffic (just a few kb) and yet the total call duration is
> 15, 20 sometimes 25 mins.

I don't think you are getting my point.
I agree 0.9Kb is not busy, but that's exactly my point.
It is NOT the amount of data, it is the the fact that SOMETHING was sent, which then triggers sme to stay connected for (say) 15 minutes, depending whether you have selected short, medium or long.

To quote from the handbook:
Configuring the server
The connection policy defines several choices including Short, Medium or Long. These specify how long the server should wait before disconnecting the dialup connection. If your office only shares a single phone line, the Short option minimizes the amount of connection time and frees up the phone line for later use. The down side to this is that if someone is reading a long page on the web site or steps away from their computer for a brief moment, when they want to then go to another web page, the server will probably have disconnected and will need to redial and connect. On the other hand, setting the Long connection time will result in users experiencing fewer delays while waiting for the server to reconnect. However, the phone line will be used for a larger amount of time.

There are two separate timeout values configured by each choice. One value is the length of time since the last HTTP (web) packet went through the server. The other is a more general timeout for any other types of packets. The difference exists because it is assumed that people reading a web page may take longer to go on to another web page, whereas users connecting to another service (such as ssh or POP3 to an external server) probably will be more active than someone using a web browser. The timeout values are shown in the table below.

Choice  HTTP Timeout  Other Timeout  
Short  3 minutes  30 seconds  
Medium  10 minutes  5 minutes  
Long  20 minutes  10 minutes  

Note that there is also the option for a Continuous dial-up connection. Choosing this option is basically equivalent to creating a permanent or dedicated connection, but only doing so through the use of a dial-up connection and a modem or ISDN adapter. One example of this use might be to set a Continuous connection policy during work hours and then some variable policy during off-hours and the weekend. Assuming that your ISP is okay with this arrangement and you can afford to do so financially, these settings would give your users the fastest response time as the connection would always be online.

Regards
Ray

Graham

Re: Controlling Connection Times
« Reply #14 on: September 06, 2003, 06:34:23 PM »
Ray,

Firstly thanks for persisiting in replies :)

I knew thats what you meant.

However there are a lot of entries very similar to this so, for example, on one of the 25 minute connections there would have to be at least 8 requests triggering each 3 minute connection durations to keep the link up. For just a few bytes of data that doesnt seem to make any sense to me ?

Anyways, I need to address the Qmail sending issue in the meantime and will take another look at the logs when I get back in.

Thanks for help / suggestions.

Graham