ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/page_stats.c
Revision 1.14 - (view) (annotate) - [select for diffs]
Mon Jan 19 16:49:21 2004 UTC (20 years, 3 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_8_1, LIBSTATGRAB_0_8_2
Changes since 1.13: +2 -0 lines
Diff to previous 1.13
A whole bunch of minor cosmetic changes.

Revision 1.13 - (view) (annotate) - [select for diffs]
Fri Jan 16 15:54:54 2004 UTC (20 years, 4 months ago) by tdb
Branch: MAIN
Changes since 1.12: +13 -12 lines
Diff to previous 1.12
Alter the licensing of libstatgrab. The library part is now under the
LGPL, whilst the tools/examples are under the GPL. Both licenses are
included in the distribution (and are both now in CVS). Also made a
minor alteration to the webpage where it said everything was licensed
under the GPL.

Revision 1.12 - (view) (annotate) - [select for diffs]
Fri Jan 9 10:06:01 2004 UTC (20 years, 4 months ago) by pajs
Branch: MAIN
Changes since 1.11: +1 -0 lines
Diff to previous 1.11
Fixed leaking fd in diskio_stats code. Fixed a potential leak in page_stats.

Revision 1.11 - (view) (annotate) - [select for diffs]
Mon Nov 10 23:25:45 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_8
Changes since 1.10: +3 -3 lines
Diff to previous 1.10
Make Cygwin its own platform, rather than defining LINUX. This stops
libstatgrab from trying to fetch stats that Cygwin doesn't have.

Revision 1.10 - (view) (annotate) - [select for diffs]
Fri Oct 24 17:26:43 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.9: +28 -9 lines
Diff to previous 1.9
Support memory, swap and paging stats on Linux 2.6. For memory and swap,
this just means reading the new-style data in /proc/meminfo (since it's
present in 2.2 and 2.4 too); for paging, this means trying to read
/proc/vmstat if it's available, else reading /proc/stat (for 2.2).

Revision 1.9 - (view) (annotate) - [select for diffs]
Sun Oct 19 02:03:02 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_7
Changes since 1.8: +12 -5 lines
Diff to previous 1.8
Initial support for NetBSD. This adds NetBSD support for everything
except diskio stats (since they're even more disturbingly complex to get
at on NetBSD than the three OSs we already support). Tested against
NetBSD 1.6 on i386.

Revision 1.8 - (view) (annotate) - [select for diffs]
Sat Oct 18 23:04:23 2003 UTC (20 years, 7 months ago) by ats
Branch: MAIN
Changes since 1.7: +2 -0 lines
Diff to previous 1.7
... and the size parameter should be initialised to the size of the
buffer first (although FreeBSD doesn't actually seem to care, NetBSD
does, and the manual page says so).

Revision 1.7 - (view) (annotate) - [select for diffs]
Sat Oct 18 22:15:35 2003 UTC (20 years, 7 months ago) by ats
Branch: MAIN
Changes since 1.6: +2 -8 lines
Diff to previous 1.6
You only need to call sysctl{,byname}() twice if you're actually going
  to do something with the size the first call returns.
The last argument to sysctl{,byname}() is a size_t, not a pointer, so it
  should be 0, not NULL.

Revision 1.6 - (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, LIBSTATGRAB_0_5_1, LIBSTATGRAB_0_6, LIBSTATGRAB_0_6_1
Changes since 1.5: +2 -2 lines
Diff to previous 1.5
Tidy up of lots of little things. :)

Revision 1.5 - (view) (annotate) - [select for diffs]
Thu Apr 3 20:26:45 2003 UTC (21 years, 1 month ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_4
Changes since 1.4: +22 -1 lines
Diff to previous 1.4
Now works on freebsd.

Revision 1.4 - (view) (annotate) - [select for diffs]
Fri Mar 7 14:44:38 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_3, LIBSTATGRAB_0_3_1, LIBSTATGRAB_0_3_2, LIBSTATGRAB_0_3_3, LIBSTATGRAB_0_3_4
Changes since 1.3: +28 -9 lines
Diff to previous 1.3
Removed getting of some data we didn't really need or use.
Updated page_stats to work with linux.
Fixed tools.h to compile nicely :)

Revision 1.3 - (view) (annotate) - [select for diffs]
Wed Feb 19 00:25:36 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_2
Changes since 1.2: +37 -1 lines
Diff to previous 1.2
Added get_page_stats_diff() which returns the number of pages in/out etc since
last time it was called, and the time difference since last time it was called.
This makes it very easy for a host to know how many pages averaged over a period
of time.

Revision 1.2 - (view) (annotate) - [select for diffs]
Tue Feb 18 23:12:08 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.1: +17 -5 lines
Diff to previous 1.1
Finished page stats. It returns 2 things. One, number of pages swapped in and
out, 2, the number of pageins and pageouts. As to if this is actually
correct or not, im not 100% sure, but tests seem to imply it is.

from:
http://www.sun.com/sun-on-net/itworld/UIR960901perf.html

        ulong   pgin;           /* pageins                              */
        ulong   pgpgin;         /* pages paged in                       */
        ulong   pgout;          /* pageouts                             */
        ulong   pgpgout;        /* pages paged out                      */
        ulong   swapin;         /* swapins                              */
        ulong   pgswapin;       /* pages swapped in                     */
        ulong   swapout;        /* swapouts

I am *not* using swapins and swapouts. I did this in the orginal libstatgrab,
and it didn't work. Looking at it more closely, it always seems to have 0 in
it, so my guess is its broke. :)

Revision 1.1 - (view) (annotate) - [select for diffs]
Tue Feb 18 19:28:30 2003 UTC (21 years, 2 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_8_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