ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/tools.h
Revision 1.26 - (view) (annotate) - [select for diffs]
Sat Sep 24 13:29:23 2005 UTC (18 years, 7 months ago) by tdb
Branch: MAIN
CVS Tags: HEAD, LIBSTATGRAB_0_13, LIBSTATGRAB_0_14, LIBSTATGRAB_0_15, LIBSTATGRAB_0_16, LIBSTATGRAB_0_17
Changes since 1.25: +2 -1 lines
Diff to previous 1.25
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.25 - (view) (annotate) - [select for diffs]
Sat Nov 6 14:55:53 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.24: +9 -1 lines
Diff to previous 1.24
Add sg_get_pstat_static for HP-UX. (Untested.)

Revision 1.24 - (view) (annotate) - [select for diffs]
Thu Apr 8 10:56:13 2004 UTC (20 years ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_10, LIBSTATGRAB_0_10_1, LIBSTATGRAB_0_10_2, LIBSTATGRAB_0_10_3
Changes since 1.23: +5 -1 lines
Diff to previous 1.23
Shift a bunch of parsing functions to be linux/cygwin only. Prompted by
a regex related compile error on FreeBSD (we don't use regex's on FreeBSD).

Revision 1.23 - (view) (annotate) - [select for diffs]
Wed Apr 7 09:44:08 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.22: +4 -1 lines
Diff to previous 1.22
Add sg_realloc, and a macro fo sg_malloc.

Revision 1.22 - (view) (annotate) - [select for diffs]
Tue Apr 6 14:52:58 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21
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.21 - (view) (annotate) - [select for diffs]
Mon Apr 5 18:10:11 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.20: +2 -2 lines
Diff to previous 1.20
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.20 - (view) (annotate) - [select for diffs]
Mon Apr 5 15:40:15 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.19: +11 -17 lines
Diff to previous 1.19
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.19 - (view) (annotate) - [select for diffs]
Mon Apr 5 00:01:48 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.18: +5 -1 lines
Diff to previous 1.18
Add prototype for get_svr_from_bsd, and make it take and return const
char *.

Revision 1.18 - (view) (annotate) - [select for diffs]
Sun Apr 4 23:55:48 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.17: +3 -1 lines
Diff to previous 1.17
I like copy_string. We should use it EVERYWHERE. Also, the name needed
changing.

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

Revision 1.16 - (view) (annotate) - [select for diffs]
Sun Apr 4 22:40:25 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.15: +1 -5 lines
Diff to previous 1.15
atoll's a static helper function; it shouldn't be in the header.

Revision 1.15 - (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.14: +3 -3 lines
Diff to previous 1.14
Add support for DragonFly BSD 1.0.
Also a minor tweak to the network interface code to make it more portable.

Revision 1.14 - (view) (annotate) - [select for diffs]
Sat Feb 14 20:42:59 2004 UTC (20 years, 2 months ago) by ats
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13
get_kvm() only on FreeBSD.

Revision 1.13 - (view) (annotate) - [select for diffs]
Sat Feb 14 12:38:18 2004 UTC (20 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12
kvm is now only needed for FreeBSD, so change defines accordingly.

Revision 1.12 - (view) (annotate) - [select for diffs]
Fri Feb 13 16:46:21 2004 UTC (20 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11
Finish support for OpenBSD.

Get disknames out of sysctl as well for Disk IO.
Fix memory/page/swap stats to use get_uvmexp in tools.c (same as NetBSD).

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

Revision 1.10 - (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.9: +13 -12 lines
Diff to previous 1.9
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.9 - (view) (annotate) - [select for diffs]
Fri Jan 9 16:19:58 2004 UTC (20 years, 3 months ago) by pajs
Branch: MAIN
Changes since 1.8: +14 -4 lines
Diff to previous 1.8
Added strlcat/strlcpy (taken from openssh). Added a #define for both, and
also atoll which we appear to of forgotten about when it was written.

Removed that #ifdef around get_ll_match as atoll will now always be defined.

Revision 1.8 - (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, LIBSTATGRAB_0_8
Changes since 1.7: +10 -2 lines
Diff to previous 1.7
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.7 - (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.6: +7 -0 lines
Diff to previous 1.6
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.6 - (view) (annotate) - [select for diffs]
Sun Oct 19 00:09:22 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.5: +1 -3 lines
Diff to previous 1.5
Remove headers from tools.h that the prototypes don't need (since
  they're included elsewhere where needed).
Include tools.h in tools.c, so we get warnings if the prototypes are
  wrong.

Revision 1.5 - (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.4: +2 -2 lines
Diff to previous 1.4
Tidy up of lots of little things. :)

Revision 1.4 - (view) (annotate) - [select for diffs]
Sun Apr 6 11:57:54 2003 UTC (21 years ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_4
Changes since 1.3: +2 -0 lines
Diff to previous 1.3
Make the functions that use atoll have a #ifdef HAVE_ATOLL around them.
I did this because freebsd doesn't have this function, and it doesn't
need to run any of the functions in tools.h that uses them.

Revision 1.3 - (view) (annotate) - [select for diffs]
Fri Mar 7 14:44:38 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.2: +6 -0 lines
Diff to previous 1.2
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.2 - (view) (annotate) - [select for diffs]
Fri Mar 7 11:56:44 2003 UTC (21 years, 1 month ago) by pajs
Branch: MAIN
Changes since 1.1: +3 -0 lines
Diff to previous 1.1
Made network stats work with linux.

Revision 1.1 - (view) (annotate) - [select for diffs]
Tue Mar 4 18:07:42 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Useful tools, currently only one function. Function takes a file pointer
and will read threw it until it hits a passed string. It will return that
line.

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