ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/saidar/saidar.c
Revision 1.32 - (view) (annotate) - [select for diffs]
Sun Nov 7 12:36:04 2004 UTC (19 years, 6 months ago) by ats
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_11
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 , to selected 1.1
Put back the dummy argument -- I know it's not used, but signal handlers
have to have it.

Revision 1.31 - (view) (annotate) - [select for diffs]
Sat Nov 6 19:02:21 2004 UTC (19 years, 6 months ago) by tdb
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 , to selected 1.1
Remove another unused parameter.

Revision 1.30 - (view) (annotate) - [select for diffs]
Mon Oct 11 11:53:44 2004 UTC (19 years, 7 months ago) by tdb
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 , to selected 1.1
Fix when used percentage hits 100%.

Revision 1.29 - (view) (annotate) - [select for diffs]
Wed Apr 7 15:50:26 2004 UTC (20 years, 1 month 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.28: +28 -28 lines
Diff to previous 1.28 , to selected 1.1
More whitespace tidyup (spaces->tabs).

Revision 1.28 - (view) (annotate) - [select for diffs]
Tue Apr 6 14:53:00 2004 UTC (20 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 , to selected 1.1
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.27 - (view) (annotate) - [select for diffs]
Mon Apr 5 15:40:17 2004 UTC (20 years, 2 months ago) by ats
Branch: MAIN
Changes since 1.26: +56 -56 lines
Diff to previous 1.26 , to selected 1.1
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.26 - (view) (annotate) - [select for diffs]
Sun Apr 4 22:48:51 2004 UTC (20 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.25: +1 -2 lines
Diff to previous 1.25 , to selected 1.1
Fix a bunch of warnings on the BSD's.

Revision 1.25 - (view) (annotate) - [select for diffs]
Wed Jan 21 10:27:46 2004 UTC (20 years, 4 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_8_1, LIBSTATGRAB_0_8_2, LIBSTATGRAB_0_9
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 , to selected 1.1
Very minor fix to saidar. It happily accepted a negative number for
it's delay flag - which wasn't overly useful :-)

Revision 1.24 - (view) (annotate) - [select for diffs]
Mon Jan 19 16:49:23 2004 UTC (20 years, 4 months ago) by tdb
Branch: MAIN
Changes since 1.23: +2 -0 lines
Diff to previous 1.23 , to selected 1.1
A whole bunch of minor cosmetic changes.

Revision 1.23 - (view) (annotate) - [select for diffs]
Fri Jan 16 15:54:56 2004 UTC (20 years, 4 months ago) by tdb
Branch: MAIN
Changes since 1.22: +1 -1 lines
Diff to previous 1.22 , to selected 1.1
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.22 - (view) (annotate) - [select for diffs]
Mon Jan 5 17:20:30 2004 UTC (20 years, 5 months ago) by ats
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_8
Changes since 1.21: +2 -10 lines
Diff to previous 1.21 , to selected 1.1
Replace duplicated code for dropping privileges with a library
function that always drops setuid/setgid privileges.

Revision 1.21 - (view) (annotate) - [select for diffs]
Mon Jan 5 16:47:43 2004 UTC (20 years, 5 months ago) by ats
Branch: MAIN
Changes since 1.20: +1 -3 lines
Diff to previous 1.20 , to selected 1.1
Remove unused variable "gid".

Revision 1.20 - (view) (annotate) - [select for diffs]
Mon Jan 5 14:25:03 2004 UTC (20 years, 5 months ago) by pajs
Branch: MAIN
Changes since 1.19: +6 -0 lines
Diff to previous 1.19 , to selected 1.1
Drop setuid for solaris.

Revision 1.19 - (view) (annotate) - [select for diffs]
Thu Dec 11 14:27:08 2003 UTC (20 years, 5 months ago) by tdb
Branch: MAIN
Changes since 1.18: +0 -2 lines
Diff to previous 1.18 , to selected 1.1
Fix problem with -d flag in saidar. The line removed subtracted 1 from
the delay. I guess at some point this was needed, but not now. So
setting a delay of 1 resulted in a sleep 0 :-)

Revision 1.18 - (view) (annotate) - [select for diffs]
Fri Nov 7 18:39:39 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.17: +1 -2 lines
Diff to previous 1.17 , to selected 1.1
Remove a little bit of duplicated code.

Revision 1.17 - (view) (annotate) - [select for diffs]
Fri Nov 7 18:38:48 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.16: +12 -6 lines
Diff to previous 1.16 , to selected 1.1
Do the "don't update more than once a second" thing slightly
differently; this avoids having it be unresponsive for 20 seconds if
you type 20 spaces.

Revision 1.16 - (view) (annotate) - [select for diffs]
Fri Nov 7 18:28:05 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.15: +1 -1 lines
Diff to previous 1.15 , to selected 1.1
getopt returns -1 on completion, not EOF.

Revision 1.15 - (view) (annotate) - [select for diffs]
Fri Nov 7 18:27:35 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.14: +1 -2 lines
Diff to previous 1.14 , to selected 1.1
Fix type of ch.

Revision 1.14 - (view) (annotate) - [select for diffs]
Fri Nov 7 18:25:55 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.13: +5 -24 lines
Diff to previous 1.13 , to selected 1.1
Use curses' timeout() rather than select().

Revision 1.13 - (view) (annotate) - [select for diffs]
Wed Oct 22 13:07:22 2003 UTC (20 years, 7 months ago) by tdb
Branch: MAIN
Changes since 1.12: +4 -3 lines
Diff to previous 1.12 , to selected 1.1
Do the divides a bit more safely :-)

Revision 1.12 - (view) (annotate) - [select for diffs]
Tue Oct 21 18:01:15 2003 UTC (20 years, 7 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_7
Changes since 1.11: +6 -2 lines
Diff to previous 1.11 , to selected 1.1
Make saidar display the VM percentages for swap *or* memory if it can,
rather than not displaying either if it can't get one or the other.

Revision 1.11 - (view) (annotate) - [select for diffs]
Mon Oct 20 22:35:14 2003 UTC (20 years, 7 months ago) by ats
Branch: MAIN
Changes since 1.10: +181 -151 lines
Diff to previous 1.10 , to selected 1.1
Only display the stats that are available (rather than bombing out if they
aren't all available).

Revision 1.10 - (view) (annotate) - [select for diffs]
Mon Oct 20 15:25:48 2003 UTC (20 years, 7 months ago) by pajs
Branch: MAIN
Changes since 1.9: +14 -1 lines
Diff to previous 1.9 , to selected 1.1
Added statgrab_init()

This function just calls the get_kvm type functions so all special privilages
can be dropped after this function has been called. It currently only does
stuff on *bsd (and needs testing on netbsd). All other OS's will just have
a function that returns 0

Solaris at somepoint may need to do something here so we can do the drive mappings.

Revision 1.9 - (view) (annotate) - [select for diffs]
Sat Oct 18 15:05:17 2003 UTC (20 years, 7 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_6_1
Changes since 1.8: +1 -1 lines
Diff to previous 1.8 , to selected 1.1
Now behaves a little bit more like df with regard to percentages. This
needs a better fix somewhere in libstatgrab really; we don't currently know
anything about the reserved space.

Revision 1.8 - (view) (annotate) - [select for diffs]
Sat Oct 18 14:08:36 2003 UTC (20 years, 7 months ago) by pajs
Branch: MAIN
Changes since 1.7: +3 -1 lines
Diff to previous 1.7 , to selected 1.1
Brain failure over a confusion with strncpy (thinking it worked like strlcpy)

Revision 1.7 - (view) (annotate) - [select for diffs]
Sat Oct 18 14:00:21 2003 UTC (20 years, 7 months ago) by pajs
Branch: MAIN
Changes since 1.6: +12 -1 lines
Diff to previous 1.6 , to selected 1.1
Fix an annoying long hostname problem.

Revision 1.6 - (view) (annotate) - [select for diffs]
Thu Oct 16 17:54:44 2003 UTC (20 years, 7 months ago) by tdb
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 , to selected 1.1
Disk percentage may be arguably more "right" than it is before. It's
debatable, of course :)

Revision 1.5 - (view) (annotate) - [select for diffs]
Thu Oct 9 16:35:24 2003 UTC (20 years, 7 months ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_6
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 , to selected 1.1
Another stupid mistake. Now actually prints the program name :)

Revision 1.4 - (view) (annotate) - [select for diffs]
Thu Oct 9 16:24:19 2003 UTC (20 years, 7 months ago) by pajs
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 , to selected 1.1
Tab problem in a fprintf and actually turn on the new command line options ;)

Revision 1.3 - (view) (annotate) - [select for diffs]
Thu Oct 9 16:08:16 2003 UTC (20 years, 7 months ago) by pajs
Branch: MAIN
Changes since 1.2: +25 -0 lines
Diff to previous 1.2 , to selected 1.1
Added some usage flags, and a -v for version and -h for help.

Revision 1.2 - (view) (annotate) - [select for diffs]
Thu Oct 9 16:00:31 2003 UTC (20 years, 7 months ago) by tdb
Branch: MAIN
Changes since 1.1: +29 -0 lines
Diff to previous 1.1
Standard header, plus make it include the right curses.h dependent on
what the configure system finds.

Revision 1.1 - (view) (annotate) - [selected]
Thu Oct 9 15:57:05 2003 UTC (20 years, 7 months ago) by pajs
Branch: MAIN
First release of saidar. This version works on all platforms, using ncurses
fine. Bugs exist when linked against the solaris curses. (E.g. if while
running saidar you hammer a key repeatedly, the screen no longer updates.
This only happens with the solaris curses however)

Saidar takes a single optional flag, "-d" and an argument of the delay in
seconds. e.g.

saidar -d 1

Will update the screen once a second (the fastest allowed update time). The
default update it every 3 seconds. However, if you press any other key, it
will update immidiately (unless its less than 1 second, in which case it will
update at the earlist available time)

Convenience Links

Links to HEAD: (view) (annotate) Links to LIBSTATGRAB_0_11: (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