Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-06

How to getting network bandwidth in linux

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

dayat

Hi all,

My plan, the system will to monitor the network devices in linux, such bandwidth, how many active connections, etc, like sockmon or iptables.

I want to know, can freepascal doing this. What the Linux APIs to call from freepascal. Or can freepascal call the iptables API. I'm confused, because many code for this task writen in C/C++.

Many thanks for helping me.

Hidayat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090612/491472b2/attachment.html>

Reply by email

Henry Vermaak
to dayat

2009/6/12 dayat :

Show quoted text 8 lines
Hi all, My plan, the system will to monitor the network devices in linux, such bandwidth, how many active connections, etc, like sockmon or iptables. I want to know, can freepascal doing this. What the Linux APIs to call from freepascal. Or can freepascal call the iptables API. I'm confused, because many code for this task writen in C/C++.

freepascal can do anything c can do, so looking at the c source of the programs should give you an idea of what to do.

i'm not a networking expert, but it looks like the files in /proc/net will help. e.g. /proc/net/dev contains basic transmit/receive information for my network interfaces. presumably you'll have to read the kernel docs to get more information on these files.

henry

Reply by email

dayat
to Henry Vermaak

Thank you Henry, this information is very useful. Currently I'm exploring the /proc/net.
Best regards,
Hidayat

Henry Vermaak wrote 24 lines
2009/6/12 dayat : > Hi all, > > My plan, the system will to monitor the network devices in linux, such > bandwidth, how many active connections, etc, like sockmon or iptables. > > I want to know, can freepascal doing this. What the Linux APIs to call from > freepascal. Or can freepascal call the iptables API. I'm confused, because > many code for this task writen in C/C++. freepascal can do anything c can do, so looking at the c source of the programs should give you an idea of what to do. i'm not a networking expert, but it looks like the files in /proc/net will help. e.g. /proc/net/dev contains basic transmit/receive information for my network interfaces. presumably you'll have to read the kernel docs to get more information on these files. henry --

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090720/d94489d3/attachment.html>

Reply by email