ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/process_stats.c
Revision 1.83 - (view) (annotate) - [select for diffs]
Sun Oct 3 18:35:58 2010 UTC (13 years, 6 months ago) by tdb
Branch: MAIN
CVS Tags: HEAD
Changes since 1.82: +164 -2 lines
Diff to previous 1.82
Add support for AIX 5.x - 9.x.

Many thanks to Jens Rehsack <rehsack@googlemail.com> for providing the
patch for this work. Thanks!

Revision 1.82 - (view) (annotate) - [select for diffs]
Mon Oct 9 14:47:58 2006 UTC (17 years, 6 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_14, LIBSTATGRAB_0_15, LIBSTATGRAB_0_16, LIBSTATGRAB_0_17
Changes since 1.81: +9 -1 lines
Diff to previous 1.81
Fix process time_spent on Linux.

Spotted by: Fred Barnes

Revision 1.81 - (view) (annotate) - [select for diffs]
Sat Sep 24 13:29:22 2005 UTC (18 years, 7 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_13
Changes since 1.80: +24 -1 lines
Diff to previous 1.80
Add WIN32 support via MINGW. We'll need to add stuff to the README file
about what this requires to build.

All the hard work done by: skel

Revision 1.80 - (view) (annotate) - [select for diffs]
Sun Nov 7 12:32:24 2004 UTC (19 years, 5 months ago) by ats
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_11, LIBSTATGRAB_0_11_1, LIBSTATGRAB_0_12
Changes since 1.79: +2 -2 lines
Diff to previous 1.79
Always include string.h (for strcmp).

Revision 1.79 - (view) (annotate) - [select for diffs]
Sat Nov 6 23:54:12 2004 UTC (19 years, 5 months ago) by tdb
Branch: MAIN
Changes since 1.78: +3 -3 lines
Diff to previous 1.78
Cast numbers to be the same type when doing a comparison.

Revision 1.78 - (view) (annotate) - [select for diffs]
Sat Nov 6 15:31:26 2004 UTC (19 years, 5 months ago) by ats
Branch: MAIN
Changes since 1.77: +11 -4 lines
Diff to previous 1.77
Oops -- make the loop work. (Untested.)

Revision 1.77 - (view) (annotate) - [select for diffs]
Sat Nov 6 15:10:07 2004 UTC (19 years, 5 months ago) by ats
Branch: MAIN
Changes since 1.76: +60 -58 lines
Diff to previous 1.76
Rework the HP-UX process stats code to fetch batches of processes in
fewer system calls. (Untested.)

Revision 1.76 - (view) (annotate) - [select for diffs]
Mon Nov 1 18:30:17 2004 UTC (19 years, 6 months ago) by tdb
Branch: MAIN
Changes since 1.75: +76 -1 lines
Diff to previous 1.75
Merge in patch to provide support for HP-UX 11.11.

Contributed by Roy Keene - thanks Roy!

Revision 1.75 - (view) (annotate) - [select for diffs]
Fri Sep 10 15:15:00 2004 UTC (19 years, 7 months ago) by ats
Branch: MAIN
Changes since 1.74: +31 -11 lines
Diff to previous 1.74
Fix some nasty repeated if()s (reported by Fred Barnes).

Revision 1.74 - (view) (annotate) - [select for diffs]
Sun Jul 18 21:30:11 2004 UTC (19 years, 9 months ago) by ats
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_10_1, LIBSTATGRAB_0_10_2, LIBSTATGRAB_0_10_3
Changes since 1.73: +9 -7 lines
Diff to previous 1.73
Use sg_set_error_with_errno whenever errno's valid.
Change the one user of SG_ERROR_ENOENT to SG_ERROR_SYSCTL instead (since
that's what it should have been).

Revision 1.73 - (view) (annotate) - [select for diffs]
Mon Jun 21 14:48:48 2004 UTC (19 years, 10 months ago) by tdb
Branch: MAIN
Changes since 1.72: +3 -1 lines
Diff to previous 1.72
Fix memory leak on NetBSD 2.0.
(kl_stats wasn't being free'd)

Revision 1.72 - (view) (annotate) - [select for diffs]
Thu Apr 8 23:30:29 2004 UTC (20 years ago) by ats
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_10
Changes since 1.71: +10 -1 lines
Diff to previous 1.71
Skip over argv pointers on OpenBSD.

Revision 1.71 - (view) (annotate) - [select for diffs]
Thu Apr 8 17:20:51 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.70: +43 -33 lines
Diff to previous 1.70
Attempt to rework the command line argument fetching - mallocing 256Kb was
a bit on the large side. Now we start with something sensible and make it
bigger as required.

This produces odd results on OpenBSD.

Revision 1.70 - (view) (annotate) - [select for diffs]
Thu Apr 8 13:44:44 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.69: +8 -1 lines
Diff to previous 1.69
Add comparison functions for names where that's likely to be useful.

Make the network_iface_stats example show how to use bsearch to find an
interface by name.

Revision 1.69 - (view) (annotate) - [select for diffs]
Thu Apr 8 13:16:05 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.68: +1 -32 lines
Diff to previous 1.68
Nuke sg_process_sort, and make the process stats example demonstrate how
to sort using the compare functions and qsort.

Revision 1.68 - (view) (annotate) - [select for diffs]
Thu Apr 8 13:03:23 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.67: +2 -2 lines
Diff to previous 1.67
s/sg_sort_method/sg_process_sort_method/

Revision 1.67 - (view) (annotate) - [select for diffs]
Thu Apr 8 12:40:30 2004 UTC (20 years ago) by pajs
Branch: MAIN
Changes since 1.66: +16 -16 lines
Diff to previous 1.66
Name change for future friendlyness.

Revision 1.66 - (view) (annotate) - [select for diffs]
Thu Apr 8 11:26:42 2004 UTC (20 years ago) by pajs
Branch: MAIN
Changes since 1.65: +124 -1 lines
Diff to previous 1.65
Added some generic sorting methods for process_stats.

Revision 1.65 - (view) (annotate) - [select for diffs]
Wed Apr 7 21:08:40 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.64: +11 -1 lines
Diff to previous 1.64
The rest of the error handling stuff (except the vector code).

I've been extremely unimaginative with the string names in error.c, but
they're all in one place so much easier to tidy up. I'm also beginning to
wonder if we actually needed an SG_ERROR_SYSTEM_CALL to indicate some call
into the system failed - because the majority of our errors are those :-)

Still to do, then:
 - vector code
 - better string names in error.c
 - deal with arg string in some way
 - make use of the error status in statgrab/saidar/examples

Revision 1.64 - (view) (annotate) - [select for diffs]
Wed Apr 7 15:46:34 2004 UTC (20 years ago) by pajs
Branch: MAIN
Changes since 1.63: +3 -1 lines
Diff to previous 1.63
Fixed tools.c change of enum
Fixed a FD leak in solaris and added nice value.

Revision 1.63 - (view) (annotate) - [select for diffs]
Wed Apr 7 14:53:40 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.62: +43 -43 lines
Diff to previous 1.62
Whitespace tidyup - change spaces to tabs.

Revision 1.62 - (view) (annotate) - [select for diffs]
Wed Apr 7 14:45:33 2004 UTC (20 years ago) by pajs
Branch: MAIN
Changes since 1.61: +23 -2 lines
Diff to previous 1.61
More linux code, now does uid/gid.

Revision 1.61 - (view) (annotate) - [select for diffs]
Wed Apr 7 10:33:50 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.60: +6 -6 lines
Diff to previous 1.60
Change malloc -> sg_malloc, realloc -> sg_realloc, and rewrite the one
calloc call to use sg_malloc.

Revision 1.60 - (view) (annotate) - [select for diffs]
Wed Apr 7 10:27:53 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.59: +9 -3 lines
Diff to previous 1.59
Change the last few instances of strdup to use sg_update_string.

Revision 1.59 - (view) (annotate) - [select for diffs]
Tue Apr 6 21:08:03 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.58: +1 -2 lines
Diff to previous 1.58
Fix a couple of includes.

Revision 1.58 - (view) (annotate) - [select for diffs]
Tue Apr 6 16:29:44 2004 UTC (20 years ago) by pajs
Branch: MAIN
Changes since 1.57: +19 -6 lines
Diff to previous 1.57
A bit more of the linux code.. Need to do uid/gid bit still.
Also, haven't done nice on solaris yet.

Revision 1.57 - (view) (annotate) - [select for diffs]
Tue Apr 6 14:52:58 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56
Update name of project at the top of all soure files. These files now exist
in their own right, rather than as part of the "CMS".

Revision 1.56 - (view) (annotate) - [select for diffs]
Tue Apr 6 14:44:29 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.55: +4 -1 lines
Diff to previous 1.55
Add a note about something that needs fixing. We still have problems
getting proctitle on some of the BSD's :-(

Revision 1.55 - (view) (annotate) - [select for diffs]
Tue Apr 6 13:40:41 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.54: +79 -1 lines
Diff to previous 1.54
Fix process stats on NetBSD 2.0 (beta).
Also fix the 5-processes-workaround Adam committed yesterday on the rest
of the BSD's (not just FreeBSD5).

Revision 1.54 - (view) (annotate) - [select for diffs]
Mon Apr 5 19:55:27 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.53: +11 -1 lines
Diff to previous 1.53
To quote from the FreeBSD kernel source: "/* overestimate by 5 procs */".
This is the workaround.

Revision 1.53 - (view) (annotate) - [select for diffs]
Mon Apr 5 18:10:11 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.52: +18 -7 lines
Diff to previous 1.52
Make sg_update_string return an int to indicate success, so that it can
be used to set a string to NULL.

Make Linux process_stats code set proctitle to NULL if it's empty rather
than "".

Revision 1.52 - (view) (annotate) - [select for diffs]
Mon Apr 5 15:40:15 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.51: +58 -58 lines
Diff to previous 1.51
Rename all the functions, types and enums in the API to be consistent.
Types are now of the form "sg_mem_stats"; functions of the form
"sg_get_mem_stats"; enums of the form "SG_PROCESS_STATE_RUNNING".
(The old get_proc_snapshot follows the usual calling convention now.)

Make internal functions static where possible.

Rename non-static internal functions to have an sg_ prefix so they don't
collide with those from other libraries. In particular, strlcpy and
strlcat are now called sg_strlcpy and sg_strlcat and are always
included.

Fix saidar and statgrab to use the new API.

Revision 1.51 - (view) (annotate) - [select for diffs]
Mon Apr 5 11:21:49 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.50: +5 -5 lines
Diff to previous 1.50
Fixed, and properly tested.

Revision 1.50 - (view) (annotate) - [select for diffs]
Mon Apr 5 09:33:38 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.49: +12 -18 lines
Diff to previous 1.49
Instead of reallocing on the fly, work out the size of the buffer in
advance and then fill it on a second pass. Suggested by Adam.

Revision 1.49 - (view) (annotate) - [select for diffs]
Mon Apr 5 01:44:20 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.48: +4 -2 lines
Diff to previous 1.48
NULL -> \0, initialise malloced memory to \0, and plug a memory leak.

Revision 1.48 - (view) (annotate) - [select for diffs]
Mon Apr 5 01:41:25 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.47: +65 -42 lines
Diff to previous 1.47
Use vectors and update_string. (I haven't really touched the BSD code
here yet.)

Revision 1.47 - (view) (annotate) - [select for diffs]
Mon Apr 5 00:21:29 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.46: +5 -1 lines
Diff to previous 1.46
We nearly forgot to make the process stats work on cygwin again :-)

Revision 1.46 - (view) (annotate) - [select for diffs]
Sun Apr 4 23:57:33 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.45: +12 -12 lines
Diff to previous 1.45
Returning NULL in a function that returns int's is wrong :)

Now returns -1 on failure. Also change code that calls us to check for < 0
for failures.

Revision 1.45 - (view) (annotate) - [select for diffs]
Sun Apr 4 23:35:45 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.44: +6 -5 lines
Diff to previous 1.44
Minor bugfixes.

Revision 1.44 - (view) (annotate) - [select for diffs]
Sun Apr 4 23:24:42 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.43: +14 -12 lines
Diff to previous 1.43
Fix a bunch of silly errors.

Revision 1.43 - (view) (annotate) - [select for diffs]
Sun Apr 4 22:48:50 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.42: +2 -1 lines
Diff to previous 1.42
Fix a bunch of warnings on the BSD's.

Revision 1.42 - (view) (annotate) - [select for diffs]
Sun Apr 4 22:09:32 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.41: +3 -3 lines
Diff to previous 1.41
Add an get_kvm2 function to open kvm with slightly different args. This
set of args doesn't seem to need elevated privileges, but in my last test
wouldn't perform the functions required in swap_stats.

Revision 1.41 - (view) (annotate) - [select for diffs]
Sun Apr 4 21:54:49 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.40: +10 -8 lines
Diff to previous 1.40
Fix a bunch of warnings.

Revision 1.40 - (view) (annotate) - [select for diffs]
Sun Apr 4 21:44:00 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.39: +4 -2 lines
Diff to previous 1.39
Silence a (harmless) "enumeration value `UNKNOWN' not handled in switch"
error.

Revision 1.39 - (view) (annotate) - [select for diffs]
Sun Apr 4 21:42:44 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.38: +2 -2 lines
Diff to previous 1.38
get_proc_snapshot returns an integer, not a pointer.

Revision 1.38 - (view) (annotate) - [select for diffs]
Sun Apr 4 21:40:55 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.37: +2 -2 lines
Diff to previous 1.37
Silence 40-odd (harmless) "use of assignment suppression and length
modifier together" errors.

Revision 1.37 - (view) (annotate) - [select for diffs]
Sun Apr 4 21:34:48 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.36: +90 -31 lines
Diff to previous 1.36
This has been a bit more complex than it probably should have been. We now
have the command line arguments on FreeBSD5, NetBSD, and probably OpenBSD
without using kvm. The sysctl interface provided the required information.

However, on FreeBSD 4 and Dragonfly BSD there was no matching sysctl
interface, so the kvm way remains. Fortunately neither of those two OS's
require elevated privileges to use that bit of kvm.

Finally in a decent position with no elevated privileges required for this
section of code, on any of the BSD's.

Still one bug to fix: there are 5 "null" processes on the end of the list.
This has been introduced at some point, because it wasn't there yesterday.

Revision 1.36 - (view) (annotate) - [select for diffs]
Sun Apr 4 16:12:59 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.35: +22 -10 lines
Diff to previous 1.35
Revert to using sysctl instead of kvm to get process stats. This should be
more compatible with NetBSD and OpenBSD. Still need to use kvm to get the
command line args, but this seems unavoidable.

At this stage we don't bail if kvm fails (eg. not enough privs), instead
the command line args will just be set to NULL. Seems a fair compromise.

Revision 1.35 - (view) (annotate) - [select for diffs]
Sun Apr 4 15:56:53 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.34: +13 -0 lines
Diff to previous 1.34
Add support for DragonFly BSD. Seems to be working correctly, and works
without needing any extra privileges. Some stuff comes from proc.h,
whilst some comes from thread.h.

A word of warning - the DragonFly folk seem to be changing a lot of stuff
to do with processes and threads, so it's likely this could break very
easily :-)

