ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/disk_stats.c
Revision 1.28 - (view) (annotate) - [select for diffs]
Thu Oct 9 15:22:59 2003 UTC (20 years, 7 months ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_6, LIBSTATGRAB_0_6_1
Changes since 1.27: +5 -3 lines
Diff to previous 1.27
Fixed a forgotten line from the patch

Revision 1.27 - (view) (annotate) - [select for diffs]
Thu Oct 9 14:59:52 2003 UTC (20 years, 7 months ago) by pajs
Branch: MAIN
Changes since 1.26: +14 -1 lines
Diff to previous 1.26
Freebsd 5 patch for disk stats. Thanks to Tim Bishop for doing the hard
work on this patch.

Revision 1.26 - (view) (annotate) - [select for diffs]
Wed Oct 8 09:20:56 2003 UTC (20 years, 7 months ago) by tdb
Branch: MAIN
Changes since 1.25: +1 -151 lines
Diff to previous 1.25
Unroll Pete's commits for doing drive mappings on Solaris. It doesn't
work right and he wants to start again. Also, we don't want it in the
next release :) This effectively removes revisions 1.22 and 1.23.

Revision 1.25 - (view) (annotate) - [select for diffs]
Tue Oct 7 20:32:50 2003 UTC (20 years, 7 months ago) by tdb
Branch: MAIN
Changes since 1.24: +1 -0 lines
Diff to previous 1.24
Further following of the manpage:

"getdevs() expects the statinfo structure to be allocated, and it also
expects the dinfo subelement to be allocated and zeroed prior to the
first invocation of getdevs()."

This finally makes saider work on FreeBSD.

Revision 1.24 - (view) (annotate) - [select for diffs]
Tue Oct 7 19:58:37 2003 UTC (20 years, 7 months ago) by tdb
Branch: MAIN
Changes since 1.23: +0 -1 lines
Diff to previous 1.23
Don't free stats.dinfo. If it used to store state between calls of
getdevs it probably doesn't make sense to free it at the end of the
first call of the function :)

This follows Adam's last commit on this bit of which made sure we
didn't reinitialise stats.dinfo every time round the loop.

Revision 1.23 - (view) (annotate) - [select for diffs]
Fri Sep 26 22:30:48 2003 UTC (20 years, 7 months ago) by pajs
Branch: MAIN
Changes since 1.22: +1 -0 lines
Diff to previous 1.22
Bug fix on systems with large path_to_inst files.

Revision 1.22 - (view) (annotate) - [select for diffs]
Fri Sep 26 16:33:51 2003 UTC (20 years, 7 months ago) by pajs
Branch: MAIN
Changes since 1.21: +150 -1 lines
Diff to previous 1.21
Added drive mapping for solaris from the old sunos names, to the more
modern solaris names.

E.g.

ssd0 to c0t0d0s0

This is rather more useful :)

Revision 1.21 - (view) (annotate) - [select for diffs]
Tue Sep 9 08:43:33 2003 UTC (20 years, 8 months ago) by ats
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_5_1
Changes since 1.20: +7 -3 lines
Diff to previous 1.20
Fix FreeBSD segfault. From the getdevs() man page: "The dinfo subelement
is used to store state between calls, and should not be modified after
the first call to getdevs()."

Revision 1.20 - (view) (annotate) - [select for diffs]
Thu Aug 28 23:05:56 2003 UTC (20 years, 8 months ago) by ats
Branch: MAIN
Changes since 1.19: +122 -61 lines
Diff to previous 1.19
Make disk_stats read /proc/partitions on Linux, which contains information for
  all disks on recent 2.4 kernels. (It'll fall back to /proc/stat if it can't
  find the information there.)

Revision 1.19 - (view) (annotate) - [select for diffs]
Thu Aug 28 21:33:42 2003 UTC (20 years, 8 months ago) by ats
Branch: MAIN
Changes since 1.18: +0 -1 lines
Diff to previous 1.18
Don't fclose(NULL).

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

