Jump to content


Photo

bbInterface:Network Monitor control


  • Please log in to reply
8 replies to this topic

#1 jschall

jschall

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 06 February 2015 - 04:54 PM

I would like to display network activity in a bbInterface control.

 

When I select Caption:Network Monitor, I see a list of interfaces - All Interfaces, and interfaces 1 to 9.

 

- How can I relate the interface numbers to network devices on my PC?

 

- How can I convert the value displayed to kb/s instead of kB/sec?



#2 pitkon

pitkon

    Administrator

  • Head Administrator
  • 1,333 posts
  • LocationAthens & Nafplio, Greece

Posted 06 February 2015 - 05:31 PM

Create a label, button or whatever with bbinterface.

Let's say you create a label under a CPUFrame frame and name it NetLabel to monitor downloads.

 

!---- CPUFrame::NetLabel ----
@BBInterface Control CreateChild CPUFrame Label NetLabel
@BBInterface Control SetWindowProperty NetLabel X 6
@BBInterface Control SetWindowProperty NetLabel Y 366
@BBInterface Control SetWindowProperty NetLabel Width 64
@BBInterface Control SetWindowProperty NetLabel Height 48
@BBInterface Control SetWindowProperty NetLabel Border true
@BBInterface Control SetWindowProperty NetLabel IsVisible true
@BBInterface Control SetWindowProperty NetLabel Style "Inset"
@BBInterface Control SetControlProperty NetLabel HAlign "Left"
@BBInterface Control SetControlProperty NetLabel VAlign "Top"
@BBInterface Control SetAgent NetLabel Caption NetworkMonitor "Interface1"
@BBInterface Control SetAgentProperty NetLabel Caption MonitorType 0
@BBInterface Control SetAgent NetLabel Image AutoScaleGraph "LINECHART"
@BBInterface Control SetAgent NetLabel Image.Value NetworkMonitor "Interface1"
@BBInterface Control SetAgentProperty NetLabel Image.Value MonitorType 0
 
...and another label to monitor uploads:
 
!---- CPUFrame::NetLabel1 ----
@BBInterface Control CreateChild CPUFrame Label NetLabel1
@BBInterface Control SetWindowProperty NetLabel1 X 6
@BBInterface Control SetWindowProperty NetLabel1 Y 439
@BBInterface Control SetWindowProperty NetLabel1 Width 64
@BBInterface Control SetWindowProperty NetLabel1 Height 48
@BBInterface Control SetWindowProperty NetLabel1 Border true
@BBInterface Control SetWindowProperty NetLabel1 IsVisible true
@BBInterface Control SetWindowProperty NetLabel1 Style "Inset"
@BBInterface Control SetControlProperty NetLabel1 HAlign "Left"
@BBInterface Control SetControlProperty NetLabel1 VAlign "Top"
@BBInterface Control SetAgent NetLabel1 Caption NetworkMonitor "Interface2"
@BBInterface Control SetAgentProperty NetLabel1 Caption MonitorType 0
@BBInterface Control SetAgent NetLabel1 Image AutoScaleGraph "LINECHART"
@BBInterface Control SetAgent NetLabel1 Image.Value NetworkMonitor "Interface2"
@BBInterface Control SetAgentProperty NetLabel1 Image.Value MonitorType 0


#3 jschall

jschall

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 06 February 2015 - 10:28 PM

Pete, thanks for the reply. But, with all respect, neither of my questions have been answered yet:

 

- How can I relate the interface numbers to network devices on my PC?

 

- How can I convert the value displayed to kb/s instead of kB/sec?



#4 pitkon

pitkon

    Administrator

  • Head Administrator
  • 1,333 posts
  • LocationAthens & Nafplio, Greece

Posted 07 February 2015 - 09:03 AM

Pete, thanks for the reply. But, with all respect, neither of my questions have been answered yet:

 

- How can I relate the interface numbers to network devices on my PC?

 

- How can I convert the value displayed to kb/s instead of kB/sec?

I thought what I wrote responded to your first question.

As for the second one, can't be done, afaik.



#5 jschall

jschall

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 07 February 2015 - 04:04 PM

OK for the kB/s, Pete, thanks.

 

There are a lot of network interfaces on my PC - 2 Ethernet, WiFi, Bluetooth and ANT+, wireless mouse. Probably some I don't remember. Of course most of them have a transmit (Upload) and a receive (Download) channel.

 

In bbInterface, all that is indicated is a list of 1 to 9.

 

Is there any documentation on how bbInterface numbers the interfaces on a Windows machine?

 

I only need to meter the active Ethernet interface, so I guess some experimentation is in order.

 

Thanks again for your attention.



#6 pitkon

pitkon

    Administrator

  • Head Administrator
  • 1,333 posts
  • LocationAthens & Nafplio, Greece

Posted 07 February 2015 - 04:37 PM

Yes, trial and error should do it. No documentation, I am afraid. Mine work at 1 and 3, yours may be quite different...



#7 jschall

jschall

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 07 February 2015 - 05:23 PM

It works. I used the Ookla Speedtest at http://www.speedtest.net/ to generate repeated down/up streams. In my case, the active Ethernet was interface 2.

 

Thanks for your help, Pete.

Attached Files



#8 pitkon

pitkon

    Administrator

  • Head Administrator
  • 1,333 posts
  • LocationAthens & Nafplio, Greece

Posted 07 February 2015 - 05:44 PM

It works. I used the Ookla Speedtest at http://www.speedtest.net/ to generate repeated down/up streams. In my case, the active Ethernet was interface 2.

 

Thanks for your help, Pete.

My pleasure.

A suggestion, if I may: try to move the text to top left or right (Control Options/Text Setttngs) so the readings won't be obscured by the linechart. And, of course, you can change the font and/or the size, if you like.



#9 jschall

jschall

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 09 February 2015 - 03:39 PM

Good suggestion, Pete, thanks. I still have to figure an appropriate max range for the graph. At the moment it's 1000000 bytes/sec.

 

 

Attached Files


  • Paz likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users