Revision 1.34 - (view) (annotate) - [select for diffs]
Sun Apr 4 11:46:08 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33
Support for OpenBSD, although it suffers the same problems as NetBSD.

Revision 1.33 - (view) (annotate) - [select for diffs]
Sun Apr 4 11:28:46 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.32: +11 -1 lines
Diff to previous 1.32
This adds support for NetBSD, although it currently needs elevated
privileges. I will try and fix that.

Revision 1.32 - (view) (annotate) - [select for diffs]
Sun Apr 4 11:02:30 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.31: +5 -1 lines
Diff to previous 1.31
Handle failure to get a snapshot.

Revision 1.31 - (view) (annotate) - [select for diffs]
Sat Apr 3 23:02:03 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.30: +4 -1 lines
Diff to previous 1.30
Add default to case statement which uses the UNKNOWN process state.

Revision 1.30 - (view) (annotate) - [select for diffs]
Sat Apr 3 22:59:30 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.29: +56 -13 lines
Diff to previous 1.29
Add support for FreeBSD 4. I suspect this may work on OpenBSD and NetBSD
too, although I'll need to verify that.

Also add an additional process state of UNKNOWN.

Revision 1.29 - (view) (annotate) - [select for diffs]
Sat Apr 3 20:33:45 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.28: +49 -19 lines
Diff to previous 1.28
Got the command line args. Now using kvm to get information, although
fortunately this doesn't need any special privileges. Switched to using
kvm to get the process listing too.

