You'll need to come up with some sort of script to watch the output
from other programs.  If you need to track specific ports, then
(assuming you are using Linux), you'll need to setup some sort of
iptables rule to help count packets and bytes.  If you want to watch,
say, port 1234, then a rule like this should work:

  iptables -A INPUT -m multiport -p udp --port 1234 -j ACCEPT
  iptables -A OUTPUT -m multiport -p udp --port 1234 -j ACCEPT

Obviously, adjust to taste and proper location within your firewall.
Note that you need two rules to distinguish between inbound and
outbound traffic.

Then write a script to call 'iptables -L -n -v -x' periodically, and
check the pckts/bytes values for that rule, and send them along to
Ganglia.


On Tue, Dec 9, 2008 at 10:18, aurbain <[EMAIL PROTECTED]> wrote:
> bytes and packets, yes.
> A specific port, yes.
> Thanks in advance.
>
> Jesse Becker wrote:
>>
>> On Fri, Dec 5, 2008 at 16:39, aurbain <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> Can someone post a nice script with gmetric call?
>>
>> Bytes?  Packets?  Only traffic on certain ports?
>>
>>
>



-- 
Jesse Becker
GPG Fingerprint -- BD00 7AA4 4483 AFCC 82D0  2720 0083 0931 9A2B 06A2

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Ganglia-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-general

Reply via email to