Monitoring traffic over a serial link

Does anyone know of a simple way to monitor traffic on a serial (modem)
link? I would like to keep a count of the bytes transmitted/received so that
I can collect samples at a regular interval and display usage statistics
over a 24 hr or 1 week period.

I could keep count at the application level as bytes are exchaged with the
serial fd, but it would be neater and more versatile if there was some way
of doing it at a device manager/system level.

Thanks
Jim

If you are using ppp, you could look into reading from /dev/socket/pppmgr -

cat /dev/socket/pppmgr

ppp0:

Bytes Received: 58990
Bytes Sent: 57735
Packets Received: 95
Packets Sent: 79
Receive Errors: 0
Send Errors: 0

Previously, Jim Douglas wrote in qdn.public.qnxrtp.os:

Does anyone know of a simple way to monitor traffic on a serial (modem)
link? I would like to keep a count of the bytes transmitted/received so that
I can collect samples at a regular interval and display usage statistics
over a 24 hr or 1 week period.

I could keep count at the application level as bytes are exchaged with the
serial fd, but it would be neater and more versatile if there was some way
of doing it at a device manager/system level.

Thanks
Jim

\


-Jay.

Thanks but I’m just reading and writing a vanilla /dev/serx. What I would
like is the equivalent of what you have shown.

“Jay Greig” <greig@qnx.com> wrote in message
news:Voyager.020903120015.24725A@node341.ott.qnx.com

If you are using ppp, you could look into reading from
/dev/socket/pppmgr -

cat /dev/socket/pppmgr

ppp0:

Bytes Received: 58990
Bytes Sent: 57735
Packets Received: 95
Packets Sent: 79
Receive Errors: 0
Send Errors: 0

Previously, Jim Douglas wrote in qdn.public.qnxrtp.os:
Does anyone know of a simple way to monitor traffic on a serial (modem)
link? I would like to keep a count of the bytes transmitted/received so
that
I can collect samples at a regular interval and display usage statistics
over a 24 hr or 1 week period.

I could keep count at the application level as bytes are exchaged with
the
serial fd, but it would be neater and more versatile if there was some
way
of doing it at a device manager/system level.

Thanks
Jim




\

-Jay.