Mark: Thanks for the info & screen shot.
Actually, it does seem the code is odd... in traffic.c, around 210:
el->actualRcvdThpt =
(float)(el->bytesRcvd-el->lastBytesRcvd)/timeDiff;
if(el->peakRcvdThpt < el->actualRcvdThpt)
el->peakRcvdThpt = el->actualRcvdThpt;
if(el->peakSentThpt < el->actualSentThpt)
el->peakSentThpt = el->actualSentThpt;
el->actualSentThpt =
(float)(el->bytesSent-el->lastBytesSent)/timeDiff;
el->lastBytesSent = el->bytesSent;
el->lastBytesRcvd = el->bytesRcvd;
/* ******************************** */
el->actualRcvdPktThpt =
(float)(el->pktRcvd-el->lastPktRcvd)/timeDiff;
if(el->peakRcvdPktThpt < el->actualRcvdPktThpt)
el->peakRcvdPktThpt = el->actualRcvdPktThpt;
if(el->peakSentPktThpt < el->actualSentPktThpt)
el->peakSentPktThpt = el->actualSentPktThpt;
el->actualSentPktThpt =
(float)(el->pktSent-el->lastPktSent)/timeDiff;
el->lastPktSent = el->pktSent;
el->lastPktRcvd = el->pktRcvd;
s/b
el->actualRcvdThpt =
(float)(el->bytesRcvd-el->lastBytesRcvd)/timeDiff;
if(el->peakRcvdThpt < el->actualRcvdThpt)
el->peakRcvdThpt = el->actualRcvdThpt;
el->actualSentThpt =
(float)(el->bytesSent-el->lastBytesSent)/timeDiff;
if(el->peakSentThpt < el->actualSentThpt)
el->peakSentThpt = el->actualSentThpt;
el->lastBytesSent = el->bytesSent;
el->lastBytesRcvd = el->bytesRcvd;
/* ******************************** */
el->actualRcvdPktThpt =
(float)(el->pktRcvd-el->lastPktRcvd)/timeDiff;
if(el->peakRcvdPktThpt < el->actualRcvdPktThpt)
el->peakRcvdPktThpt = el->actualRcvdPktThpt;
el->actualSentPktThpt =
(float)(el->pktSent-el->lastPktSent)/timeDiff;
if(el->peakSentPktThpt < el->actualSentPktThpt)
el->peakSentPktThpt = el->actualSentPktThpt;
el->lastPktSent = el->pktSent;
el->lastPktRcvd = el->pktRcvd;
As written, peak is current, sent lags... odd. Can you try it and let me
know... if that's the fix, I'll send the patch to Luca...
-----Burton
-----Original Message-----
From: Mark Rowlands [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 02, 2002 11:10 AM
To: [EMAIL PROTECTED]; Burton M. Strauss III
Subject: Re: [Ntop] odd statistics
On Saturday 02 February 2002 3:10 pm, Burton M. Strauss III wrote:
> Not on my system... see attached graphic (sorry about the size)
>
> What is possible is that there is a time lag - the "actual" measurement
may
> not yet be reflected in the counts for average and peak. I haven't really
> dug into the code in that area...
Absolutely correct, after waiting for a while, it does indeed start to make
sense......
> Can you grab a screenshot and send it to me showing the reversal?
>
> Thanks!
> -----Burton
>
> -----Original Message-----
> From: Mark Rowlands [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 02, 2002 6:43 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Ntop] odd statistics
>
> On Friday 01 February 2002 6:26 pm, Mark Rowlands wrote:
> > is it possible that the titles for the columns Avg Thpt and peak Thpt
on
> > the network traffic data sent and network traffic data received pages
>
> are
>
> > reversed ?
> >
> > Because in my ntop, the average tput columns are consistenltl
>
> significantly
>
> > higher than the peak !
>
> having noticed a plea from Burton for more relevant information to be
> included in questions.........
>
> system info
>
> FreeBSD 4.5-STABLE #0: Mon Jan 28 22:17:35 CET 2002
> Calibrating clock(s) ... TSC clock: 350789201 Hz, i8254 clock: 1193161 Hz
> CLK_USE_I8254_CALIBRATION not specified - using default frequency
> Timecounter "i8254" frequency 1193182 Hz
> CLK_USE_TSC_CALIBRATION not specified - using old calibration method
> CPU: Pentium II (350.80-MHz 686-class CPU)
> Origin = "GenuineIntel" Id = 0x651 Stepping = 1
>
Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV
>, PAT,PSE36,MMX,FXSR>
> real memory = 402587648 (393152K bytes)
> avail memory = 388444160 (379340K bytes)
> bios32: Found BIOS32 Service Directory header at 0xc00fdb60
> bios32: Entry = 0xfdb70 (c00fdb70) Rev = 0 Len = 1
> pcibios: PCI BIOS entry at 0xdb91
> pnpbios: Found PnP BIOS data at 0xc00f6ef0
> pnpbios: Entry = f0000:697e Rev = 1.0
> Other BIOS signatures found:
> ACPI: 000fa9c0
> npx0: <math processor> on motherboard
> npx0: INT 16 interface
> pcib0: <Intel 82443BX (440 BX) host to PCI bridge> on motherboard
> pci0: <PCI bus> on pcib0
> pcib1: <Intel 82443BX (440 BX) PCI-PCI (AGP) bridge> at device 1.0 on pci0
> pci1: <Matrox MGA G400 AGP graphics accelerator> (vendor=0x102b,
> dev=0x0525) at 0.0 irq 9
> isab0: <Intel 82371AB PCI to ISA bridge> at device 7.0 on pci0
> isa0: <ISA bus> on isab0
> atapci0: <Intel PIIX4 ATA33 controller> port 0xffa0-0xffaf at device 7.1
on
> pci0ata0: iobase=0x01f0 altiobase=0x03f6 bmaddr=0xffa0
> pci0: <Intel 82371AB/EB (PIIX4) USB controller> (vendor=0x8086,
dev=0x7112)
> at 7.2 irq 0
> intpm0: <Intel 82371AB Power management controller> port 0x440-0x44f irq 9
> at
> device 7.3 on pci0
> intpm0: I/O mapped 440
> intpm0: intr IRQ 9 enabled revision 0
> smbus0: <System Management Bus> on intsmb0
> smb0: <SMBus general purpose I/O> on smbus0
> intpm0: PM I/O mapped 400
> xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xde00-0xde7f mem
> 0xefff7f80-0xefff7fff irq 9 at device 14.0 on pci0
> using shared irq9.
> xl0: Ethernet address: 00:10:4b:b6:f1:7b
> xl0: media options word: a
> xl0: found MII/AUTO
> miibus0: <MII bus> on xl0
> xlphy0: <3Com internal media interface> on miibus0
> xlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
> bpf: xl0 attached
> pcib2: <PCI to PCI bridge (vendor=8086 device=0960)> at device 16.0 on
pci0
> pci2: <PCI bus> on pcib2
> mlx0: <Mylex version 4 RAID interface> mem 0xec000000-0xedffffff irq 10 at
> device 16.1 on pci0
> mlx0: DAC960PTL1, 1 channel, firmware 4.08-0-33, 32MB RAM
> mlx0: Hardware ID 0x03020116
> mlx0: Firmware ID 0x30210804
> mlx0: Configured/Actual channels 1/1
> mlx0: Max Targets 16
> mlx0: Max Tags 252
> mlx0: Max System Drives 32
> mlx0: Max Arms 8
> mlx0: Max Spans 4
> mlx0: DRAM/cache/flash/NVRAM size 33554432/31801344/524288/32768
> mlx0: DRAM type 17
> mlx0: Clock Speed 40ns
> mlx0: Hardware Speed 360ns
> mlx0: Max Commands 124
> mlx0: Max SG Entries 33
> mlx0: Max DP 504
> mlx0: Max IOD 1024
> mlx0: Max Comb 256
> mlx0: Latency 12s
> mlx0: SCSI Timeout 6s
> mlx0: Min Free Lines 72
> mlx0: Rate Constant 50
> mlx0: MAXBLK 128
> mlx0: Blocking Factor 1 sectors
> mlx0: Cache Line Size 16 blocks
> mlx0: SCSI Capability 40MHz, 16 bit
> mlx0: Firmware Build Number 0
> mlx0: Fault Management Type 0
> mlx0: Features 0
> mlxd0: <Mylex System Drive> on mlx0
> mlxd0: 26049MB (53348352 sectors) RAID 0 (online)
> Creating DISK mlxd0
> mlxd1: <Mylex System Drive> on mlx0
> mlxd1: 4340MB (8888320 sectors) RAID 7 (online)
> Creating DISK mlxd1
> xl1: <3Com 3c905B-TX Fast Etherlink XL> port 0xdc00-0xdc7f mem
> 0xefff7f00-0xefff7f7f irq 11 at device 18.0 on pci0
> xl1: Ethernet address: 00:10:4b:b6:f1:c5
> xl1: media options word: a
> xl1: found MII/AUTO
> miibus1: <MII bus> on xl1
> xlphy1: <3Com internal media interface> on miibus1
> xlphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
> bpf: xl1 attached
> Qlogic ISP Driver, FreeBSD Version 4.16, Core Version 2.5
> isp0: <Qlogic ISP 1020/1040 PCI SCSI Adapter> port 0xda00-0xdaff mem
> 0xefff6000-0xefff6fff irq 5 at device 20.0 on pci0
> isp0: using I/O space register mapping
> isp0: Ultra Mode Capable
> isp0: Board Type 1040B, Chip Revision 0x5, resident F/W Revision 4.55.0
> isp0: Last F/W revision was 4.55.0
> isp0: 249 max I/O commands supported
> isp0: Initiator ID is 7 on Channel 0
> ata-: ata0 exists, using next available unit number
> ata-: ata1 exists, using next available unit number
> orm0: <Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xcbfff on isa0
> fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
> fdc0: FIFO enabled, 8 bytes threshold
> fd0: <1440-KB 3.5" drive> on fdc0 drive 0
> atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
> atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
> atkbd: the current kbd controller command byte 0065
> atkbd: keyboard ID 0x41ab (2)
> kbd0 at atkbd0
> kbd0: atkbd0, AT 101/102 (2), config:0x1, flags:0x3d0000
> psm0: current command byte:0065
> psm0: <PS/2 Mouse> irq 12 on atkbdc0
> psm0: model IntelliMouse, device ID 3-00, 3 buttons
> psm0: config:00000000, flags:00000000, packet size:4
> psm0: syncmask:08, syncbits:08
> vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
> sc0: <System console> at flags 0x100 on isa0
> sc0: VGA <16 virtual consoles, flags=0x300>
> sc0: fb0, kbd0, terminal emulator: sc (syscons terminal)
> Device configuration finished.
> bpf: lo0 attached
> IP Filter: v3.4.20 initialized. Default = block all, Logging = enabled
> ata0-master: piomode=4 dmamode=2 udmamode=2 dmaflag=1
> ata0-master: success setting PIO4 on generic chip
> acd0: <CRD-8400B/1.02> CDROM drive at ata0 as master
> acd0: read 6875KB/s (32026KB/s), 128KB buffer, PIO4
> acd0: Reads: CD-R, CD-RW, CD-DA stream, packet
> acd0: Audio: play, 255 volume levels
> acd0: Mechanism: ejectable tray
> acd0: Medium: no/blank disc inside, unlocked, lock protected
> Waiting 10 seconds for SCSI devices to settle
> isp0: driver initiated bus reset of bus 0
> sa0 at isp0 bus 0 target 5 lun 0
> sa0: <Quantum DLT4000 D069> Removable Sequential Access SCSI-2 device
> sa0: Serial Number CX820M1860
> sa0: 10.000MB/s transfers (10.000MHz, offset 8)
> pass0 at isp0 bus 0 target 5 lun 0
> pass0: <Quantum DLT4000 D069> Removable Sequential Access SCSI-2 device
> pass0: Serial Number CX820M1860
> pass0: 10.000MB/s transfers (10.000MHz, offset 8)
> Mounting root from ufs:/dev/mlxd0s1a
> mlxd0s1: type 0xa5, start 0, end = 53348351, size 53348352 : OK
> start_init: trying /sbin/init
> mlxd1s1: type 0xa5, start 0, end = 8888319, size 8888320
> mlxd1s1: C/H/S end 553/69/28 (1085839) != end 8888319: OK
>
> 02/Feb/2002 12:44:32 ntop v.2.0.0 MT (SSL) [i386-unknown-freebsd4.5]
> (01/29/02 06:12:31 PM build)
>
> compiled from source obtained via FreeBSD port.
> pkg_info = ntop-2.0_2
>
> gcc version 2.95.3 20010315 (release) [FreeBSD]
> GNU Make version 3.79.1
> glibc-2.1.2
>
> /usr/local/bin/ntop -i xl1 -w 3000 -W 3001 -a /var/log -u nobody -b
> 192.168.0.1:4000 -E -K -S 1
>
> xl1 is internet connected interface
>
> bandwidth available is debatable but ca 16 Mbs which is shared with the
> users on the other side of the lan
>
> internally 8 users
>
> cat patch-Makefile.am
> --- Makefile.am.orig Thu Dec 27 18:00:25 2001
> +++ Makefile.am Tue Jan 8 14:31:14 2002
> @@ -145,7 +145,7 @@
> libntopreport_la_LIBADD = $(MORELIBS)
> libntopreport_la_LDFLAGS = -version-info
@NTOP_VERSION_INFO@ -release
> @NTOP_RELEASE@ -export-dynamic @DYN_FLAGS@
>
> -man_MANS = ntop.8 intop/intop.1
> +man_MANS = ntop.8 ntop-rules.8
>
> .PHONY: snapshot
>
> @@ -219,10 +219,10 @@
> /bin/rm -f privkey.pem cert.pem
>
> install-data-local:
> - @cp -p ntop-cert.pem $(bindir)/ntop-cert.pem
> @$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(libdir)/plugins;
> @$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(datadir)/ntop;
> @$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(datadir)/ntop/html;
> + @cp -p ntop-cert.pem $(datadir)/ntop/ntop-cert.pem
> @for file in $(NTOPHTML); do \
> if test -d $$file; then \
> $(top_srcdir)/mkinstalldirs
> $(DESTDIR)/$(datadir)/ntop/$$file; \
>
> cat patch-configure.in
> --- configure.in.orig Thu Dec 27 19:40:55 2001
> +++ configure.in Thu Jan 24 11:02:57 2002
> @@ -799,12 +799,10 @@
>
> if test ".${GDBM_ROOT}" != .; then
> AC_MSG_CHECKING([for the GNU Database Manager Library gdbm (required
> package)])
> - if test -d $GDBM_ROOT &&
> - test -r $GDBM_ROOT/libgdbm.a &&
> - test -r $GDBM_ROOT/gdbm.h; then
> + if test 1; then
> GDBM_ROOT=`cd ${GDBM_ROOT} && pwd`
> - CORELIBS="${CORELIBS} -L$GDBM_ROOT -lgdbm"
> - INCS="${INCS} -I$GDBM_ROOT"
> + CORELIBS="${CORELIBS} -L$GDBM_ROOT/lib -lgdbm"
> + INCS="${INCS} -I$GDBM_ROOT/include"
> AC_DEFINE(HAVE_GDBM_H)
> AC_MSG_RESULT([found in $GDBM_ROOT])
> else
> @@ -873,16 +871,11 @@
> dnl>
> dnl> user defined directory passed as option at configuration time
> dnl>
> - if test ".${GDCHART_ROOT}" != .; then
> - if test -d $GDCHART_ROOT &&
> - test -r $GDCHART_ROOT/libgdchart.a &&
> - test -r $GDCHART_ROOT/gdc.h &&
> - test -r $GDCHART_ROOT/gd-1.8.3/libgd.a &&
> - test -r $GDCHART_ROOT/gd-1.8.3/gd.h &&
> - test -r $GDCHART_ROOT/zlib-1.1.3/libz.a; then
> + if test 1; then
> + if test -d $GDCHART_ROOT; then
> GDCHART_ROOT=`cd ${GDCHART_ROOT} && pwd`
> - MORELIBS="${MORELIBS} -L$GDCHART_ROOT -lgdchart
> -L$GDCHART_ROOT/gd-1.8.3 -lgd -L$GDCHART_ROOT/gd-1.8.3/libpng-1.0.8 -lpng
> -L$GDCHART_ROOT/zlib-1.1.3 -lz"
> - INCS="${INCS} -I$GDCHART_ROOT"
> + MORELIBS="${MORELIBS} -L${prefix}/lib -lgdchart -lgd -lpng -lz"
> + INCS="${INCS} -I${prefix}/include/gd"
> AC_DEFINE(HAVE_GDCHART)
> AC_MSG_RESULT([found in $GDCHART_ROOT])
> else
> @@ -936,12 +929,10 @@
> if test ".$ac_disable_openssl" = ".no"; then
> AC_MSG_CHECKING([for OpenSSL Library by Open SLL Project (optional
> package)]) if test ".${OSSL_ROOT}" != .; then
> - if test -d $OSSL_ROOT &&
> - test -r $OSSL_ROOT/libssl.a &&
> - test -r $OSSL_ROOT/openssl/ssl.h; then
> + if test 1; then
> OSSL_ROOT=`cd ${OSSL_ROOT} && pwd`
> - MORELIBS="${MORELIBS} -L$OSSL_ROOT -lssl"
> - INCS="${INCS} -I$OSSL_ROOT"
> + MORELIBS="${MORELIBS} -L$OSSL_ROOT/crypto -lssl"
> + INCS="${INCS} -I$OSSL_ROOT/include"
> AC_DEFINE(HAVE_OPENSSL)
> AC_MSG_RESULT([found in $OSSL_ROOT])
> elif test -d $OSSL_ROOT &&--
>
> cat patch-main.c
> --- main.c.orig Tue Nov 13 13:44:26 2001
> +++ main.c Tue Dec 4 17:00:15 2001
> @@ -400,7 +400,7 @@
> }
>
> snprintf(accessLogPath, sizeof(accessLogPath), "%s/%s",
> - dbPath, DETAIL_ACCESS_LOG_FILE_PATH);
> + accessLogPath, DETAIL_ACCESS_LOG_FILE_PATH);
>
> initLogger(); /* Do not call this function before dbPath
> is initialized */
>
> Pardon me, waiter. I like my water diluted.
--
humanism is obselete
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listmanager.unipi.it/mailman/listinfo/ntop-dev