Revision 1.17 - (view) (annotate) - [select for diffs]
Sat Apr 5 23:56:25 2003 UTC (21 years, 1 month ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_4
Changes since 1.16: +46 -2 lines
Diff to previous 1.16
Should now work on freebsd.

Revision 1.16 - (view) (annotate) - [select for diffs]
Fri Apr 4 14:25:26 2003 UTC (21 years, 1 month ago) by pajs
Branch: MAIN
Changes since 1.15: +52 -0 lines
Diff to previous 1.15
Disk stats for freebsd. This does not currently include diskio stats.

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

Revision 1.14 - (view) (annotate) - [select for diffs]
Tue Mar 11 12:57:07 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_3_1, LIBSTATGRAB_0_3_2, LIBSTATGRAB_0_3_3
Changes since 1.13: +2 -0 lines
Diff to previous 1.13
Bug fix, again :) .. I wasn't reporting the time taken since last statgrab
correctly. So got very busy disks apparently ;)

Revision 1.13 - (view) (annotate) - [select for diffs]
Fri Mar 7 20:17:07 2003 UTC (21 years, 2 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_3
Changes since 1.12: +1 -1 lines
Diff to previous 1.12
Added tools.c and tools.h to the Makefile. It now compiles ok on both
Solaris and Linux. Also fixed a minor compile bug in disk_stats.c - I
did check the history in CVS, and it used to be like this. The bug got
introduced in the Linux changes.

Revision 1.12 - (view) (annotate) - [select for diffs]
Wed Mar 5 17:11:22 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.11: +5 -1 lines
Diff to previous 1.11
Linux reports stupid results. Fixed to return real vaules. Side note, gkrellm
is doing it wrong ;)

Revision 1.11 - (view) (annotate) - [select for diffs]
Wed Mar 5 12:41:19 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.10: +22 -3 lines
Diff to previous 1.10
Working linux diskio stats. Fixed bug in tools.c

Revision 1.10 - (view) (annotate) - [select for diffs]
Tue Mar 4 18:06:16 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.9: +66 -4 lines
Diff to previous 1.9
Diskio stats for linux. Not been checked. Relies on tools.c (seperate comit)
If someone knows a nicer way of getting the device name, please tell me, as
the way im doing it is horrible! :)

Revision 1.9 - (view) (annotate) - [select for diffs]
Tue Mar 4 12:55:14 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.8: +65 -10 lines
Diff to previous 1.8
disk_stats for linux. Does not do diskio stats yet.

Revision 1.8 - (view) (annotate) - [select for diffs]
Sat Mar 1 02:41:54 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_2
Changes since 1.7: +2 -1 lines
Diff to previous 1.7
Bug fix

Revision 1.7 - (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.6: +1 -5 lines
Diff to previous 1.6
Tidy up of configure script, and includes.

Revision 1.6 - (view) (annotate) - [select for diffs]
Sun Feb 23 23:28:19 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.5: +1 -1 lines
Diff to previous 1.5
Changed function name changed to be consistent.

Revision 1.5 - (view) (annotate) - [select for diffs]
Sun Feb 23 22:58:08 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.4: +73 -10 lines
Diff to previous 1.4
Added a diff diskio_stats and fixed a bug. This is the last thing needed
for the solaris version of the new libstatgrab, bar bug fixes.

Revision 1.4 - (view) (annotate) - [select for diffs]
Sun Feb 23 19:24:07 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.3: +86 -3 lines
Diff to previous 1.3
Added support for read/write stats on a per disk basis. This does not count metadisks as disks.
I will also add io transfer for mounted devices, and the ususal diff() function that gives you
the differences since last time you called it.

Revision 1.3 - (view) (annotate) - [select for diffs]
Thu Feb 20 13:19:52 2003 UTC (21 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.2: +1 -2 lines
Diff to previous 1.2
Removed references to ukcprog.h.
Fixed a missing * in the disk stats.
And removed a block of linux stuff that shouldn't have been there :-)
All with Pete's approval, of course.

Revision 1.2 - (view) (annotate) - [select for diffs]
Thu Feb 20 13:08:45 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.1: +6 -0 lines
Diff to previous 1.1
Header for new function.

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_6: (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