When no command line arguments available doing something similar to ps and
putting the command name in brackets.

Revision 1.28 - (view) (annotate) - [select for diffs]
Sat Apr 3 16:57:32 2004 UTC (20 years, 1 month ago) by tdb
Branch: MAIN
Changes since 1.27: +4 -3 lines
Diff to previous 1.27
Fix CPU percentages on FreeBSD 5. Set args to NULL until we can figure out
how to collect them. Still need to add code for other BSD's.

Revision 1.27 - (view) (annotate) - [select for diffs]
Fri Apr 2 21:20:23 2004 UTC (20 years, 1 month ago) by tdb
Branch: MAIN
Changes since 1.26: +37 -1 lines
Diff to previous 1.26
Reimplement get_process_stats. I presume the plan was to rewrite this to
use the new function for collecting stats :-)

Seems to work on FreeBSD5 - but I'm not entirely convinced my BSD code is
working yet.

Revision 1.26 - (view) (annotate) - [select for diffs]
Tue Mar 30 22:10:04 2004 UTC (20 years, 1 month ago) by tdb
Branch: MAIN
Changes since 1.25: +88 -5 lines
Diff to previous 1.25
The startings of the BSD code. Only works on FreeBSD 5 so far.

Doesn't yet do command line arguments, or CPU percentages correctly.

