"Linux Gazette...making Linux just a little more fun!"

The Answer Guy

By James T. Dennis, tag@lists.linuxgazette.net
Starshine Technical Services, http://www.starshine.org/

The original message in this thread appeared in Issue 31, and the comp.unix.questions newsgroup. This volley resulted:

From Michael Schwab on 30 Sep 1998

Hello, I just read the article about

So please don't say "WHO CARES ABOUT THAT?"

(!)I'll say what I bloody well feel like saying!
(And I expect my editors, and readership to respond as they see fit).
I'm sorry if that seems like a harsh thing to say but frankly I think you missed the whole point of what I was trying to say before.
First, I don't know of a general way to get the connect speed. It's probably modem specific, so you could probably write a script that queries your modem to get the info. Your script would probably not work with most other modems, and you'd have to hack it into whatever communications package you were actually using on that modem (pppd, uucico, minicom, kermit, slip, whatever).
Another point I made is that the speed is likely to fluctuate frequently throughout the duration of a connection (particularly with any 28.8 or faster modem). It's likely to start out a bit high and be adjusted downward until the corrected error rate attains an suitable threshold.
So, if you had your script reporting a connection speed at one instant --- it would tell you almost nothing about your sustained throughput.

(?)I do !!

(!)More power to you. I didn't ask who cares? I asked what benefit those who "think" they care hope to derive from this statistic.
I can test the temperature in my house to with an arbitrary precision. However, the numbers on a thermometer will not motivate me to reset my thermostat or go out and buy a new furnace or air conditioner. It's a meaningless statistic that is no benefit to me.
Also there isn't just one temperature in my home -- there's a whole range of fluctuating temperatures. So precise measurement would be non-trivial.
For subjective issue there's no point in going to great measurement effort. When I'm cold I either turn up the thermostat, or (more likely) toss on a sweater or some little fuzzy booties.
Now, it is the case that I might do some measurements when I'm troubleshooting a line. I'd certainly expect a telco technician to do so if I was complaining about line quality --- and I might do so to "motivate" a telco (or to file my complaint with a public utility commission).
If course if I was really serious about a line quality issue I'd rent an oscilloscope and look through a Fluke (TM) catalog to find a chart-strip recorder for the job.
So these numbers aren't completely useless in all contexts. However, the number of people who can make reasonable use of them is fairly limited.

(?)How can you tell the connection speed that a modem auto-negotiates when dialing an ISP? My system log (/var/log/messages in RH5.1) does tell me the line speed I have set in the chat script, but I would like to know the connect speed as well (56K, 33.6, etc). I know this info must be available somewhere/somehow.

(!)Modern modems don't just auto-negotiate at the beginning of a call. The "retrain" (negotiate speed changes) throughout a call's duration.
You'd "like" to know. Put what would you do with this? Order you phone company to pull new copper to your house? Return your modem and try another one? Switch to tachyon beams?
As for "this info must be available" --- look in the programming manual for your modem, if you can find one. It used to be standard for modems to come with a pretty decent technical manual --- providing details on a couple hundred AT commands that comprised that manufacturer's extensions beyond the based "Hayes" set for that particular model. These days you'll be lucky if you pry a dinky little summary of a tiny subset of their diagnostics and commands out of most of these manufacturers.

(?)I don't know how to really get the connect speed but that might be not so important. Since I have a leased line to the Internet with a modem it is important for me to know how fast my line is running because sometimes this Line might have a lot of noise on it and the connect might be only 4800 bps instead of 33600 bps. In this case I have to call my Telecommunications provider to check the line !!!

(!)If your connection varies by this much you'll know it. You won't need any numbers to tell you that it's *slow*.
If you are trying to serve your customers (web site users, whatever) over this line --- it does make sense to monitor the bandwidth and latency. However these are higher level networking issues that are only marginally related to the underlying connection speed.

(?)But its easy to detect just send a ping to the other side when the line has low traffic. I do this by sending approx 20 pings and then look at the (lowest) roundtrip time. You can send a ping containing 8192 or 16384 bytes of data and you will detect nearly every change in bandwith.

(!)Aha! Now this is a totally different metric. You aren't measuring "modem connection speed" you're measuring latency and throughput! Doing this once every two or three hours with about 5 pings and setting "watcher" to monitor those and warn you when the latency get's too high or the throughput gets too low would make sense --- for a dedicated line where you are concerned that you customers/users are waiting "too long" for their traffic.
There is a package called MRTG --- the "multi-router traffic grapher" which can be used to create web page graphs of your network traffic statistics over time. It seems to be primarily used by larger sites for ethernet. However it might have some facilities for monitoring PPP (even SLIP) lines.
Actually MRTG depends on SNMP so I should say that you might figure out how to configure the CMU SNMP agents for Linux to interface to your serial interfaces --- and then MRTG could provide the graphs. However, you don't technically need to run SNMP under MRTG --- their docs suggest that you can use various commands to provide it statistics to graph.
You can read more about MRTG at:

(?)Best Regards Michael Schwab

(?)RE how to find out the serial connect speed of a modem

From Michael Schwab on 30 Sep 1998

OK the Intention of the Mail send by me was mainly to give a short help on what might be a suitable answer on the quistion posed in Linux Gazette. Despite of this THANKS FOR YOUR VERY LONG MAIL, now it's much clearer what you were saying and why. I agree with you when you say the connect speed is unimportant because it changes anyway during the connectiontime. Sinec the guy who send the question to you said that he connects to his ISP so I suggested that might monitoring bandwith ans latency also might be more meaningfull for him than just getting the connect speed !

Anyway thanks for your Answer .....

see you soon

Michael Schwab

Copyright © 1998, James T. Dennis
Published in Linux Gazette Issue 34 November 1998

[ Answer Guy Index ] apache current digi ether goodtimes intlX largedisk
maybe numlock quota recovery script serial session
sound tape testsuite w95ie w95ras w95virus xdm

[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]