ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/network_stats.c
Revision 1.17 - (view) (annotate) - [select for diffs]
Tue Aug 26 22:34:49 2003 UTC (20 years, 8 months ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_5_1, LIBSTATGRAB_0_6, LIBSTATGRAB_0_6_1
Changes since 1.16: +1 -1 lines
Diff to previous 1.16
Fix for freebsd network traffic too.. Everything stores it in 32bit
with the exception of SOL8+ hosts.

Its a stupid world ;)

Revision 1.16 - (view) (annotate) - [select for diffs]
Tue Aug 26 22:11:57 2003 UTC (20 years, 8 months ago) by pajs
Branch: MAIN
Changes since 1.15: +1 -1 lines
Diff to previous 1.15
Linux stores it as a 32bit unsigned long, so suffers the same wrap around
bug as sol 7 hosts. This increases the chances it may happen on freebsd too
so some testing maybe needed. If so, we prob should change this to a default
and have a #ifdef 64bit for the odd (good) ones :)

Revision 1.15 - (view) (annotate) - [select for diffs]
Sun Aug 24 20:24:09 2003 UTC (20 years, 8 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_5
Changes since 1.14: +2 -2 lines
Diff to previous 1.14
Tidy up of lots of little things. :)

Revision 1.14 - (view) (annotate) - [select for diffs]
Sun Apr 6 00:27:19 2003 UTC (21 years, 1 month ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_4
Changes since 1.13: +37 -0 lines
Diff to previous 1.13
Now works on freebsd. This is the last of parts that needed to be ported
so its now "finished" for testing. Solaris and Linux should also be tested
as minor changes in code may of disturbed them (it shouldn't have, i just
may of made a mistake :) )

Certain things will require setgid kmem permissions (swap and processor
stats)

Revision 1.13 - (view) (annotate) - [select for diffs]
Mon Mar 31 13:24:12 2003 UTC (21 years, 1 month ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_3_4
Changes since 1.12: +1 -0 lines
Diff to previous 1.12
Fixed memory leak in regex stuff

Revision 1.12 - (view) (annotate) - [select for diffs]
Mon Mar 31 11:30:54 2003 UTC (21 years, 1 month ago) by pajs
Branch: MAIN
Changes since 1.11: +2 -1 lines
Diff to previous 1.11
Fixed some issues with not closing FILE*'s.

Revision 1.11 - (view) (annotate) - [select for diffs]
Sat Mar 29 18:51:13 2003 UTC (21 years, 1 month ago) by tdb
Branch: MAIN
Changes since 1.10: +1 -1 lines
Diff to previous 1.10
Fix another #include.

Revision 1.10 - (view) (annotate) - [select for diffs]
Sat Mar 22 11:42:10 2003 UTC (21 years, 1 month ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_3_3
Changes since 1.9: +1 -1 lines
Diff to previous 1.9
Another stupid bug in the wrap around code.

Revision 1.9 - (view) (annotate) - [select for diffs]
Wed Mar 12 16:15:48 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_3_2
Changes since 1.8: +4 -4 lines
Diff to previous 1.8
Well, i carefully made the function to look after wrap around issues, and
then apparently didn't use it :)

It now uses it :)

Revision 1.8 - (view) (annotate) - [select for diffs]
Tue Mar 11 16:16:20 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_3_1
Changes since 1.7: +17 -0 lines
Diff to previous 1.7
Ok, wrap around fixed for 32bit machines, not 64. I really ought to change
all the long long's to ulong long's. I'll ponder if i can be bothered :)

Revision 1.7 - (view) (annotate) - [select for diffs]
Tue Mar 11 14:30:39 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.6: +14 -4 lines
Diff to previous 1.6
Make network stats work on pre sol8.
BUGS: On pre sol8 systems, it doesn't cope with a wrap around once the
32bit uint becomes too big. So when this happens it will report one set
of dodgy data, then continue. This bug technically is there in the 64bit
version too, but it will need to of sent 9223372036854775808 bytes first.
(8388608 terrabytes, so basically a *big enough* number that will come around
and byte me in 20 years time or something ;) )

Revision 1.6 - (view) (annotate) - [select for diffs]
Fri Mar 7 11:56:44 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_3
Changes since 1.5: +62 -6 lines
Diff to previous 1.5
Made network stats work with linux.

Revision 1.5 - (view) (annotate) - [select for diffs]
Sat Mar 1 02:42:27 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_2
Changes since 1.4: +1 -0 lines
Diff to previous 1.4
bug fix

Revision 1.4 - (view) (annotate) - [select for diffs]
Fri Feb 28 22:59:35 2003 UTC (21 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.3: +1 -3 lines
Diff to previous 1.3
Tidy up of configure script, and includes.

Revision 1.3 - (view) (annotate) - [select for diffs]
Wed Feb 19 17:13:24 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.2: +101 -29 lines
Diff to previous 1.2
network stats now returns a diff() style function, to make it easy to
show the exact average network traffic over a period of time.

Revision 1.2 - (view) (annotate) - [select for diffs]
Tue Feb 18 23:23:36 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.1: +2 -1 lines
Diff to previous 1.1
Changed the kstat_close to not return NULL in event of a failure. If we
cant close it, well there is nothing i can do about that, so i may as well
at least return something useful since its done all the hardwork by that
point. And anywan, it should never fail to close :)

Revision 1.1 - (view) (annotate) - [select for diffs]
Tue Feb 18 19:28:30 2003 UTC (21 years, 3 months ago) by pajs
Branch: MAIN
The new revesion of libstatgrab, which is a complete rewrite essentially.

Firstly the data is now returned in structures rather than xml strings.
The structures returned are all static, so what ever calls the library doesn't
have to deal with the memory management of it.

Secondly the general efficency of the code is now significantly faster. It no
longer needs to fork a process, connect file descriptors and run ps, and then
parse the output like it used to. Now it walks /proc and reads it into the
correct data structures. This works without needing any special privilages, so
it can still run as a normal mortal without needing any special group. (Freebsd
will be an exception to this, but this commit only works with solaris, and that
requires nothing special)

Thridly it has more functionality than it used to. It not for instance is capable
of showing network traffic stats, (although its not completely finished yet). It
also in the near future be able to disk io stats as well. Several bug fixes have
been aplied over the original version. For example the cpu_stats used to only reply
the stats for the first processor. This now will report the total stats of all of
them. Paging stats will also be fixed, but haven't been done yet.

Convenience Links

Links to HEAD: (view) (annotate) Links to LIBSTATGRAB_0_5_1: (view) (annotate)

Compare Revisions

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.

  Diffs between and
  Type of Diff should be a