Revision 1.25 - (view) (annotate) - [select for diffs]
Tue Mar 30 13:41:31 2004 UTC (20 years, 1 month ago) by pajs
Branch: MAIN
Changes since 1.24: +77 -3 lines
Diff to previous 1.24
Basic framework for linux.. Doesn't do CPU on a per process basis, as i'm
not sure the best way to approach that yet.

Revision 1.24 - (view) (annotate) - [select for diffs]
Sun Mar 28 18:22:58 2004 UTC (20 years, 1 month ago) by pajs
Branch: MAIN
Changes since 1.23: +14 -4 lines
Diff to previous 1.23
Added the state for solaris

Revision 1.23 - (view) (annotate) - [select for diffs]
Sun Mar 28 18:04:14 2004 UTC (20 years, 1 month ago) by pajs
Branch: MAIN
Changes since 1.22: +49 -143 lines
Diff to previous 1.22
The start of the rework for process_stats to give more information, and
to become a standard proc interface.

Revision 1.22 - (view) (annotate) - [select for diffs]
Mon Feb 16 14:55:32 2004 UTC (20 years, 2 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_9
Changes since 1.21: +4 -3 lines
Diff to previous 1.21
Add support for DragonFly BSD 1.0.
Also a minor tweak to the network interface code to make it more portable.

Revision 1.21 - (view) (annotate) - [select for diffs]
Sat Feb 14 16:43:55 2004 UTC (20 years, 2 months ago) by ats
Branch: MAIN
Changes since 1.20: +4 -3 lines
Diff to previous 1.20
Move free inside the right #ifdef, and fix a memory leak when sysctl fails.

Revision 1.20 - (view) (annotate) - [select for diffs]
Sat Feb 14 16:12:46 2004 UTC (20 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.19: +19 -8 lines
Diff to previous 1.19
Look at all the process states on all the BSD's. Tidly done using ifdef's.

Revision 1.19 - (view) (annotate) - [select for diffs]
Sat Feb 14 02:56:11 2004 UTC (20 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.18: +41 -20 lines
Diff to previous 1.18
Switch process stats to using sysctl on ALLBSD. On OpenBSD and hopefully
NetBSD (this hasn't been tested yet - but I'm quite confident) this means
we no longer need any elevated privileges.

Revision 1.18 - (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.17: +2 -0 lines
Diff to previous 1.17
A whole bunch of minor cosmetic changes.

Revision 1.17 - (view) (annotate) - [select for diffs]
Fri Jan 16 15:54:54 2004 UTC (20 years, 3 months ago) by tdb
Branch: MAIN
Changes since 1.16: +13 -12 lines
Diff to previous 1.16
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.16 - (view) (annotate) - [select for diffs]
Wed Nov 12 01:41:17 2003 UTC (20 years, 5 months ago) by ats
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_8
Changes since 1.15: +1 -1 lines
Diff to previous 1.15
Use the userspace limits.h header, not the kernel one.

Revision 1.15 - (view) (annotate) - [select for diffs]
Wed Nov 12 01:36:19 2003 UTC (20 years, 5 months ago) by ats
Branch: MAIN
Changes since 1.14: +4 -4 lines
Diff to previous 1.14
Make libstatgrab functions return NULL for stats that can't be fetched
on cygwin.

Revision 1.14 - (view) (annotate) - [select for diffs]
Mon Nov 10 21:07:04 2003 UTC (20 years, 5 months ago) by tdb
Branch: MAIN
Changes since 1.13: +4 -0 lines
Diff to previous 1.13
Add support for cygwin. This is a bit limited, there's a few things that
can't be retrieved on cygwin such as load averages, diskio, network io,
and process stats. The package compiles and runs, and both saidar and
statgrab work.

Taken from a patch submitted by Ron Arts <raarts@netland.nl>. Thanks Ron!

Revision 1.13 - (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.12: +6 -4 lines
Diff to previous 1.12
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.12 - (view) (annotate) - [select for diffs]
Sun Oct 19 00:25:30 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.11: +2 -5 lines
Diff to previous 1.11
Add a helper function for opening the kvm handle. This removes a little
bit of duplicated code, and means that we don't open and close kvm
(which can potentially be quite expensive) each time we use it. This
will also be useful for NetBSD.

Revision 1.11 - (view) (annotate) - [select for diffs]
Thu Oct 9 19:40:03 2003 UTC (20 years, 6 months ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_6, LIBSTATGRAB_0_6_1
Changes since 1.10: +3 -3 lines
Diff to previous 1.10
Fixed for freebsd 5 to count the new states a process can be in. Reverted
back to the proper way for the total now this has been proven was the
problem.

Revision 1.10 - (view) (annotate) - [select for diffs]
Thu Oct 9 16:48:33 2003 UTC (20 years, 6 months ago) by pajs
Branch: MAIN
Changes since 1.9: +4 -0 lines
Diff to previous 1.9
Possibly making sure that the total is always correct on freebsd 5, even
if some of the states are left out.

Revision 1.9 - (view) (annotate) - [select for diffs]
Thu Oct 9 15:12:43 2003 UTC (20 years, 6 months ago) by pajs
Branch: MAIN
Changes since 1.8: +8 -0 lines
Diff to previous 1.8
Update to work for Freebsd5. Thanks to Tim Bishop for doing the hard work
for this patch.

Revision 1.8 - (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
Changes since 1.7: +2 -2 lines
Diff to previous 1.7
Tidy up of lots of little things. :)

Revision 1.7 - (view) (annotate) - [select for diffs]
Wed Jun 4 16:03:34 2003 UTC (20 years, 10 months ago) by pajs
Branch: MAIN
Changes since 1.6: +1 -1 lines
Diff to previous 1.6
Fix bug report #748942. Moved the ifdef to where it should be :)

Revision 1.6 - (view) (annotate) - [select for diffs]
Thu Apr 3 23:14:57 2003 UTC (21 years, 1 month ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_4
Changes since 1.5: +35 -1 lines
Diff to previous 1.5
Now works on freebsd.. Now why couldn't they follow the same scheme as
everything else :) ?

Revision 1.5 - (view) (annotate) - [select for diffs]
Fri Mar 7 15:26:30 2003 UTC (21 years, 1 month 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.4: +47 -8 lines
Diff to previous 1.4
Added linux support.

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

Revision 1.3 - (view) (annotate) - [select for diffs]
Sat Mar 1 02:12:59 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.2: +0 -1 lines
Diff to previous 1.2
Removed debugging printf

Revision 1.2 - (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.1: +1 -2 lines
Diff to previous 1.1
Tidy up of configure script, and includes.

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)

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