sysfence-commit Mailing List for sysfence (Page 3)
Status: Alpha
Brought to you by:
emes
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
(2) |
Apr
(3) |
May
(99) |
Jun
(45) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Michal S. <em...@us...> - 2004-06-03 22:01:08
|
Update of /cvsroot/sysfence/sysfence/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25511 Modified Files: Makefile Added Files: users.c users.h Log Message: + username <-> uid translation Index: Makefile =================================================================== RCS file: /cvsroot/sysfence/sysfence/sys/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 26 May 2004 17:30:41 -0000 1.1 +++ Makefile 3 Jun 2004 22:00:42 -0000 1.2 @@ -8,14 +8,16 @@ $(CC) -c $(CFLAGS) communication.c -o communication.o $(CC) -c $(CFLAGS) processtitle.c -o processtitle.o $(CC) -c $(CFLAGS) sighandlers.c -o sighandlers.o + $(CC) -c $(CFLAGS) users.c -o users.o debug: - gcc -c -ggdb -DDEBUG exit.c -o exit.o - gcc -c -ggdb -DDEBUG log.c -o log.o - gcc -c -ggdb -DDEBUG xalloc.c -o xalloc.o - gcc -c -ggdb -DDEBUG communication.c -o communication.o - gcc -c -ggdb -DDEBUG processtitle.c -o processtitle.o - gcc -c -ggdb -DDEBUG sighandlers.c -o sighandlers.o + $(CC) -c -ggdb -DDEBUG exit.c -o exit.o + $(CC) -c -ggdb -DDEBUG log.c -o log.o + $(CC) -c -ggdb -DDEBUG xalloc.c -o xalloc.o + $(CC) -c -ggdb -DDEBUG communication.c -o communication.o + $(CC) -c -ggdb -DDEBUG processtitle.c -o processtitle.o + $(CC) -c -ggdb -DDEBUG sighandlers.c -o sighandlers.o + $(CC) -c -ggdb -DDEBUG users.c -o users.o clean: rm -f *.o --- NEW FILE: users.h --- /* copyright (c) 2004, Michal Salaban <em...@pl...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation (see file COPYING for details). You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. $Id: users.h,v 1.1 2004/06/03 22:00:43 emes Exp $ */ uid_t * username2uid (char *name); char * uid2username (uid_t uid); /* $Id: users.h,v 1.1 2004/06/03 22:00:43 emes Exp $ */ --- NEW FILE: users.c --- /* copyright (c) 2004, Michal Salaban <em...@pl...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation (see file COPYING for details). You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. $Id: users.c,v 1.1 2004/06/03 22:00:42 emes Exp $ */ #include <sys/types.h> #include <pwd.h> #include <stdio.h> #include <string.h> #include "xalloc.h" #include "users.h" uid_t * username2uid (char *name) { struct passwd *p = getpwnam (name); uid_t *b; if (!p) return NULL; b = (uid_t *) xalloc (NULL, sizeof (uid_t)); *b = p->pw_uid; return b; } char * uid2username (uid_t uid) { struct passwd *p = getpwuid (uid); char *b; if (!p) return NULL; b = (char *) xalloc (NULL, strlen (p->pw_name) + 1); strcpy (b, p->pw_name); return b; } /* $Id: users.c,v 1.1 2004/06/03 22:00:42 emes Exp $ */ |
|
From: Michal S. <em...@us...> - 2004-06-01 13:46:50
|
Update of /cvsroot/sysfence/sysfence/dokprojektlic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23085 Modified Files: abstract.tex Log Message: * typo Index: abstract.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/abstract.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- abstract.tex 31 May 2004 08:39:06 -0000 1.4 +++ abstract.tex 1 Jun 2004 13:46:41 -0000 1.5 @@ -1,4 +1,4 @@ -\abstract{Praca ta stanowi dokumentacjê do zdania rozwi±zanego +\abstract{Praca ta stanowi dokumentacjê do zadania rozwi±zanego w ramach projektu licencjackiego. Celem zadania by³o zaprojektowanie i implementacja programu \emph{sysfence}. Aplikacja ta jest narzêdziem |
|
From: Michal S. <em...@us...> - 2004-05-31 14:10:36
|
Update of /cvsroot/sysfence/sysfence In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9425 Modified Files: conditions.c datastruct.c datastruct.h getstats.c mainloop.c Log Message: * BUGFIX: using long long int to avoid type overflow Index: datastruct.h =================================================================== RCS file: /cvsroot/sysfence/sysfence/datastruct.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- datastruct.h 31 May 2004 11:59:29 -0000 1.8 +++ datastruct.h 31 May 2004 14:10:06 -0000 1.9 @@ -166,8 +166,8 @@ typedef struct { // Statistics of underlying filesystem in path - char *path; - unsigned long int val[ VA_LAST ]; + char *path; + unsigned long long int val[ VA_LAST ]; } sf_fs_stat; typedef struct { @@ -179,8 +179,8 @@ typedef struct { // Main statistics database double load[3]; - long int mem[ VA_LAST ]; - long int swap[ VA_LAST ]; + long long int mem[ VA_LAST ]; + long long int swap[ VA_LAST ]; sf_list *fs; // list of filesystems being watched int nr_proc; // number of process entries in array sf_proc_stat *proc; // array of processes Index: getstats.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/getstats.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- getstats.c 31 May 2004 11:59:29 -0000 1.18 +++ getstats.c 31 May 2004 14:10:06 -0000 1.19 @@ -37,7 +37,7 @@ #ifdef DEBUG syslog (LOG_DEBUG, - "get_stat_fs(%s): total = %ld, used = %ld, free = %ld, avail = %ld", + "get_stat_fs(%s): total = %llu, used = %llu, free = %llu, avail = %llu", def->arg[1].path, fs->val[VA_TOTAL], fs->val[VA_USED], @@ -147,7 +147,7 @@ void fetch_mem (sf_database *db) { char *ptr; - long int vmtot, vmused, vmbuf, vmcache; + long long int vmtot, vmused, vmbuf, vmcache; lseek (memfha, 0, SEEK_SET); read (memfha, (char *) &fbuf, BUFSIZE); @@ -156,10 +156,10 @@ /* 1. memory total is in second line after 'Mem:\ *' */ ptr = fto_notspace (fto_space (fto_newline ((char *)&fbuf))); - vmtot = atol (ptr); + vmtot = atoll (ptr); /* 2. used mem is next value */ ptr = fto_notspace (fto_space (ptr)); - vmused = atol (ptr); + vmused = atoll (ptr); /* 3. then there are: 'free' field, 'shared' field, * and what we're looking for - buffers */ @@ -168,22 +168,22 @@ fto_notspace (fto_space (ptr)) )) )); - vmbuf = atol (ptr); + vmbuf = atoll (ptr); /* 4. cached is next field */ ptr = fto_notspace (fto_space (ptr)); - vmcache = atol (ptr); + vmcache = atoll (ptr); /* 5. next line, swap values. first is 'Swap:', then total. */ ptr = fto_notspace (fto_space (fto_newline (ptr))); - db->swap[VA_TOTAL] = atol (ptr); + db->swap[VA_TOTAL] = atoll (ptr); /* 6. next one is swap-used */ ptr = fto_notspace (fto_space (ptr)); - db->swap[VA_USED] = atol (ptr); + db->swap[VA_USED] = atoll (ptr); /* 7. swap-free */ ptr = fto_notspace (fto_space (ptr)); - db->swap[VA_FREE] = atol (ptr); + db->swap[VA_FREE] = atoll (ptr); db->swap[VA_AVAIL] = db->swap[VA_FREE]; /* calculate real values, i.e. substract buffers and cache size */ @@ -209,17 +209,18 @@ statfs (fs->path, &buf); /* block size in KB */ - bsizeKB = buf.f_bsize / 1024; +// bsizeKB = buf.f_bsize / 1024; /* sizes are in kilobytes */ - fs->val[VA_TOTAL] = buf.f_blocks * bsizeKB; - fs->val[VA_AVAIL] = buf.f_bavail * bsizeKB; - fs->val[VA_FREE] = buf.f_bfree * bsizeKB; - fs->val[VA_USED] = (buf.f_blocks - buf.f_bfree) * bsizeKB; + fs->val[VA_TOTAL] = (long long int) buf.f_blocks * (long long int) buf.f_bsize; + fs->val[VA_AVAIL] = (long long int) buf.f_bavail * (long long int) buf.f_bsize; + fs->val[VA_FREE] = (long long int) buf.f_bfree * (long long int) buf.f_bsize; + fs->val[VA_USED] = + ((long long int) buf.f_blocks - (long long int) buf.f_bfree) * (long long int) buf.f_bsize; #ifdef DEBUG syslog (LOG_DEBUG, - "fetch_pathspace(): path %s bsize=%ld btotal=%ld bfree=%ld bavail=%ld", + "fetch_pathspace(): path %s bsize=%lu btotal=%lu bfree=%lu bavail=%lu", fs->path, buf.f_bsize, buf.f_blocks, @@ -227,7 +228,7 @@ buf.f_bavail ); syslog (LOG_DEBUG, - "fetch_pathspace(): path %s total=%luk used=%luk free=%luk avail=%luk", + "fetch_pathspace(): path %s total=%lld used=%lld free=%lld avail=%lld", fs->path, fs->val[VA_TOTAL], fs->val[VA_USED], @@ -240,7 +241,7 @@ void fetch_fs (sf_database *db) { sf_list *hd = db->fs; - sf_fs_stat *fs; + sf_fs_stat *fs; // Iterate through list of watched paths while (hd) { @@ -299,7 +300,7 @@ DIR *dh; struct dirent *de; struct stat statbuf; - long int pid; + long long int pid; char fnamebuf[ PROCDIRNAMELEN + 1 ]; sf_proc_stat res; @@ -317,12 +318,12 @@ if (de->d_type != DT_DIR) continue; /* try to convert file name to int */ - pid = atol (de->d_name); + pid = atoll (de->d_name); /* zero means it's not a process' dir */ if (!pid) continue; /* get real dir name */ - snprintf (&fnamebuf[0], PROCDIRNAMELEN, "%s/%ld", procdir, pid); + snprintf (&fnamebuf[0], PROCDIRNAMELEN, "%s/%llu", procdir, pid); stat (&fnamebuf[0], &statbuf); res.uid = statbuf.st_uid; res.state = get_proc_state (db, &fnamebuf[0]); @@ -357,7 +358,7 @@ close (fh); - syslog (LOG_NOTICE, "maximum number of threads in system: %ld", mt); + syslog (LOG_NOTICE, "maximum number of threads in system: %d", mt); return mt; } Index: conditions.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/conditions.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- conditions.c 26 May 2004 18:23:04 -0000 1.7 +++ conditions.c 31 May 2004 14:10:06 -0000 1.8 @@ -19,6 +19,9 @@ #include "datastruct.h" #include "getstats.h" #include "conditions.h" +#ifdef DEBUG +#include <syslog.h> +#endif int ordcmp (int le, int eq, int gt, token op) { @@ -57,13 +60,22 @@ sf_value val = get_stat_value (&(at->stat)); double dv = *((double *) val.ptr), dt = *((double *) at->thresh.ptr); - long int iv = *((long int *) val.ptr), - it = *((long int *) at->thresh.ptr); + long long int iv = *((long long int *) val.ptr), + it = *((long long int *) at->thresh.ptr); if (at->thresh.type != val.type) bail_out (EXIT_BUG, "check_atomic(): type mismatch!"); switch (at->thresh.type) { case DOUBLE: +#ifdef DEBUG + syslog (LOG_DEBUG, + "cmp val=%f vs thr=%f: <:%d =:%d >:%d", + dv, dt, + (dv < dt), + (dv == dt), + (dv > dt) + ); +#endif return ordcmp ( (dv < dt), (dv == dt), @@ -71,6 +83,15 @@ at->op ); case INTEGER: +#ifdef DEBUG + syslog (LOG_DEBUG, + "cmp val=%llu vs thr=%llu: <:%d =:%d >:%d", + iv, it, + (iv < it), + (iv == it), + (iv > it) + ); +#endif return ordcmp ( (iv < it), (iv == it), Index: datastruct.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/datastruct.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- datastruct.c 31 May 2004 11:59:29 -0000 1.7 +++ datastruct.c 31 May 2004 14:10:06 -0000 1.8 @@ -158,7 +158,7 @@ /* do not insert duplicates */ #ifdef DEBUG - syslog (LOG_DEBUG, "? %s == %s", e->path, path); + syslog (LOG_DEBUG, "? %s == %s : %d", e->path, path, strcmp (e->path, path)); #endif if (strcmp (e->path, path) == 0) return; @@ -207,7 +207,7 @@ case ST_FS: return ((d1->arg[0].resstat == d2->arg[0].resstat) && - strcmp (d1->arg[1].path, d2->arg[1].path)); + (strcmp (d1->arg[1].path, d2->arg[1].path) == 0)); case ST_PROC: return ((d1->arg[1].procstates == d2->arg[1].procstates) && Index: mainloop.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/mainloop.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- mainloop.c 31 May 2004 10:30:33 -0000 1.14 +++ mainloop.c 31 May 2004 14:10:06 -0000 1.15 @@ -92,7 +92,7 @@ fetch_la (db); fetch_mem (db); fetch_fs (db); - fetch_proc (db); +// fetch_proc (db); semaphore_post (semid); signals_handling (SIGUNBLOCK); |
|
From: Michal S. <em...@us...> - 2004-05-31 14:10:22
|
Update of /cvsroot/sysfence/sysfence/parseopt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9425/parseopt Modified Files: lex.c parse.c Log Message: * BUGFIX: using long long int to avoid type overflow Index: lex.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/parseopt/lex.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- lex.c 26 May 2004 17:54:53 -0000 1.10 +++ lex.c 31 May 2004 14:10:06 -0000 1.11 @@ -193,10 +193,11 @@ void * get_int () { - long int *res = (long int *) xalloc (NULL, sizeof (long int)); - char *endptr; + long long int *res = + (long long int *) xalloc (NULL, sizeof (long long int)); + char *endptr; - *res = strtol (lexptr, &endptr, 10); + *res = strtoll (lexptr, &endptr, 10); if (isdelim (*endptr) && (! errno)) { lexptr = endptr; return (void *) res; @@ -223,11 +224,11 @@ void * get_size () { - long int *res = (long int *) xalloc (NULL, sizeof (long int)); - long int mult; - char *endptr; + long long int *res = (long long int *) xalloc (NULL, sizeof (long long int)); + long int mult; + char *endptr; - *res = strtol (lexptr, &endptr, 10); + *res = strtoll (lexptr, &endptr, 10); if (errno) return NULL; /* size in bytes */ Index: parse.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/parseopt/parse.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- parse.c 28 May 2004 23:29:10 -0000 1.16 +++ parse.c 31 May 2004 14:10:06 -0000 1.17 @@ -402,7 +402,7 @@ /* long int 2 double */ val->type = VA_DBL; tmp = xalloc (NULL, sizeof (double)); - *tmp = (double) *((long int *) val->val); + *tmp = (double) *((long long int *) val->val); free (val->val); val->val = tmp; } |
|
From: Michal S. <em...@us...> - 2004-05-31 14:09:18
|
Update of /cvsroot/sysfence/sysfence/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9234/sys Modified Files: log.c log.h Log Message: * start logging before parsing, to allow debug messages to appear Index: log.h =================================================================== RCS file: /cvsroot/sysfence/sysfence/sys/log.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- log.h 26 May 2004 17:30:42 -0000 1.1 +++ log.h 31 May 2004 14:09:08 -0000 1.2 @@ -17,7 +17,7 @@ #define LOGLINEBUF 256 #define LOGVARBUF 64 -void log_start (int rules); +void log_start (); void log_rulehit (sf_rule *rule); void log_end (); Index: log.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/sys/log.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- log.c 28 May 2004 23:25:18 -0000 1.2 +++ log.c 31 May 2004 14:09:08 -0000 1.3 @@ -55,7 +55,7 @@ switch (val.type) { case INTEGER: - snprintf (thisbuf, STRBUF, "%s = %ld", defbuf, *((long int *) val.ptr)); + snprintf (thisbuf, STRBUF, "%s = %llu", defbuf, *((long long int *) val.ptr)); break; case DOUBLE: snprintf (thisbuf, STRBUF, "%s = %.2f", defbuf, *((double *) val.ptr)); @@ -78,13 +78,11 @@ } else return thisbuf; } -void log_start (int rules) +void log_start () { openlog ("sysfence", LOG_NDELAY | LOG_PID | LOG_CONS, LOG_DAEMON); - - syslog (LOG_INFO, "loaded %d rules", rules); } void log_rulehit (sf_rule *rule) |
|
From: Michal S. <em...@us...> - 2004-05-31 14:09:17
|
Update of /cvsroot/sysfence/sysfence In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9234 Modified Files: sysfence.c Log Message: * start logging before parsing, to allow debug messages to appear Index: sysfence.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/sysfence.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- sysfence.c 31 May 2004 11:59:29 -0000 1.24 +++ sysfence.c 31 May 2004 14:09:07 -0000 1.25 @@ -60,6 +60,8 @@ #endif if (argc < 2) bail_out (EXIT_NOCONF, NULL); + + log_start (); /* empty list */ tmp_fs_db = NULL; @@ -71,8 +73,7 @@ /* count rules */ rulecount = 0; while (*(ruletab + rulecount) != NULL) rulecount ++; - - log_start (rulecount); + syslog (LOG_INFO, "loaded %d rules", rulecount); /* open files for reading data and detach from console */ open_files (); |
|
From: Michal S. <em...@us...> - 2004-05-31 13:50:49
|
Update of /cvsroot/sysfence/sysfence/parseopt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5569 Removed Files: parseopt.c parseopt.h Log Message: - removed obsolete files --- parseopt.h DELETED --- --- parseopt.c DELETED --- |
|
From: Michal S. <em...@us...> - 2004-05-31 11:59:41
|
Update of /cvsroot/sysfence/sysfence In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17725 Modified Files: datastruct.c datastruct.h getstats.c getstats.h sysfence.c Log Message: + debugging info Index: getstats.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/getstats.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- getstats.c 31 May 2004 10:30:33 -0000 1.17 +++ getstats.c 31 May 2004 11:59:29 -0000 1.18 @@ -22,17 +22,13 @@ #include <sys/vfs.h> #include <dirent.h> #include <sys/stat.h> +#include <syslog.h> #include "sys/xalloc.h" #include "sys/exit.h" #include "parseopt/lex.h" #include "datastruct.h" #include "getstats.h" -#ifdef DEBUG -#include <syslog.h> -#include "sys/log.h" -#endif - sf_value get_stat_fs (sf_stat_def *def, sf_list *fslist) { sf_value res; @@ -119,6 +115,7 @@ } const char *procdir = "/proc"; +const char *maxtfile = "/proc/sys/kernel/threads-max"; const char *lafile = "/proc/loadavg"; int lafha; const char *memfile = "/proc/meminfo"; @@ -208,21 +205,29 @@ void fetch_pathspace (sf_fs_stat *fs) { struct statfs buf; - long int bsizeKB; statfs (fs->path, &buf); /* block size in KB */ bsizeKB = buf.f_bsize / 1024; - + + /* sizes are in kilobytes */ fs->val[VA_TOTAL] = buf.f_blocks * bsizeKB; fs->val[VA_AVAIL] = buf.f_bavail * bsizeKB; fs->val[VA_FREE] = buf.f_bfree * bsizeKB; fs->val[VA_USED] = (buf.f_blocks - buf.f_bfree) * bsizeKB; - + #ifdef DEBUG syslog (LOG_DEBUG, - "fetch_pathspace(): path %s total=%d used=%d free=%d available=%d\n", + "fetch_pathspace(): path %s bsize=%ld btotal=%ld bfree=%ld bavail=%ld", + fs->path, + buf.f_bsize, + buf.f_blocks, + buf.f_bfree, + buf.f_bavail + ); + syslog (LOG_DEBUG, + "fetch_pathspace(): path %s total=%luk used=%luk free=%luk avail=%luk", fs->path, fs->val[VA_TOTAL], fs->val[VA_USED], @@ -340,6 +345,24 @@ if (memfha < 0) bail_out (EXIT_IO, memfile); } +long int get_max_threads () +{ + int fh = open (maxtfile, O_RDONLY); + int mt; + + if (fh < 0) bail_out (EXIT_IO, maxtfile); + read (fh, &fbuf[0], BUFSIZE); + + mt = atol (&fbuf[0]); + + close (fh); + + syslog (LOG_NOTICE, "maximum number of threads in system: %ld", mt); + + return mt; +} + + /* fast text parsing helpers */ char * fto_newline (char *b) Index: datastruct.h =================================================================== RCS file: /cvsroot/sysfence/sysfence/datastruct.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- datastruct.h 31 May 2004 10:30:32 -0000 1.7 +++ datastruct.h 31 May 2004 11:59:29 -0000 1.8 @@ -166,8 +166,8 @@ typedef struct { // Statistics of underlying filesystem in path - char *path; - long int val[ VA_LAST ]; + char *path; + unsigned long int val[ VA_LAST ]; } sf_fs_stat; typedef struct { Index: getstats.h =================================================================== RCS file: /cvsroot/sysfence/sysfence/getstats.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- getstats.h 31 May 2004 10:30:33 -0000 1.10 +++ getstats.h 31 May 2004 11:59:29 -0000 1.11 @@ -17,8 +17,6 @@ #define BUFSIZE 512 #define PROCDIRNAMELEN 25 -#define PROC_DATA_SIZE 524288 // 512k - /* shared memory segments */ int db_shmid, fs_shmid, proc_shmid, rules_shmid; void *db_shm, *fs_shm, *proc_shm, *rules_shm; @@ -36,6 +34,8 @@ void fetch_fs (sf_database *db); void fetch_proc (sf_database *db); +long int get_max_threads (); + void open_files (); char * fto_newline (char *b); Index: datastruct.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/datastruct.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- datastruct.c 30 May 2004 18:23:33 -0000 1.6 +++ datastruct.c 31 May 2004 11:59:29 -0000 1.7 @@ -27,6 +27,13 @@ void add_proc_entry_to_array (sf_database *db, sf_proc_stat *proc) { sf_proc_stat *arr = db->proc; + +#ifdef DEBUG + syslog (LOG_DEBUG, + "add_proc_entry_to_array: uid=%d, state=%d", + proc->uid, + proc->state); +#endif // go to end of array arr += db->nr_proc; Index: sysfence.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/sysfence.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- sysfence.c 29 May 2004 08:26:20 -0000 1.23 +++ sysfence.c 31 May 2004 11:59:29 -0000 1.24 @@ -112,7 +112,7 @@ } /* initialize shared memory for proc database */ - proc_shmid = shared_mem_init (PROC_DATA_SIZE); + proc_shmid = shared_mem_init (get_max_threads () * sizeof (sf_proc_stat)); if (proc_shmid < 0) bail_out (EXIT_SHM, NULL); proc_shm = shared_mem_attach (proc_shmid); |
|
From: Michal S. <em...@us...> - 2004-05-31 10:30:45
|
Update of /cvsroot/sysfence/sysfence In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2754 Modified Files: datastruct.h getstats.c getstats.h mainloop.c Log Message: + functions fetching proc data Index: getstats.h =================================================================== RCS file: /cvsroot/sysfence/sysfence/getstats.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- getstats.h 28 May 2004 23:27:32 -0000 1.9 +++ getstats.h 31 May 2004 10:30:33 -0000 1.10 @@ -14,7 +14,8 @@ /* $Id$ */ -#define BUFSIZE 512 +#define BUFSIZE 512 +#define PROCDIRNAMELEN 25 #define PROC_DATA_SIZE 524288 // 512k Index: getstats.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/getstats.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- getstats.c 30 May 2004 18:23:33 -0000 1.16 +++ getstats.c 31 May 2004 10:30:33 -0000 1.17 @@ -20,6 +20,8 @@ #include <fcntl.h> #include <string.h> #include <sys/vfs.h> +#include <dirent.h> +#include <sys/stat.h> #include "sys/xalloc.h" #include "sys/exit.h" #include "parseopt/lex.h" @@ -116,6 +118,7 @@ return res; } +const char *procdir = "/proc"; const char *lafile = "/proc/loadavg"; int lafha; const char *memfile = "/proc/meminfo"; @@ -243,8 +246,87 @@ } } +char get_proc_state (sf_database *db, char *dir) +{ + char fnamebuf[ PROCDIRNAMELEN + 1 ]; + int statfha; + char state; + char *ptr = &fbuf[0]; + + snprintf (&fnamebuf[0], PROCDIRNAMELEN, "%s/status", dir); + statfha = open (&fnamebuf[0], O_RDONLY); + + /* cannot open file? process state is unknown for us */ + if (statfha < 0) return PROC_UNKNOWN; + else { + read (statfha, ptr, BUFSIZE); + /* second line looks like this: + * + * Status: L + * + * where L is letter indicating process' state + */ + ptr = fto_notspace (fto_space (fto_newline (ptr))); + switch (*ptr) { + case 'R': + state = PROC_RUN; + break; + case 'S': + state = PROC_SLEEP; + break; + case 'Z': + state = PROC_ZOMBIE; + break; + case 'T': + case 'D': + state = PROC_STOP; + break; + default: + state = PROC_UNKNOWN; + } + close (statfha); + } + return state; +} + void fetch_proc (sf_database *db) { + DIR *dh; + struct dirent *de; + struct stat statbuf; + long int pid; + char fnamebuf[ PROCDIRNAMELEN + 1 ]; + sf_proc_stat res; + + /* reset db */ + db->nr_proc = 0; + + dh = opendir (procdir); + if (!dh) bail_out (EXIT_IO, procdir); + + while (1) { + de = readdir (dh); + if (!de) return; + + /* check only dirs */ + if (de->d_type != DT_DIR) continue; + + /* try to convert file name to int */ + pid = atol (de->d_name); + /* zero means it's not a process' dir */ + if (!pid) continue; + + /* get real dir name */ + snprintf (&fnamebuf[0], PROCDIRNAMELEN, "%s/%ld", procdir, pid); + stat (&fnamebuf[0], &statbuf); + res.uid = statbuf.st_uid; + res.state = get_proc_state (db, &fnamebuf[0]); + + /* add process */ + add_proc_entry_to_array (db, &res); + } + + closedir (dh); return; } Index: mainloop.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/mainloop.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- mainloop.c 28 May 2004 20:36:50 -0000 1.13 +++ mainloop.c 31 May 2004 10:30:33 -0000 1.14 @@ -92,6 +92,7 @@ fetch_la (db); fetch_mem (db); fetch_fs (db); + fetch_proc (db); semaphore_post (semid); signals_handling (SIGUNBLOCK); Index: datastruct.h =================================================================== RCS file: /cvsroot/sysfence/sysfence/datastruct.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- datastruct.h 30 May 2004 18:23:33 -0000 1.6 +++ datastruct.h 31 May 2004 10:30:32 -0000 1.7 @@ -38,7 +38,8 @@ #define PROC_SLEEP 2 #define PROC_STOP 4 #define PROC_ZOMBIE 8 -#define PROC_ANY 15 +#define PROC_UNKNOWN 16 +#define PROC_ANY 31 /*************************************************************************** All-purpose list |
|
From: Michal S. <em...@us...> - 2004-05-31 10:29:22
|
Update of /cvsroot/sysfence/sysfence/dokprojektlic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2625 Added Files: tabele.tex Log Message: + tabele i rysunki do za³±cznika --- NEW FILE: tabele.tex --- \section{Tabele i ryciny} \begin{table}[ht] \centering \caption{Komunikacja z \texttt{sffetch}} \begin{tabular}{|c|p{8cm}|} \hline \label{tab:sffetch} \textbf{Sygna³} & \multicolumn{1}{p{8cm}|}{\centering \textbf{Reakcja}} \\ \hline \texttt{SIGUSR1} & zatrzymuje proces \texttt{sffetch} i wszystkie \texttt{sfwatch}\\ \hline \texttt{SIGCONT} & wznawia wszystkie procesy\\ \hline \texttt{SIGTERM} & poprawnie koñczy prace programu: wysy³a \texttt{SIGTERM} do wszystkich dzia³aj±cych procesów \texttt{sfwatch} oraz zwalnia wszystkie zasoby (w szczególno¶ci IPC) \\ \hline \end{tabular} \end{table} %% \begin{table}[ht] \centering \caption{Komunikacja z \texttt{sffwatch}} \begin{tabular}{|c|p{8cm}|} \hline \label{tab:sfwatch} \textbf{Sygna³} & \multicolumn{1}{p{8cm}|}{\centering \textbf{Reakcja}} \\ \hline \texttt{SIGUSR1} & zatrzymuje monitorowanie regu³y \\ \hline \texttt{SIGCONT} & wznawia monitorowanie regu³y\\ \hline \texttt{SIGTERM} & poprawnie koñczy monitorowanie regu³y, pozosta³e regu³y s± nadal monitorowane\\ \hline \end{tabular} \end{table} %% \begin{table}[ht] \centering \caption{Podzia³ na modu³y} \begin{tabular}{|l|l|p{7cm}|} \hline \label{tab:moduly} \centering \textbf{Katalog} & \textbf{Nazwa modu³u} & \multicolumn{1}{p{7cm}|}{\centering \textbf{Funkcja}}\\ \hline / & sysfence & g³ówny modu³ aplikacji (zwiera funkcjê \textit{main}); wczytanie regu³ z plików konfiguracyjnych; inicjalizacja zasobów IPC (pamiêæ dzielona, semafor); utworzenie procesów potomnych\\ \cline{2-3} & mainloop & zawiera dwie funkcje: \textit{rule\_watch\_loop} i \textit{res\_probe\_loop} s± to g³ówne funkcje procesów ¶ledz±cych regu³y i zasoby systemu; ka¿da z funkcji zwiera nieskoñczon± pêtlê\\ \cline{2-3} & datastruct & definicja struktur danych i podstawowych funkcji na nich operuj±cych\\ \cline{2-3} & getstats & funkcje pobieraj±ce z systemu informacje o zasobach\\ \cline{2-3} & conditions & funkcje sprawdzaj±ce warunki w regu³ach\\ \cline{2-3} & cp2memory & funkcje kopiuj±ce struktury danych (regu³y) do pamiêci dzielonej\\ \hline parseopt/ & confread & wczytanie regu³ z plików\\ \cline{2-3} & lex & przetwarza plik tekstowy z konfiguracj± na strukturê tokenów\\ \cline{2-3} & parse & tworzy regu³y\\ \cline{2-3} & parseopt & rozpoznaje i zapisuje sta³e tekstowe i numeryczne z pliku tekstowego\\ \hline sys/ & communiaction & obs³uga komunikacji IPC, funkcje do przydzielania/zwalniania pamiêci dzielonej i semaforów\\ \cline{2-3} & sighandlers & funkcje obs³ugi i blokowania sygna³ów\\ \cline{2-3} & processtitle & zmiana nazw procesów wy¶wietlanych przez \texttt{ps wux}\\ \cline{2-3} & log & logowanie danych\\ \cline{2-3} & exit & funkcja koñcz±c± wykonywanie procesu \textit{bail\_out}; definicja kodów wyj¶ciowych\\ \cline{2-3} & xalloc & pomocnicza funkcja do alokacji pamiêci\\ \hline \end{tabular} \end{table} %% \begin{figure} \label{ryc_przeplyw} %\begin{center} \includegraphics[angle=90,height=\textheight,width=\textwidth]{przeplyw.eps} \caption{Przep³yw danych} %\end{center} \end{figure} |
|
From: Michal S. <em...@us...> - 2004-05-31 10:28:57
|
Update of /cvsroot/sysfence/sysfence/dokprojektlic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2464 Modified Files: main.tex speckonstrukcyjna.tex specuzytkownika.tex Log Message: + przeformatowanie Index: speckonstrukcyjna.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/speckonstrukcyjna.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- speckonstrukcyjna.tex 31 May 2004 08:53:50 -0000 1.5 +++ speckonstrukcyjna.tex 31 May 2004 10:28:48 -0000 1.6 @@ -8,40 +8,8 @@ \texttt{-O2} kompilatora. \subsection{Modu³y} -W tablicy~\ref{tab:moduly} zamieszczamy podzia³ aplikacji na modu³y i ich -funkcje. - -\begin{table}[ht] -\centering -\caption{Podzia³ na modu³y} -\begin{tabular}{|l|l|p{7cm}|} \hline \label{tab:moduly} -\centering \textbf{Katalog} & \textbf{Nazwa modu³u} & \multicolumn{1}{p{7cm}|}{\centering \textbf{Funkcja}}\\ \hline -/ & sysfence & g³ówny modu³ aplikacji (zwiera funkcjê \textit{main}); wczytanie regu³ z plików konfiguracyjnych; - inicjalizacja zasobów IPC (pamiêæ dzielona, semafor); utworzenie - procesów potomnych\\ \cline{2-3} - & mainloop & zawiera dwie funkcje: \textit{rule\_watch\_loop} i \textit{res\_probe\_loop} - s± to g³ówne funkcje procesów ¶ledz±cych regu³y i zasoby systemu; - ka¿da z funkcji zwiera nieskoñczon± pêtlê\\ \cline{2-3} - & datastruct & definicja struktur danych i podstawowych funkcji na nich - operuj±cych\\ \cline{2-3} - & getstats & funkcje pobieraj±ce z systemu informacje o zasobach\\ \cline{2-3} - & conditions & funkcje sprawdzaj±ce warunki w regu³ach\\ \cline{2-3} - & cp2memory & funkcje kopiuj±ce struktury danych (regu³y) do pamiêci dzielonej\\ \hline -parseopt/ & confread & wczytanie regu³ z plików\\ \cline{2-3} - & lex & przetwarza plik tekstowy z konfiguracj± - na strukturê tokenów\\ \cline{2-3} - & parse & tworzy regu³y\\ \cline{2-3} - & parseopt & rozpoznaje i zapisuje sta³e tekstowe i numeryczne z pliku tekstowego\\ \hline -sys/ & communiaction & obs³uga komunikacji IPC, funkcje do przydzielania/zwalniania - pamiêci dzielonej i semaforów\\ \cline{2-3} - & sighandlers & funkcje obs³ugi i blokowania sygna³ów\\ \cline{2-3} - & processtitle & zmiana nazw procesów wy¶wietlanych przez \texttt{ps wux}\\ \cline{2-3} - & log & logowanie danych\\ \cline{2-3} - & exit & funkcja koñcz±c± wykonywanie procesu \textit{bail\_out}; definicja kodów - wyj¶ciowych\\ \cline{2-3} - & xalloc & pomocnicza funkcja do alokacji pamiêci\\ \hline -\end{tabular}\end{table} - +W tablicy~\ref{tab:moduly} (strona \pageref{tab:moduly}) zamieszczamy +podzia³ aplikacji na modu³y i ich funkcje. \subsection{Przep³yw danych} @@ -53,9 +21,6 @@ dzielonej. \emph{sffetch} ma tak¿e mo¿liwo¶æ kierowania prac± procesów potomnych za pomoc± sygna³ów (patrz strona \pageref{sygnaly}). -\begin{figure} -\begin{center} - \includegraphics[scale=0.8,width=\textwidth]{przeplyw.eps} -\end{center} -\end{figure} +Przep³yw danych zilustrowany jest na rycinie~\ref{ryc_przeplyw} (strona +\pageref{ryc_przeplyw}). Index: specuzytkownika.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/specuzytkownika.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- specuzytkownika.tex 31 May 2004 08:53:50 -0000 1.6 +++ specuzytkownika.tex 31 May 2004 10:28:48 -0000 1.7 @@ -34,35 +34,12 @@ \label{sygnaly} Komunikacja z procesami odbywa siê za pomoc± sygna³ów. Przydatne sygna³y -zamieszczone s± w tablicach~\ref{tab:s1} i~\ref{tab:s2}. +zamieszczone s± w tablicach~\ref{tab:sffetch} i~\ref{tab:sfwatch} (strona +\pageref{tab:sffetch}). Pos³uguj±c siê sygna³ami mo¿na tymczasowo wstrzymaæ sprawdzanie ca³o¶ci lub pojedynczych regu³, a nastêpnie je wznowiæ bez konieczno¶ci wprowadzania zmian do plików konfiguracyjnych. -\begin{table}[ht] -\centering -\caption{Komunikacja z \texttt{sffetch}} -\begin{tabular}{|c|p{8cm}|} \hline \label{tab:s1} -\textbf{Sygna³} & \multicolumn{1}{p{8cm}|}{\centering \textbf{Reakcja}} \\ \hline -\texttt{SIGUSR1} & zatrzymuje proces \texttt{sffetch} i wszystkie - \texttt{sfwatch}\\ \hline -\texttt{SIGCONT} & wznawia wszystkie procesy\\ \hline -\texttt{SIGTERM} & poprawnie koñczy prace programu: wysy³a \texttt{SIGTERM} do wszystkich - dzia³aj±cych procesów \texttt{sfwatch} oraz zwalnia wszystkie zasoby - (w szczególno¶ci IPC) \\ \hline -\end{tabular} \end{table} - -\begin{table}[ht] -\centering -\caption{Komunikacja z \texttt{sffwatch}} -\begin{tabular}{|c|p{8cm}|} \hline \label{tab:s2} -\textbf{Sygna³} & \multicolumn{1}{p{8cm}|}{\centering \textbf{Reakcja}} \\ \hline -\texttt{SIGUSR1} & zatrzymuje monitorowanie regu³y \\ \hline -\texttt{SIGCONT} & wznawia monitorowanie regu³y\\ \hline -\texttt{SIGTERM} & poprawnie koñczy monitorowanie regu³y, pozosta³e - regu³y s± nadal monitorowane\\ \hline -\end{tabular} \end{table} - Nie zaleca siê wysy³ania sygna³ów \texttt{SIGSTOP} i \texttt{SIGKILL} gdy¿ mog± spowodowaæ zak³ócenia w pracy pozosta³ych procesów aplikacji. Index: main.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/main.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- main.tex 31 May 2004 08:53:50 -0000 1.7 +++ main.tex 31 May 2004 10:28:48 -0000 1.8 @@ -22,16 +22,20 @@ % tu dodawac rozdzialy: \input{wstep} +\newpage \input{specuzytkownika} +\newpage \input{wymagania} +\newpage \input{speckonstrukcyjna} +\newpage \input{testowanie} - +\newpage % appendix -%\appendix -%\input{appendix/a} +\appendix +\input{tabele} % bibliography %\input{bibliography} |
|
From: Michal S. <em...@us...> - 2004-05-31 08:54:01
|
Update of /cvsroot/sysfence/sysfence/dokprojektlic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18763 Modified Files: main.tex speckonstrukcyjna.tex specuzytkownika.tex Log Message: * poprawkesy Index: speckonstrukcyjna.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/speckonstrukcyjna.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- speckonstrukcyjna.tex 30 May 2004 22:35:51 -0000 1.4 +++ speckonstrukcyjna.tex 31 May 2004 08:53:50 -0000 1.5 @@ -2,9 +2,10 @@ Program zosta³ napisany w jêzyku C. Dokonuj±c wyboru jêzyka kierowali¶my siê przede wszystkim dostêpno¶ci± funkcji systemowych i mo¿liwo¶ciami -optymalizacji programu. Z za³o¿enia program -mia³ mo¿liwe ma³o obci±¿aæ system. Wy¿szy poziom optymalizacji kodu -uzyskali¶my przy pomocy flagi \texttt{-O2} kompilatora. +optymalizacji programu. Z za³o¿enia program mia³ mo¿liwe ma³o obci±¿aæ +system, by w razie potrzeby szybko podj±æ stosowne dzia³ania. +Wy¿szy poziom optymalizacji kodu uzyskali¶my przy pomocy flagi +\texttt{-O2} kompilatora. \subsection{Modu³y} W tablicy~\ref{tab:moduly} zamieszczamy podzia³ aplikacji na modu³y i ich @@ -54,7 +55,7 @@ \begin{figure} \begin{center} - \includegraphics[scale=1,width=\textwidth]{przeplyw.eps} + \includegraphics[scale=0.8,width=\textwidth]{przeplyw.eps} \end{center} \end{figure} Index: specuzytkownika.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/specuzytkownika.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- specuzytkownika.tex 30 May 2004 22:35:51 -0000 1.5 +++ specuzytkownika.tex 31 May 2004 08:53:50 -0000 1.6 @@ -3,11 +3,14 @@ \subsection{Kompilacja i uruchamianie programu} Kompilacja programu nastêpuje po wydaniu polecenia \texttt{make} w katalogu -zawieraj±cym ¼ród³a. Program uruchamiany jest poleceniem \texttt{sysfence} z -przynajmniej jednym argumentem wskazuj±cym na plik konfiguracyjny. -W przypadku gdy pliki konfiguracyjne -nie zawieraj± b³êdów sk³adniowych program przechodzi -do pracy jako demon. +zawieraj±cym ¼ród³a. Nastêpnie przy pomocy polecenia \texttt{make install} +mo¿na dokonaæ instalacji aplikacji w drzewie katalogów zgodnym ze +specyfikacj± \emph{FHS}. + +Program uruchamiany jest poleceniem \texttt{sysfence} z +conajmniej jednym argumentem wskazuj±cym na plik konfiguracyjny. +W przypadku gdy pliki konfiguracyjne nie zawieraj± b³êdów sk³adniowych program +przechodzi do pracy jako demon. \subsection{Komunikacja z programem} @@ -16,15 +19,17 @@ Informacje te udostêpniane s± procesom potomnym za pomoc± mechanizmów IPC. Ka¿dy proces otrzymuje swoj± nazwê. W przypadku procesu rodzicielskiego jest -to \texttt{sffetch}, a w przypadku procesów potomnych \texttt{sfwatch}. Nazwy procesów -dostêpne s± np. po wykonaniu polecenia -\texttt{ps wxu} w kolumnie \texttt{COMMAND}. Podstawowe nazwy wzbogacane s± -o dodatkowe informacje: +to \texttt{sffetch}, a w przypadku procesów potomnych \texttt{sfwatch}. +Nazwy procesów dostêpne s± np. po wykonaniu polecenia \texttt{ps wxu} w +kolumnie \texttt{COMMAND}. Podstawowe nazwy wzbogacane s± o dodatkowe +informacje: + \begin{itemize} \item \texttt{STOPPED} -- gdy proces zosta³ zatrzymany, \item \texttt{EXEC} -- gdy proces potomny wykonuje polecenie pow³oki, \item \texttt{'nazwa regu³y'} -- dla procesów potomnych. \end{itemize} + Informacje te umo¿liwiaj± okre¶lenie zadañ i stanów poszczególnych procesów. \label{sygnaly} @@ -33,6 +38,7 @@ Pos³uguj±c siê sygna³ami mo¿na tymczasowo wstrzymaæ sprawdzanie ca³o¶ci lub pojedynczych regu³, a nastêpnie je wznowiæ bez konieczno¶ci wprowadzania zmian do plików konfiguracyjnych. + \begin{table}[ht] \centering \caption{Komunikacja z \texttt{sffetch}} @@ -65,8 +71,9 @@ Konfiguracja programu wczytywana jest z plików. Plik konfiguracyjny sk³ada siê z regu³. Ka¿da regu³a sk³ada siê z trzech czê¶ci: nazwy, warunku i akcji. Przyk³adowy plik z regu³ami dostêpny w \texttt{doc/example.conf}. Plik dodatkowo -zawiera skrócony opis sk³adni jêzyka regu³. Poni¿ej zamieszczamy precyzyjny +zawiera skrócony opis sk³adni jêzyka regu³. Poni¿ej zamieszczamy orientacyjny opis gramatyki. + {\scriptsize \begin{verbatim} ruleset := rule [<string>] <block_expression> <rundata> [<logdata>] [<stepdata>] | rule [<string>] <block_expression> <logdata> [<rundata>] [<stepdata>] @@ -90,8 +97,10 @@ log_op := && | || comp_op := = | < | > | <= | >= | != \end{verbatim} } + Jest on dostêpny równie¿ w pliku \texttt{parseopt/grammar.txt}. -Poni¿ej zamieszczamy kilka przyk³adowych regu³. +Poni¿ej zamieszczamy kilka przyk³adowych regu³. + {\footnotesize \begin{verbatim} if "something wrong" { la15 > 4.0 @@ -113,13 +122,15 @@ log once step 60 \end{verbatim} } -Nale¿y zwróciæ uwagê ¿e niektóre s³owa kluczowe posiadaj± zamienniki, np. zamiast -\texttt{if} mo¿na u¿ywaæ \texttt{rule},\texttt{when} lub \texttt{on}; zamiast \texttt{run} -- -\texttt{invoke} \texttt{exec} \texttt{execute}. S³owo \texttt{once} jest -opcjonalne i modyfikuje podejmowanie akcji. Wykonywana jest on tylko za -pierwszym razem gdy wyra¿enie przyje³o warto¶æ \texttt{TRUE}, dopiero -przyjêcie przez wyra¿enia warto¶ci \texttt{FALSE} umo¿liwia eventualne -powtórne wykonanie akcji. Komenda umieszczona po s³owie \texttt{run} + +Nale¿y zwróciæ uwagê ¿e niektóre s³owa kluczowe posiadaj± zamienniki, +np. zamiast \texttt{if} mo¿na u¿ywaæ \texttt{rule},\texttt{when} lub +\texttt{on}; zamiast \texttt{run} -- \texttt{invoke} \texttt{exec} +\texttt{execute}. S³owo \texttt{once} jest opcjonalne i modyfikuje +podejmowanie akcji. Wykonywana jest on tylko za pierwszym razem gdy +wyra¿enie przyje³o warto¶æ \texttt{TRUE}, dopiero przyjêcie przez +wyra¿enie warto¶ci \texttt{FALSE} umo¿liwia ewentualne powtórne +wykonanie akcji. Komenda umieszczona po s³owie \texttt{run} przekazywana jest do \texttt{/bin/sh} tak wiêc mo¿e to byæ zwyk³e polecenie, program lub nawet skrypt. Sprawdzanie regu³y jest wstrzymane do chwili zakoñczenia tej akcji. @@ -127,13 +138,14 @@ Parametrami monitorowanymi w wersji 0.12 programu s±: \begin{itemize} \item \textbf{la1} -- obci±¿enie systemu w ostatniej minucie, - \item \textbf{la5} -- obci±¿enie systemu w ci±gu ostatnich $5$-ciu minut, - \item \textbf{la15} -- obci±¿enie systemu w ci±gu ostatnich $15$-stu minut, + \item \textbf{la5} -- obci±¿enie systemu w ci±gu ostatnich $5$ minut, + \item \textbf{la15} -- obci±¿enie systemu w ci±gu ostatnich $15$ minut, \item \textbf{freemem} -- wolna pamiêæ RAM, \item \textbf{usedswap} -- wykorzystana pamiêæ RAM, \item \textbf{freeswap} -- wolna przestrzeñ wymiany (swap), - \item \textbf{useedswap} -- wykorzystana przesrzeñ wymiany (swap), - \item \textbf{freespace} -- wolna przesrzeñ dla systemu plików, - \item \textbf{usedspace} -- wykorzystana przestrzeñ dla systemu plików, - \item \textbf{availspace} -- dostêpne przestrzeñ dla systemu plików. + \item \textbf{useedswap} -- wykorzystana przesrzeñ wymiany, + \item \textbf{usedspace} -- zajêta przestrzeñ w systemie plików, + \item \textbf{freespace} -- ilo¶æ wolnego miejsca dla systemu plików, + \item \textbf{availspace} -- dostêpny obszar w systemie plików (ilo¶æ + wolnego miejsca po odjêciu przestrzeni zarezerwowanej dla superu¿ytkownika) \end{itemize} Index: main.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/main.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- main.tex 30 May 2004 14:06:54 -0000 1.6 +++ main.tex 31 May 2004 08:53:50 -0000 1.7 @@ -18,6 +18,8 @@ % table of contents \tableofcontents +\newpage + % tu dodawac rozdzialy: \input{wstep} \input{specuzytkownika} |
|
From: Michal S. <em...@us...> - 2004-05-31 08:41:15
|
Update of /cvsroot/sysfence/sysfence/dokprojektlic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16409 Modified Files: titlepage.tex Log Message: + przemek, stawiasz pizze i browary reszcie developerow ;> Index: titlepage.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/titlepage.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- titlepage.tex 29 May 2004 17:53:36 -0000 1.2 +++ titlepage.tex 31 May 2004 08:41:03 -0000 1.3 @@ -1,4 +1,4 @@ -\author{Micha³ Sa³aban \and Miros³aw Kopertowski} +\author{Micha³ Sa³aban \and Miros³aw Kopertowski \and Przemys³aw Miszczuk} \title{Projekt Licencjacki\\ \textit{sysfence}} \maketitle |
|
From: Michal S. <em...@us...> - 2004-05-31 08:39:25
|
Update of /cvsroot/sysfence/sysfence/dokprojektlic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16099 Modified Files: abstract.tex wstep.tex Log Message: + dopisuje co sie da, zeby bylo duze ;) Index: wstep.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/wstep.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- wstep.tex 30 May 2004 12:16:31 -0000 1.3 +++ wstep.tex 31 May 2004 08:39:07 -0000 1.4 @@ -1,13 +1,14 @@ \section{Wstêp} -Sysfence jest demonem dzia³aj±cym w ¶rodowisku systemów uniksowych. Jego zadaniem +\subsection{Zastosowania programu} +\emph{sysfence} jest demonem dzia³aj±cym w ¶rodowisku systemów uniksowych. Jego zadaniem jest ci±g³e ¶ledzenie stanu zasobów systemowych i podejmowanie akcji w razie wykrycia anomalii przewidzianych przez administratora systemu. G³ównym zastosowaniem jest kontrolowanie stabilno¶ci pracy serwerów, które dzia³aj± pod du¿ym obci±¿eniem lub u¿ywaj± niestabilnego oprogramowania (np. aplikacji -,,gubi±cych'' pamiêæ). Dziêki programowi sysfence mo¿liwe jest proste zautomatyzowanie -czynno¶ci takich jak : +,,gubi±cych'' pamiêæ). Dziêki programowi \emph{sysfence} mo¿liwe jest proste +zautomatyzowanie czynno¶ci takich jak : \begin{itemize} \item wy³±czanie us³ug sieciowych gdy system jest nadmiernie obci±¿ony i ponowne @@ -18,17 +19,33 @@ pamiêci, \item ostrzeganie gdy koñczy siê miejsce na partycjach dyskowych, + \item - informowanie administratorów poprzez e-mail lub SMS o nieprawid³owo¶ciach w pracy systemu. + informowanie administratorów poprzez pocztê lub SMS o nieprawid³owo¶ciach w pracy systemu. \end{itemize} + Powy¿sza lista stanowi tylko przyk³ad. Dziêki pe³nej swobodzie w konfiguracji -i mo¿liwo¶ci dzia³ania z prawami zwyk³ego u¿ytkownika, sysfence mo¿e byæ -wykorzystany do innych zastosowañ, nie tylko przez administratorów. +i mo¿liwo¶ci dzia³ania z prawami zwyk³ego u¿ytkownika, \emph{sysfence} mo¿e byæ +wykorzystany do innych zastosowañ, nie tylko przez administratorów. Dla przyk³adu, +korzystaæ z niego mog± programi¶ci zajmuj±cy siê du¿ymi aplikacjami, które +na skutek b³êdów w kodzie by³yby w stanie przeci±¿yæ stacjê robocz± i uniemo¿liwiæ +dalsz± pracê. +\subsection{Rozwój projektu} Pisz±c projekt kierowali¶my siê zasadami panuj±cymi w ¶rodowisku OpenSource. Ca³y kod programu objêty jest licencj± GPL. Repozytorium CVS jest publicznie -dostêpne, a co jaki¶ czas wydawane by³y kolejne wersje aplikacji (w momencie -zakoñczenia projektu licencjackiego planujemy wydaæ wersjê 0.12). +dostêpne, a co jaki¶ czas, po zakoñczeniu kolejnego etapu prac, wydawane by³y +kolejne wersje aplikacji (w momencie zakoñczenia projektu licencjackiego planujemy +wydaæ wersjê 0.13). -Stronê domow± projektu mo¿na znale¼æ pod adresem \texttt{http://sysfence.sourceforge.net}. +Pomimo m³odego wieku, a co za tym idzie - niewielkiej popularno¶ci aplikacji, +taka strategia przynios³a pierwsze efekty w postaci ³aty przys³anej nam przez +jednego z u¿ytkowników. Poprawka dotyczy³a ustawieñ kompilatora oraz zale¿no¶ci +pomiêdzy modu³ami projektu. + +Aktualnie \emph{sysfence} wchodzi w sk³ad dystrybucji \emph{PLD} oraz \emph{Sorcerer} +systemu \emph{GNU/Linux}. Trwaj± prace nad przygotowaniem pakietów dla \emph{Debiana}. + +Stronê domow± naszego projektu mo¿na znale¼æ pod adresem +\texttt{http://sysfence.sourceforge.net}. Index: abstract.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/abstract.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- abstract.tex 29 May 2004 17:53:36 -0000 1.3 +++ abstract.tex 31 May 2004 08:39:06 -0000 1.4 @@ -1,9 +1,13 @@ \abstract{Praca ta stanowi dokumentacjê do zdania rozwi±zanego -w ramach Projektu Licencjackiego. +w ramach projektu licencjackiego. Celem zadania by³o zaprojektowanie i implementacja -programu \textit{sysfence}. Program ten jest narzêdziem -monitoruj±cym okre¶lone zasoby systemu. U¿ytkownik zadaje -regu³y (czyli warunki okre¶lone na zasobach i odpowiadaj±ce im akcje), -a sysfence decyduje czy wykonaæ okre¶lon± akcjê. -Program dzia³a na platformach uniksowych. +programu \emph{sysfence}. Aplikacja ta jest narzêdziem +monitoruj±cym zasoby systemu. Przy pomocy prostego jêzyka, +pozwalaj±cego okreslaæ relacje logiczne i arytmetyczne, +u¿ytkownik definiuje stany zasobów, które wymagaj± podjêcia +akcji (np. wyczerpanie wolnej pamiêci). \emph{sysfence} +w regularnych odstêpach czasu sprawdza czy zadane +warunki nie zosta³y spe³nione i w razie potrzeby uruchamia +wskazane zewnêtrzne polecenia. Program dzia³a na platformach +uniksowych. } |
|
From: Michal S. <em...@us...> - 2004-05-30 22:36:02
|
Update of /cvsroot/sysfence/sysfence/dokprojektlic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22657 Modified Files: speckonstrukcyjna.tex specuzytkownika.tex Added Files: przeplyw.dia przeplyw.eps Log Message: + o przeplywie danych i sygnalow Index: speckonstrukcyjna.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/speckonstrukcyjna.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- speckonstrukcyjna.tex 30 May 2004 14:06:54 -0000 1.3 +++ speckonstrukcyjna.tex 30 May 2004 22:35:51 -0000 1.4 @@ -6,6 +6,7 @@ mia³ mo¿liwe ma³o obci±¿aæ system. Wy¿szy poziom optymalizacji kodu uzyskali¶my przy pomocy flagi \texttt{-O2} kompilatora. +\subsection{Modu³y} W tablicy~\ref{tab:moduly} zamieszczamy podzia³ aplikacji na modu³y i ich funkcje. @@ -39,3 +40,21 @@ wyj¶ciowych\\ \cline{2-3} & xalloc & pomocnicza funkcja do alokacji pamiêci\\ \hline \end{tabular}\end{table} + + +\subsection{Przep³yw danych} + +Po uruchomieniu programu dokonywana jest analiza leksykalna i sk³adniowa pliku +konfiguracyjnego. Je¶li nie wyst±pi± w nim ¿adne b³êdy, dla ka¿dej regu³y tworzony +jest nowy proces odpowiadaj±cy za jej monitorowanie. Ka¿demu z nich nadawana jest +nazwa \emph{sfwatch}. Rodzic przyjmuje nazwê \emph{sffetch} i wchodzi w nieskoñczon± +pêtlê, w której pobiera z systemu wszelkie niezbêdne dane i umieszcza je w pamiêci +dzielonej. \emph{sffetch} ma tak¿e mo¿liwo¶æ kierowania prac± procesów potomnych za +pomoc± sygna³ów (patrz strona \pageref{sygnaly}). + +\begin{figure} +\begin{center} + \includegraphics[scale=1,width=\textwidth]{przeplyw.eps} +\end{center} +\end{figure} + --- NEW FILE: przeplyw.dia --- <?xml version="1.0" encoding="UTF-8"?> <dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/"> <dia:diagramdata> <dia:attribute name="background"> <dia:color val="#ffffff"/> </dia:attribute> <dia:attribute name="pagebreak"> <dia:color val="#000099"/> </dia:attribute> <dia:attribute name="paper"> <dia:composite type="paper"> <dia:attribute name="name"> <dia:string>#A4#</dia:string> </dia:attribute> <dia:attribute name="tmargin"> <dia:real val="2.8222"/> </dia:attribute> <dia:attribute name="bmargin"> <dia:real val="2.8222"/> </dia:attribute> <dia:attribute name="lmargin"> <dia:real val="2.8222"/> </dia:attribute> <dia:attribute name="rmargin"> <dia:real val="2.8222"/> </dia:attribute> <dia:attribute name="is_portrait"> <dia:boolean val="true"/> </dia:attribute> <dia:attribute name="scaling"> <dia:real val="1"/> </dia:attribute> <dia:attribute name="fitto"> <dia:boolean val="false"/> </dia:attribute> </dia:composite> </dia:attribute> <dia:attribute name="grid"> <dia:composite type="grid"> <dia:attribute name="width_x"> <dia:real val="1"/> </dia:attribute> <dia:attribute name="width_y"> <dia:real val="1"/> </dia:attribute> <dia:attribute name="visible_x"> <dia:int val="1"/> </dia:attribute> <dia:attribute name="visible_y"> <dia:int val="1"/> </dia:attribute> <dia:composite type="color"/> </dia:composite> </dia:attribute> <dia:attribute name="color"> <dia:color val="#d8e5e5"/> </dia:attribute> <dia:attribute name="guides"> <dia:composite type="guides"> <dia:attribute name="hguides"/> <dia:attribute name="vguides"/> </dia:composite> </dia:attribute> </dia:diagramdata> <dia:layer name="Background" visible="true"> <dia:object type="Standard - Box" version="0" id="O0"> <dia:attribute name="obj_pos"> <dia:point val="20.1,5.05"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="20.05,5;27.05,8.05"/> </dia:attribute> <dia:attribute name="elem_corner"> <dia:point val="20.1,5.05"/> </dia:attribute> <dia:attribute name="elem_width"> <dia:real val="6.9"/> </dia:attribute> <dia:attribute name="elem_height"> <dia:real val="2.95"/> </dia:attribute> <dia:attribute name="show_background"> <dia:boolean val="true"/> </dia:attribute> </dia:object> <dia:object type="Standard - Text" version="0" id="O1"> <dia:attribute name="obj_pos"> <dia:point val="21,7"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="21,5.50125;25.7987,8.1475"/> </dia:attribute> <dia:attribute name="text"> <dia:composite type="text"> <dia:attribute name="string"> <dia:string>#sffetch#</dia:string> </dia:attribute> <dia:attribute name="font"> <dia:font family="sans" style="80" name="Helvetica"/> </dia:attribute> <dia:attribute name="height"> <dia:real val="2"/> </dia:attribute> <dia:attribute name="pos"> <dia:point val="21,7"/> </dia:attribute> <dia:attribute name="color"> <dia:color val="#000000"/> </dia:attribute> <dia:attribute name="alignment"> <dia:enum val="0"/> </dia:attribute> </dia:composite> </dia:attribute> </dia:object> <dia:object type="Standard - Box" version="0" id="O2"> <dia:attribute name="obj_pos"> <dia:point val="20.1,16.05"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="20.05,16;27.05,19.05"/> </dia:attribute> <dia:attribute name="elem_corner"> <dia:point val="20.1,16.05"/> </dia:attribute> <dia:attribute name="elem_width"> <dia:real val="6.9"/> </dia:attribute> <dia:attribute name="elem_height"> <dia:real val="2.95"/> </dia:attribute> <dia:attribute name="show_background"> <dia:boolean val="true"/> </dia:attribute> </dia:object> <dia:object type="Standard - Text" version="0" id="O3"> <dia:attribute name="obj_pos"> <dia:point val="21,18"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="21,16.55;26.35,19.05"/> </dia:attribute> <dia:attribute name="text"> <dia:composite type="text"> <dia:attribute name="string"> <dia:string>#sfwatch#</dia:string> </dia:attribute> <dia:attribute name="font"> <dia:font family="sans" style="80" name="Helvetica"/> </dia:attribute> <dia:attribute name="height"> <dia:real val="2"/> </dia:attribute> <dia:attribute name="pos"> <dia:point val="21,18"/> </dia:attribute> <dia:attribute name="color"> <dia:color val="#000000"/> </dia:attribute> <dia:attribute name="alignment"> <dia:enum val="0"/> </dia:attribute> </dia:composite> </dia:attribute> </dia:object> <dia:object type="Standard - Box" version="0" id="O4"> <dia:attribute name="obj_pos"> <dia:point val="28.1,16.05"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="28.05,16;35.05,19.05"/> </dia:attribute> <dia:attribute name="elem_corner"> <dia:point val="28.1,16.05"/> </dia:attribute> <dia:attribute name="elem_width"> <dia:real val="6.9"/> </dia:attribute> <dia:attribute name="elem_height"> <dia:real val="2.95"/> </dia:attribute> <dia:attribute name="show_background"> <dia:boolean val="true"/> </dia:attribute> </dia:object> <dia:object type="Standard - Text" version="0" id="O5"> <dia:attribute name="obj_pos"> <dia:point val="29,18"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="29,16.5013;34.3987,19.1475"/> </dia:attribute> <dia:attribute name="text"> <dia:composite type="text"> <dia:attribute name="string"> <dia:string>#sfwatch#</dia:string> </dia:attribute> <dia:attribute name="font"> <dia:font family="sans" style="80" name="Helvetica"/> </dia:attribute> <dia:attribute name="height"> <dia:real val="2"/> </dia:attribute> <dia:attribute name="pos"> <dia:point val="29,18"/> </dia:attribute> <dia:attribute name="color"> <dia:color val="#000000"/> </dia:attribute> <dia:attribute name="alignment"> <dia:enum val="0"/> </dia:attribute> </dia:composite> </dia:attribute> </dia:object> <dia:object type="Standard - Line" version="0" id="O6"> <dia:attribute name="obj_pos"> <dia:point val="23.55,8"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="23.15,7.95;23.95,16.1"/> </dia:attribute> <dia:attribute name="conn_endpoints"> <dia:point val="23.55,8"/> <dia:point val="23.55,16.05"/> </dia:attribute> <dia:attribute name="numcp"> <dia:int val="1"/> </dia:attribute> <dia:attribute name="end_arrow"> <dia:enum val="3"/> </dia:attribute> <dia:attribute name="end_arrow_length"> <dia:real val="0.8"/> </dia:attribute> <dia:attribute name="end_arrow_width"> <dia:real val="0.4"/> </dia:attribute> <dia:connections> <dia:connection handle="0" to="O0" connection="6"/> <dia:connection handle="1" to="O2" connection="1"/> </dia:connections> </dia:object> <dia:object type="Standard - Line" version="0" id="O7"> <dia:attribute name="obj_pos"> <dia:point val="23.55,8"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="23.4793,7.92929;31.869,16.3674"/> </dia:attribute> <dia:attribute name="conn_endpoints"> <dia:point val="23.55,8"/> <dia:point val="31.55,16.05"/> </dia:attribute> <dia:attribute name="numcp"> <dia:int val="1"/> </dia:attribute> <dia:attribute name="end_arrow"> <dia:enum val="3"/> </dia:attribute> <dia:attribute name="end_arrow_length"> <dia:real val="0.8"/> </dia:attribute> <dia:attribute name="end_arrow_width"> <dia:real val="0.4"/> </dia:attribute> <dia:connections> <dia:connection handle="0" to="O0" connection="6"/> <dia:connection handle="1" to="O4" connection="1"/> </dia:connections> </dia:object> <dia:object type="Standard - Ellipse" version="0" id="O8"> <dia:attribute name="obj_pos"> <dia:point val="7.15,4"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="7.1,3.95;13.2,9.15"/> </dia:attribute> <dia:attribute name="elem_corner"> <dia:point val="7.15,4"/> </dia:attribute> <dia:attribute name="elem_width"> <dia:real val="6"/> </dia:attribute> <dia:attribute name="elem_height"> <dia:real val="5.1"/> </dia:attribute> </dia:object> <dia:object type="Standard - Text" version="0" id="O9"> <dia:attribute name="obj_pos"> <dia:point val="8.75,6.85"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="8.75,5.765;11.935,7.62"/> </dia:attribute> <dia:attribute name="text"> <dia:composite type="text"> <dia:attribute name="string"> <dia:string>#system#</dia:string> </dia:attribute> <dia:attribute name="font"> <dia:font family="sans" style="0" name="Helvetica"/> </dia:attribute> <dia:attribute name="height"> <dia:real val="1.4"/> </dia:attribute> <dia:attribute name="pos"> <dia:point val="8.75,6.85"/> </dia:attribute> <dia:attribute name="color"> <dia:color val="#000000"/> </dia:attribute> <dia:attribute name="alignment"> <dia:enum val="0"/> </dia:attribute> </dia:composite> </dia:attribute> </dia:object> <dia:object type="Standard - Line" version="0" id="O10"> <dia:attribute name="obj_pos"> <dia:point val="13.15,6.55"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="12.9995,5.72447;20.2529,7.32553"/> </dia:attribute> <dia:attribute name="conn_endpoints"> <dia:point val="13.15,6.55"/> <dia:point val="20.1,6.525"/> </dia:attribute> <dia:attribute name="numcp"> <dia:int val="1"/> </dia:attribute> <dia:attribute name="line_width"> <dia:real val="0.3"/> </dia:attribute> <dia:attribute name="line_style"> <dia:enum val="4"/> </dia:attribute> <dia:attribute name="end_arrow"> <dia:enum val="3"/> </dia:attribute> <dia:attribute name="end_arrow_length"> <dia:real val="1.6"/> </dia:attribute> <dia:attribute name="end_arrow_width"> <dia:real val="0.8"/> </dia:attribute> <dia:connections> <dia:connection handle="0" to="O8" connection="4"/> <dia:connection handle="1" to="O0" connection="3"/> </dia:connections> </dia:object> <dia:object type="Standard - Box" version="0" id="O11"> <dia:attribute name="obj_pos"> <dia:point val="31.55,3.1"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="31.5,3.05;38.5,10.05"/> </dia:attribute> <dia:attribute name="elem_corner"> <dia:point val="31.55,3.1"/> </dia:attribute> <dia:attribute name="elem_width"> <dia:real val="6.9"/> </dia:attribute> <dia:attribute name="elem_height"> <dia:real val="6.9"/> </dia:attribute> <dia:attribute name="show_background"> <dia:boolean val="true"/> </dia:attribute> <dia:attribute name="line_style"> <dia:enum val="4"/> </dia:attribute> </dia:object> <dia:object type="Standard - Text" version="0" id="O12"> <dia:attribute name="obj_pos"> <dia:point val="33.65,6.1"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="33.65,5.1175;37.0825,7.965"/> </dia:attribute> <dia:attribute name="text"> <dia:composite type="text"> <dia:attribute name="string"> <dia:string>#pamiÄÄ dzielona#</dia:string> </dia:attribute> <dia:attribute name="font"> <dia:font family="sans" style="0" name="Helvetica"/> </dia:attribute> <dia:attribute name="height"> <dia:real val="1.2"/> </dia:attribute> <dia:attribute name="pos"> <dia:point val="33.65,6.1"/> </dia:attribute> <dia:attribute name="color"> <dia:color val="#000000"/> </dia:attribute> <dia:attribute name="alignment"> <dia:enum val="0"/> </dia:attribute> </dia:composite> </dia:attribute> </dia:object> <dia:object type="Standard - Line" version="0" id="O13"> <dia:attribute name="obj_pos"> <dia:point val="27,6.525"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="26.8492,5.74919;31.7044,7.35081"/> </dia:attribute> <dia:attribute name="conn_endpoints"> <dia:point val="27,6.525"/> <dia:point val="31.55,6.55"/> </dia:attribute> <dia:attribute name="numcp"> <dia:int val="1"/> </dia:attribute> <dia:attribute name="line_width"> <dia:real val="0.3"/> </dia:attribute> <dia:attribute name="line_style"> <dia:enum val="4"/> </dia:attribute> <dia:attribute name="end_arrow"> <dia:enum val="3"/> </dia:attribute> <dia:attribute name="end_arrow_length"> <dia:real val="1.6"/> </dia:attribute> <dia:attribute name="end_arrow_width"> <dia:real val="0.8"/> </dia:attribute> <dia:connections> <dia:connection handle="0" to="O0" connection="4"/> <dia:connection handle="1" to="O11" connection="3"/> </dia:connections> </dia:object> <dia:object type="Standard - Line" version="0" id="O14"> <dia:attribute name="obj_pos"> <dia:point val="35,10"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="26.3978,9.78988;35.2101,16.7786"/> </dia:attribute> <dia:attribute name="conn_endpoints"> <dia:point val="35,10"/> <dia:point val="27,16.05"/> </dia:attribute> <dia:attribute name="numcp"> <dia:int val="1"/> </dia:attribute> <dia:attribute name="line_width"> <dia:real val="0.3"/> </dia:attribute> <dia:attribute name="line_style"> <dia:enum val="4"/> </dia:attribute> <dia:attribute name="end_arrow"> <dia:enum val="3"/> </dia:attribute> <dia:attribute name="end_arrow_length"> <dia:real val="1.6"/> </dia:attribute> <dia:attribute name="end_arrow_width"> <dia:real val="0.8"/> </dia:attribute> <dia:connections> <dia:connection handle="0" to="O11" connection="6"/> <dia:connection handle="1" to="O2" connection="2"/> </dia:connections> </dia:object> <dia:object type="Standard - Line" version="0" id="O15"> <dia:attribute name="obj_pos"> <dia:point val="35,10"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="34.2,9.85;35.8,16.2"/> </dia:attribute> <dia:attribute name="conn_endpoints"> <dia:point val="35,10"/> <dia:point val="35,16.05"/> </dia:attribute> <dia:attribute name="numcp"> <dia:int val="1"/> </dia:attribute> <dia:attribute name="line_width"> <dia:real val="0.3"/> </dia:attribute> <dia:attribute name="line_style"> <dia:enum val="4"/> </dia:attribute> <dia:attribute name="end_arrow"> <dia:enum val="3"/> </dia:attribute> <dia:attribute name="end_arrow_length"> <dia:real val="1.6"/> </dia:attribute> <dia:attribute name="end_arrow_width"> <dia:real val="0.8"/> </dia:attribute> <dia:connections> <dia:connection handle="0" to="O11" connection="6"/> <dia:connection handle="1" to="O4" connection="2"/> </dia:connections> </dia:object> <dia:object type="Standard - Box" version="0" id="O16"> <dia:attribute name="obj_pos"> <dia:point val="6,15"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="5.975,14.975;18.325,19.025"/> </dia:attribute> <dia:attribute name="elem_corner"> <dia:point val="6,15"/> </dia:attribute> <dia:attribute name="elem_width"> <dia:real val="12.3"/> </dia:attribute> <dia:attribute name="elem_height"> <dia:real val="4"/> </dia:attribute> <dia:attribute name="border_width"> <dia:real val="0.05"/> </dia:attribute> <dia:attribute name="show_background"> <dia:boolean val="true"/> </dia:attribute> </dia:object> <dia:object type="Standard - Line" version="0" id="O17"> <dia:attribute name="obj_pos"> <dia:point val="7,16"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="6.85,15.2;11.15,16.8"/> </dia:attribute> <dia:attribute name="conn_endpoints"> <dia:point val="7,16"/> <dia:point val="11,16"/> </dia:attribute> <dia:attribute name="numcp"> <dia:int val="1"/> </dia:attribute> <dia:attribute name="line_width"> <dia:real val="0.3"/> </dia:attribute> <dia:attribute name="line_style"> <dia:enum val="4"/> </dia:attribute> <dia:attribute name="end_arrow"> <dia:enum val="3"/> </dia:attribute> <dia:attribute name="end_arrow_length"> <dia:real val="1.6"/> </dia:attribute> <dia:attribute name="end_arrow_width"> <dia:real val="0.8"/> </dia:attribute> </dia:object> <dia:object type="Standard - Line" version="0" id="O18"> <dia:attribute name="obj_pos"> <dia:point val="7,18"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="6.95,17.6;10.05,18.4"/> </dia:attribute> <dia:attribute name="conn_endpoints"> <dia:point val="7,18"/> <dia:point val="10,18"/> </dia:attribute> <dia:attribute name="numcp"> <dia:int val="1"/> </dia:attribute> <dia:attribute name="end_arrow"> <dia:enum val="3"/> </dia:attribute> <dia:attribute name="end_arrow_length"> <dia:real val="0.8"/> </dia:attribute> <dia:attribute name="end_arrow_width"> <dia:real val="0.4"/> </dia:attribute> </dia:object> <dia:object type="Standard - Text" version="0" id="O19"> <dia:attribute name="obj_pos"> <dia:point val="13.05,16.25"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="13.05,15.5775;17.5725,16.695"/> </dia:attribute> <dia:attribute name="text"> <dia:composite type="text"> <dia:attribute name="string"> <dia:string>#przepÅyw danych#</dia:string> </dia:attribute> <dia:attribute name="font"> <dia:font family="sans" style="0" name="Helvetica"/> </dia:attribute> <dia:attribute name="height"> <dia:real val="0.8"/> </dia:attribute> <dia:attribute name="pos"> <dia:point val="13.05,16.25"/> </dia:attribute> <dia:attribute name="color"> <dia:color val="#000000"/> </dia:attribute> <dia:attribute name="alignment"> <dia:enum val="0"/> </dia:attribute> </dia:composite> </dia:attribute> </dia:object> <dia:object type="Standard - Text" version="0" id="O20"> <dia:attribute name="obj_pos"> <dia:point val="12,18"/> </dia:attribute> <dia:attribute name="obj_bb"> <dia:rectangle val="12,17.3275;17.5725,18.445"/> </dia:attribute> <dia:attribute name="text"> <dia:composite type="text"> <dia:attribute name="string"> <dia:string>#sterowanie (sygnaÅy)#</dia:string> </dia:attribute> <dia:attribute name="font"> <dia:font family="sans" style="0" name="Helvetica"/> </dia:attribute> <dia:attribute name="height"> <dia:real val="0.8"/> </dia:attribute> <dia:attribute name="pos"> <dia:point val="12,18"/> </dia:attribute> <dia:attribute name="color"> <dia:color val="#000000"/> </dia:attribute> <dia:attribute name="alignment"> <dia:enum val="0"/> </dia:attribute> </dia:composite> </dia:attribute> </dia:object> </dia:layer> </dia:diagram> Index: specuzytkownika.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/specuzytkownika.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- specuzytkownika.tex 30 May 2004 12:16:31 -0000 1.4 +++ specuzytkownika.tex 30 May 2004 22:35:51 -0000 1.5 @@ -27,6 +27,7 @@ \end{itemize} Informacje te umo¿liwiaj± okre¶lenie zadañ i stanów poszczególnych procesów. +\label{sygnaly} Komunikacja z procesami odbywa siê za pomoc± sygna³ów. Przydatne sygna³y zamieszczone s± w tablicach~\ref{tab:s1} i~\ref{tab:s2}. Pos³uguj±c siê sygna³ami mo¿na tymczasowo wstrzymaæ sprawdzanie --- NEW FILE: przeplyw.eps --- %!PS-Adobe-2.0 EPSF-2.0 %%Title: /home/users/emes/devel/sysfence/sf/sysfence/dokprojektlic/przeplyw.dia %%Creator: Dia v0.92.2 %%CreationDate: Mon May 31 00:25:36 2004 %%For: emes %%Orientation: Portrait %%Magnification: 1.0000 %%BoundingBox: 0 0 922 457 %%BeginSetup %%EndSetup %%EndComments %%BeginProlog [ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E [...1583 lines suppressed...] 700 -575 613 -640 452 -640 curveto 396 -640 332 -631 249 -612 curveto 249 -963 lineto 327 -1005 406 -1024 507 -1024 curveto 631 -1024 765 -982 866 -908 curveto 986 -819 1055 -717 1129 -521 curveto 2203 2432 lineto 1788 2432 lineto end_ol grestore gsave 17.393267 18.000000 translate 0.035278 -0.035278 scale start_ol 454 -975 moveto 921 -367 1216 478 1216 1206 curveto 1216 1939 921 2784 454 3392 curveto 201 3392 lineto 606 2728 832 1949 832 1206 curveto 832 468 606 -316 201 -975 curveto 454 -975 lineto end_ol grestore showpage |
|
From: Michal S. <em...@us...> - 2004-05-30 18:23:42
|
Update of /cvsroot/sysfence/sysfence In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13186 Modified Files: datastruct.c datastruct.h getstats.c Log Message: + functions handling process database Index: datastruct.h =================================================================== RCS file: /cvsroot/sysfence/sysfence/datastruct.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- datastruct.h 29 May 2004 17:31:05 -0000 1.5 +++ datastruct.h 30 May 2004 18:23:33 -0000 1.6 @@ -86,7 +86,7 @@ // Selector or option describing stat int laminutes; // load sf_res_state resstat; // resources - int procstates; // processes + char procstates; // processes sf_list *uids; // processes char *path; // filesystem } sf_stat_arg; @@ -177,11 +177,12 @@ typedef struct { // Main statistics database - double load[3]; - long int mem[ VA_LAST ]; - long int swap[ VA_LAST ]; - sf_list *fs; - void *proc; // NIY + double load[3]; + long int mem[ VA_LAST ]; + long int swap[ VA_LAST ]; + sf_list *fs; // list of filesystems being watched + int nr_proc; // number of process entries in array + sf_proc_stat *proc; // array of processes } sf_database; /*************************************************************************** @@ -192,7 +193,9 @@ int equal_defs (sf_stat_def *d1, sf_stat_def *d2); int uid_in_list (sf_list *hd, uid_t uid); void add_fs_entry_to_list (sf_list **hd, char *path); +void add_proc_entry_to_array (sf_database *db, sf_proc_stat *proc); sf_fs_stat * get_fs_entry_from_list (sf_list *hd, char *path); +int get_proc_num (sf_database *db, char statemask, uid_t *uid); char * def_2_string (sf_stat_def *def); /* $Id$ */ Index: getstats.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/getstats.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- getstats.c 29 May 2004 17:29:28 -0000 1.15 +++ getstats.c 30 May 2004 18:23:33 -0000 1.16 @@ -14,16 +14,17 @@ /* $Id$ */ -#include "sys/exit.h" -#include "parseopt/lex.h" -#include "datastruct.h" -#include "getstats.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <string.h> #include <sys/vfs.h> +#include "sys/xalloc.h" +#include "sys/exit.h" +#include "parseopt/lex.h" +#include "datastruct.h" +#include "getstats.h" #ifdef DEBUG #include <syslog.h> @@ -33,7 +34,7 @@ sf_value get_stat_fs (sf_stat_def *def, sf_list *fslist) { sf_value res; - sf_fs_stat *fs = get_fs_entry_from_list (fslist, def->arg[1].path); + sf_fs_stat *fs = get_fs_entry_from_list (fslist, def->arg[1].path); sf_res_state slctr = def->arg[0].resstat; #ifdef DEBUG @@ -52,11 +53,20 @@ return res; } -sf_value get_stat_proc (sf_stat_def *def, void *proctab) +sf_value get_nproc (sf_stat_def *def, sf_database *db) { - sf_value res; + long int *nproc = (long int *) xalloc (NULL, sizeof (long int)); + sf_value res = { INTEGER, nproc }; + sf_list *uids = def->arg[0].uids; + char statemask = def->arg[1].procstates; + + if (! uids) *nproc = get_proc_num (db, statemask, NULL); + + while (uids) { + *nproc += get_proc_num (db, statemask, (uid_t *) uids->el); + uids = uids->next; + } - bail_out (EXIT_BUG, "get_stat_proc(): NIY"); return res; } @@ -71,7 +81,7 @@ switch (def->label) { case ST_PROC: - res = get_stat_proc (def, main_db->proc); + res = get_nproc (def, main_db); break; case ST_FS: res = get_stat_fs (def, main_db->fs); Index: datastruct.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/datastruct.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- datastruct.c 29 May 2004 17:29:28 -0000 1.5 +++ datastruct.c 30 May 2004 18:23:33 -0000 1.6 @@ -24,6 +24,38 @@ #include <syslog.h> #endif +void add_proc_entry_to_array (sf_database *db, sf_proc_stat *proc) +{ + sf_proc_stat *arr = db->proc; + + // go to end of array + arr += db->nr_proc; + memcpy (arr, proc, sizeof (sf_proc_stat)); + db->nr_proc ++; +} + +int get_proc_num (sf_database *db, char statemask, uid_t *uid) +{ + /* returns number of processes selecting by uid and state mask */ + + int count = 0; + sf_proc_stat *cur = db->proc; + + for (cur = db->proc; + cur - db->proc < db->nr_proc; + cur ++) { + + if (uid) + if (cur->uid != *uid) continue; + + if (! (cur->state & statemask)) continue; + + count ++; + } + + return count; +} + void add_def_to_list (sf_list **hd, sf_stat_def *def) { /* adds stat def to list, discarding duplicates */ |
|
From: Michal S. <em...@us...> - 2004-05-30 17:58:36
|
Update of /cvsroot/sysfence/sysfence/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8988/doc Modified Files: data_structures.dia Log Message: * simplified Index: data_structures.dia =================================================================== RCS file: /cvsroot/sysfence/sysfence/doc/data_structures.dia,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- data_structures.dia 30 May 2004 17:38:54 -0000 1.3 +++ data_structures.dia 30 May 2004 17:58:28 -0000 1.4 @@ -3059,7 +3059,7 @@ <dia:point val="16,22"/> </dia:attribute> <dia:attribute name="obj_bb"> - <dia:rectangle val="15.95,21.95;25.05,27.65"/> + <dia:rectangle val="15.95,21.95;25.05,28.45"/> </dia:attribute> <dia:attribute name="elem_corner"> <dia:point val="16,22"/> @@ -3068,7 +3068,7 @@ <dia:real val="9"/> </dia:attribute> <dia:attribute name="elem_height"> - <dia:real val="5.6"/> + <dia:real val="6.4"/> </dia:attribute> <dia:attribute name="name"> <dia:string>#sf_database#</dia:string> @@ -3234,6 +3234,29 @@ </dia:composite> <dia:composite type="umlattribute"> <dia:attribute name="name"> + <dia:string>#nr_proc#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#int#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> <dia:string>#proc#</dia:string> </dia:attribute> <dia:attribute name="type"> @@ -4008,13 +4031,13 @@ </dia:object> <dia:object type="Standard - Line" version="0" id="O46"> <dia:attribute name="obj_pos"> - <dia:point val="25,27.1"/> + <dia:point val="25,27.9"/> </dia:attribute> <dia:attribute name="obj_bb"> - <dia:rectangle val="24.9314,27.0314;36.2487,34.0687"/> + <dia:rectangle val="24.9325,27.8325;36.2308,34.0771"/> </dia:attribute> <dia:attribute name="conn_endpoints"> - <dia:point val="25,27.1"/> + <dia:point val="25,27.9"/> <dia:point val="36,33.7"/> </dia:attribute> <dia:attribute name="numcp"> @@ -4030,7 +4053,7 @@ <dia:real val="0.4"/> </dia:attribute> <dia:connections> - <dia:connection handle="0" to="O36" connection="17"/> + <dia:connection handle="0" to="O36" connection="19"/> <dia:connection handle="1" to="O47" connection="3"/> </dia:connections> </dia:object> |
|
From: Michal S. <em...@us...> - 2004-05-30 17:39:05
|
Update of /cvsroot/sysfence/sysfence/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5620/doc Modified Files: data_structures.dia Log Message: + new structures describing processes Index: data_structures.dia =================================================================== RCS file: /cvsroot/sysfence/sysfence/doc/data_structures.dia,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- data_structures.dia 29 May 2004 17:29:29 -0000 1.2 +++ data_structures.dia 30 May 2004 17:38:54 -0000 1.3 @@ -579,13 +579,13 @@ <dia:point val="16,3"/> </dia:attribute> <dia:attribute name="obj_bb"> - <dia:rectangle val="15.95,2.95;21.05,9.45"/> + <dia:rectangle val="15.95,2.95;21.15,9.45"/> </dia:attribute> <dia:attribute name="elem_corner"> <dia:point val="16,3"/> </dia:attribute> <dia:attribute name="elem_width"> - <dia:real val="5"/> + <dia:real val="5.1"/> </dia:attribute> <dia:attribute name="elem_height"> <dia:real val="6.4"/> @@ -2212,7 +2212,7 @@ <dia:point val="16,-28"/> </dia:attribute> <dia:attribute name="obj_bb"> - <dia:rectangle val="16,-29.55;19.45,-27.15"/> + <dia:rectangle val="16,-29.45;19.45,-26.95"/> </dia:attribute> <dia:attribute name="text"> <dia:composite type="text"> @@ -2242,7 +2242,7 @@ <dia:point val="16,2"/> </dia:attribute> <dia:attribute name="obj_bb"> - <dia:rectangle val="16,0.40125;19.3987,2.9475"/> + <dia:rectangle val="16,0.55;19.3,3.05"/> </dia:attribute> <dia:attribute name="text"> <dia:composite type="text"> @@ -3009,7 +3009,7 @@ <dia:point val="15,19"/> </dia:attribute> <dia:attribute name="obj_bb"> - <dia:rectangle val="14.95,18.95;61.05,36.05"/> + <dia:rectangle val="14.95,18.95;61.05,45.05"/> </dia:attribute> <dia:attribute name="elem_corner"> <dia:point val="15,19"/> @@ -3018,7 +3018,7 @@ <dia:real val="46"/> </dia:attribute> <dia:attribute name="elem_height"> - <dia:real val="17"/> + <dia:real val="26"/> </dia:attribute> <dia:attribute name="show_background"> <dia:boolean val="true"/> @@ -3029,7 +3029,7 @@ <dia:point val="16,21"/> </dia:attribute> <dia:attribute name="obj_bb"> - <dia:rectangle val="16,19.4013;25.2987,21.9475"/> + <dia:rectangle val="16,19.55;25.15,22.05"/> </dia:attribute> <dia:attribute name="text"> <dia:composite type="text"> @@ -3237,7 +3237,7 @@ <dia:string>#proc#</dia:string> </dia:attribute> <dia:attribute name="type"> - <dia:string>#void *#</dia:string> + <dia:string>#sf_list *#</dia:string> </dia:attribute> <dia:attribute name="value"> <dia:string>##</dia:string> @@ -4006,5 +4006,749 @@ </dia:attribute> <dia:attribute name="templates"/> </dia:object> + <dia:object type="Standard - Line" version="0" id="O46"> + <dia:attribute name="obj_pos"> + <dia:point val="25,27.1"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="24.9314,27.0314;36.2487,34.0687"/> + </dia:attribute> + <dia:attribute name="conn_endpoints"> + <dia:point val="25,27.1"/> + <dia:point val="36,33.7"/> + </dia:attribute> + <dia:attribute name="numcp"> + <dia:int val="1"/> + </dia:attribute> + <dia:attribute name="end_arrow"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="end_arrow_length"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="end_arrow_width"> + <dia:real val="0.4"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O36" connection="17"/> + <dia:connection handle="1" to="O47" connection="3"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Class" version="0" id="O47"> + <dia:attribute name="obj_pos"> + <dia:point val="36,33"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="35.95,32.95;42.25,37.05"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="36,33"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="6.2"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#sf_list#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica"/> + </dia:attribute> + <dia:attribute name="font_height"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#elsize#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#int#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#el#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#void *#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#next#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#sf_list *#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O48"> + <dia:attribute name="obj_pos"> + <dia:point val="46,36"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="45.95,35.95;52.25,40.05"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="46,36"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="6.2"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#sf_list#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica"/> + </dia:attribute> + <dia:attribute name="font_height"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#elsize#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#int#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#el#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#void *#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#next#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#sf_list *#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="Standard - Line" version="0" id="O49"> + <dia:attribute name="obj_pos"> + <dia:point val="42.2,36.5"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="42.1474,36.2979;46.071,37.1021"/> + </dia:attribute> + <dia:attribute name="conn_endpoints"> + <dia:point val="42.2,36.5"/> + <dia:point val="46,36.7"/> + </dia:attribute> + <dia:attribute name="numcp"> + <dia:int val="1"/> + </dia:attribute> + <dia:attribute name="end_arrow"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="end_arrow_length"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="end_arrow_width"> + <dia:real val="0.4"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O47" connection="13"/> + <dia:connection handle="1" to="O48" connection="3"/> + </dia:connections> + </dia:object> + <dia:object type="Standard - Line" version="0" id="O50"> + <dia:attribute name="obj_pos"> + <dia:point val="36,35.7"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="34.185,35.631;36.069,38.2556"/> + </dia:attribute> + <dia:attribute name="conn_endpoints"> + <dia:point val="36,35.7"/> + <dia:point val="34.55,38"/> + </dia:attribute> + <dia:attribute name="numcp"> + <dia:int val="1"/> + </dia:attribute> + <dia:attribute name="end_arrow"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="end_arrow_length"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="end_arrow_width"> + <dia:real val="0.4"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O47" connection="10"/> + <dia:connection handle="1" to="O53" connection="1"/> + </dia:connections> + </dia:object> + <dia:object type="Standard - Line" version="0" id="O51"> + <dia:attribute name="obj_pos"> + <dia:point val="46,38.7"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="44.185,38.631;46.069,41.2556"/> + </dia:attribute> + <dia:attribute name="conn_endpoints"> + <dia:point val="46,38.7"/> + <dia:point val="44.55,41"/> + </dia:attribute> + <dia:attribute name="numcp"> + <dia:int val="1"/> + </dia:attribute> + <dia:attribute name="end_arrow"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="end_arrow_length"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="end_arrow_width"> + <dia:real val="0.4"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O48" connection="10"/> + <dia:connection handle="1" to="O54" connection="1"/> + </dia:connections> + </dia:object> + <dia:object type="Standard - Line" version="0" id="O52"> + <dia:attribute name="obj_pos"> + <dia:point val="52.2,39.5"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="52.142,39.442;55.1195,40.4026"/> + </dia:attribute> + <dia:attribute name="conn_endpoints"> + <dia:point val="52.2,39.5"/> + <dia:point val="55,40"/> + </dia:attribute> + <dia:attribute name="numcp"> + <dia:int val="1"/> + </dia:attribute> + <dia:attribute name="line_style"> + <dia:enum val="4"/> + </dia:attribute> + <dia:attribute name="end_arrow"> + <dia:enum val="2"/> + </dia:attribute> + <dia:attribute name="end_arrow_length"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="end_arrow_width"> + <dia:real val="0.4"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O48" connection="13"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Class" version="0" id="O53"> + <dia:attribute name="obj_pos"> + <dia:point val="32,38"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="31.95,37.95;37.15,41.25"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="32,38"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="5.1"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="3.2"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#sf_proc_stat#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica"/> + </dia:attribute> + <dia:attribute name="font_height"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#state#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#char#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#uid#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#uid_t#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O54"> + <dia:attribute name="obj_pos"> + <dia:point val="42,41"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="41.95,40.95;47.15,44.25"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="42,41"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="5.1"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="3.2"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#sf_proc_stat#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica"/> + </dia:attribute> + <dia:attribute name="font_height"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.8"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#state#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#char#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#uid#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#uid_t#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> </dia:layer> </dia:diagram> |
|
From: mkoperto <mko...@us...> - 2004-05-30 14:07:04
|
Update of /cvsroot/sysfence/sysfence/dokprojektlic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2425 Modified Files: main.tex speckonstrukcyjna.tex Log Message: sprawdza tabelke->pozycje:parse,lex i log Index: speckonstrukcyjna.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/speckonstrukcyjna.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- speckonstrukcyjna.tex 29 May 2004 23:36:00 -0000 1.2 +++ speckonstrukcyjna.tex 30 May 2004 14:06:54 -0000 1.3 @@ -1,10 +1,41 @@ \section{Specyfikacja konstrukcyjna} -Program z za³o¿enia ma - -\subsection{Podzia³ programu na modu³y} - -%modu³y + opis +Program zosta³ napisany w jêzyku C. Dokonuj±c wyboru jêzyka kierowali¶my +siê przede wszystkim dostêpno¶ci± funkcji systemowych i mo¿liwo¶ciami +optymalizacji programu. Z za³o¿enia program +mia³ mo¿liwe ma³o obci±¿aæ system. Wy¿szy poziom optymalizacji kodu +uzyskali¶my przy pomocy flagi \texttt{-O2} kompilatora. +W tablicy~\ref{tab:moduly} zamieszczamy podzia³ aplikacji na modu³y i ich +funkcje. -\subsection{} +\begin{table}[ht] +\centering +\caption{Podzia³ na modu³y} +\begin{tabular}{|l|l|p{7cm}|} \hline \label{tab:moduly} +\centering \textbf{Katalog} & \textbf{Nazwa modu³u} & \multicolumn{1}{p{7cm}|}{\centering \textbf{Funkcja}}\\ \hline +/ & sysfence & g³ówny modu³ aplikacji (zwiera funkcjê \textit{main}); wczytanie regu³ z plików konfiguracyjnych; + inicjalizacja zasobów IPC (pamiêæ dzielona, semafor); utworzenie + procesów potomnych\\ \cline{2-3} + & mainloop & zawiera dwie funkcje: \textit{rule\_watch\_loop} i \textit{res\_probe\_loop} + s± to g³ówne funkcje procesów ¶ledz±cych regu³y i zasoby systemu; + ka¿da z funkcji zwiera nieskoñczon± pêtlê\\ \cline{2-3} + & datastruct & definicja struktur danych i podstawowych funkcji na nich + operuj±cych\\ \cline{2-3} + & getstats & funkcje pobieraj±ce z systemu informacje o zasobach\\ \cline{2-3} + & conditions & funkcje sprawdzaj±ce warunki w regu³ach\\ \cline{2-3} + & cp2memory & funkcje kopiuj±ce struktury danych (regu³y) do pamiêci dzielonej\\ \hline +parseopt/ & confread & wczytanie regu³ z plików\\ \cline{2-3} + & lex & przetwarza plik tekstowy z konfiguracj± + na strukturê tokenów\\ \cline{2-3} + & parse & tworzy regu³y\\ \cline{2-3} + & parseopt & rozpoznaje i zapisuje sta³e tekstowe i numeryczne z pliku tekstowego\\ \hline +sys/ & communiaction & obs³uga komunikacji IPC, funkcje do przydzielania/zwalniania + pamiêci dzielonej i semaforów\\ \cline{2-3} + & sighandlers & funkcje obs³ugi i blokowania sygna³ów\\ \cline{2-3} + & processtitle & zmiana nazw procesów wy¶wietlanych przez \texttt{ps wux}\\ \cline{2-3} + & log & logowanie danych\\ \cline{2-3} + & exit & funkcja koñcz±c± wykonywanie procesu \textit{bail\_out}; definicja kodów + wyj¶ciowych\\ \cline{2-3} + & xalloc & pomocnicza funkcja do alokacji pamiêci\\ \hline +\end{tabular}\end{table} Index: main.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/main.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- main.tex 29 May 2004 23:36:00 -0000 1.5 +++ main.tex 30 May 2004 14:06:54 -0000 1.6 @@ -22,7 +22,7 @@ \input{wstep} \input{specuzytkownika} \input{wymagania} -%\input{speckonstrukcyjna} +\input{speckonstrukcyjna} \input{testowanie} |
|
From: mkoperto <mko...@us...> - 2004-05-30 12:16:44
|
Update of /cvsroot/sysfence/sysfence/dokprojektlic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17144 Modified Files: specuzytkownika.tex wstep.tex Log Message: poprawki i uzupelnienia Index: wstep.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/wstep.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- wstep.tex 29 May 2004 14:42:14 -0000 1.2 +++ wstep.tex 30 May 2004 12:16:31 -0000 1.3 @@ -6,7 +6,24 @@ G³ównym zastosowaniem jest kontrolowanie stabilno¶ci pracy serwerów, które dzia³aj± pod du¿ym obci±¿eniem lub u¿ywaj± niestabilnego oprogramowania (np. aplikacji -,,gubi±cych'' pamiêæ). +,,gubi±cych'' pamiêæ). Dziêki programowi sysfence mo¿liwe jest proste zautomatyzowanie +czynno¶ci takich jak : +\begin{itemize} + \item + wy³±czanie us³ug sieciowych gdy system jest nadmiernie obci±¿ony i ponowne + uruchamianie ich gdy sytuacja siê unormuje, + \item + prze³adowywanie podejrzanie dzia³aj±cych programów gdy brakuje wolnej + pamiêci RAM lub stopieñ wykorzystania przestrzeni wymiany wskazuje na "wycieki" + pamiêci, + \item + ostrzeganie gdy koñczy siê miejsce na partycjach dyskowych, + \item + informowanie administratorów poprzez e-mail lub SMS o nieprawid³owo¶ciach w pracy systemu. +\end{itemize} +Powy¿sza lista stanowi tylko przyk³ad. Dziêki pe³nej swobodzie w konfiguracji +i mo¿liwo¶ci dzia³ania z prawami zwyk³ego u¿ytkownika, sysfence mo¿e byæ +wykorzystany do innych zastosowañ, nie tylko przez administratorów. Pisz±c projekt kierowali¶my siê zasadami panuj±cymi w ¶rodowisku OpenSource. Ca³y kod programu objêty jest licencj± GPL. Repozytorium CVS jest publicznie Index: specuzytkownika.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/specuzytkownika.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- specuzytkownika.tex 30 May 2004 09:27:32 -0000 1.3 +++ specuzytkownika.tex 30 May 2004 12:16:31 -0000 1.4 @@ -1,4 +1,4 @@ -\section{Specyfikacja u¿ytkownika} +\section{Specyfikacja u¿ytkowa} \subsection{Kompilacja i uruchamianie programu} @@ -29,7 +29,9 @@ Komunikacja z procesami odbywa siê za pomoc± sygna³ów. Przydatne sygna³y zamieszczone s± w tablicach~\ref{tab:s1} i~\ref{tab:s2}. - +Pos³uguj±c siê sygna³ami mo¿na tymczasowo wstrzymaæ sprawdzanie +ca³o¶ci lub pojedynczych regu³, a nastêpnie je wznowiæ bez konieczno¶ci +wprowadzania zmian do plików konfiguracyjnych. \begin{table}[ht] \centering \caption{Komunikacja z \texttt{sffetch}} @@ -112,7 +114,14 @@ \end{verbatim} } Nale¿y zwróciæ uwagê ¿e niektóre s³owa kluczowe posiadaj± zamienniki, np. zamiast \texttt{if} mo¿na u¿ywaæ \texttt{rule},\texttt{when} lub \texttt{on}; zamiast \texttt{run} -- -\texttt{invoke} \texttt{exec} \texttt{execute}. +\texttt{invoke} \texttt{exec} \texttt{execute}. S³owo \texttt{once} jest +opcjonalne i modyfikuje podejmowanie akcji. Wykonywana jest on tylko za +pierwszym razem gdy wyra¿enie przyje³o warto¶æ \texttt{TRUE}, dopiero +przyjêcie przez wyra¿enia warto¶ci \texttt{FALSE} umo¿liwia eventualne +powtórne wykonanie akcji. Komenda umieszczona po s³owie \texttt{run} +przekazywana jest do \texttt{/bin/sh} tak wiêc mo¿e to byæ zwyk³e polecenie, +program lub nawet skrypt. Sprawdzanie regu³y jest wstrzymane do chwili +zakoñczenia tej akcji. Parametrami monitorowanymi w wersji 0.12 programu s±: \begin{itemize} |
|
From: mkoperto <mko...@us...> - 2004-05-30 11:06:35
|
Update of /cvsroot/sysfence/sysfence/dokprojektlic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32048 Modified Files: testowanie.tex Log Message: o to chodzilo? Index: testowanie.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/testowanie.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- testowanie.tex 29 May 2004 23:36:00 -0000 1.2 +++ testowanie.tex 30 May 2004 11:06:23 -0000 1.3 @@ -2,18 +2,66 @@ W celu u³atwienia uruchomienia i testowania aplikacji wprowadzili¶my dodatkow± opcjê kompilacji. Polecenie \texttt{make debug} -komiluje programpodczas swojej pracy wypisuje na standardowe wyj¶cie -dodatkowe informacje. +kompiluje program z dodatkowymi informacjami dla programu debuguj±cego, +a program podczas dzia³ania wypisuje na standardowe wyj¶cie dodatkowe +informacje. -Testowanie aplikacji podzielili¶my na $3$ g³ówne etapy; mianowicie na -testowanie: -\begin{itemize} - \item czytania plików konfiguracyjnych i tworzenia regu³, - \item komunnikacji IPC, - \item obs³ugi sygna³ów. -\end{itemize} +Testowanie aplikacji podzielili¶my na $4$ g³ówne etapy: +\begin{enumerate} + \item \textbf{testowanie czytania plików konfiguracyjnych i tworzenia regu³} + \begin{itemize} + \item + program podczas debugowania wypisuje na standardowe wyj¶cie ilo¶æ wczytanych + regu³ oraz ich interpretacjê; testowanie polega³o na porównaniu tych danych + z informacjami zawartymi w plikach konfiguracyjnych; + \end{itemize} + + \item \textbf{testowanie monitorowania regu³ i podejmowania akcji} + \begin{itemize} + \item + proces \texttt{sffetch} po pobraniu danych z systemu wypisuje je; + dane porównywali¶my z danym dostarczanymi przez program \texttt{top}; + \item + ka¿dy z procesów \texttt{sfwatch} po sprawdzeniu warunku wypisuje informacje + czy zosta³ on spe³niony i czy akcja zosta³a wykonana; na podstawie + tych danych okre¶lali¶my czy wyra¿enie zosta³o dobrze zinterpretowane; + \end{itemize} + + \item \textbf{testowanie komunikacji IPC} + \begin{itemize} + \item + po wydaniu polecenia \texttt{ipcs -sm} dostêpne s± informacje o liczbie + procesów korzystaj±cych z pamiêci dzielonej (prawid³owa warto¶æ to + liczba procesów aplikacji) i liczbie przydzielonych + semaforów (prawid³owa warto¶æ to $1$); + \item + proces czekaj±cy na podniesienie semafora wypisuje o tym informacjê; analiza + tych informacji pozwala³a oceniæ czy sekcja krytyczna programu wykonywana + jest w danej chwili tylko przez jeden proces; + \item + testem poprawnego dzia³ania pamiêci dzielonej by³a ogólna poprawno¶æ dzia³ania + programu; gdyby bowiem informacje odczytywane z pamiêci dzielonej nie by³y + prawid³owe dzia³anie programu by³oby zupe³nie przypadkowe; + \end{itemize} + + \item \textbf{testowanie obs³ugi sygna³ów} + + \begin{itemize} + \item + program uruchomili¶my z zestawem regu³, które by³y zawsze spe³nione; + akcja ka¿dej regu³y polega³a na wypisaniu krótkiej informacji na + standardowym wyj¶ciu; wysy³aj±c sygna³y \texttt{SIGUSR1} i + \texttt{SIGCONT} obserwowali¶my: informacje zwracane przez program + \texttt{ps} oraz czy wznowione procesy dzia³aj± poprawnie; + \item + do procesów \texttt{sfwatch} wysy³ali¶my sygna³ \texttt{SIGTERM} koñcz±cy + ich dzia³anie; obserwowali¶my czy nie wp³ywa to na pracê pozosta³ych procesów; + \item + do procesu \texttt{sffetch} wysy³ali¶my sygna³ \texttt{SIGTERM} koñcz±cy + dzia³anie programu; obserwowali¶my czy koñczone s± wszystkie procesy i czy + zasoby IPC s± zwalniane (polecenie \texttt{ipcs -sm}). + \end{itemize} +\end{enumerate} Wszystkie b³êdy znalezione podczas testowania zosta³y usuniête. -\subsection{Testowanie} -\subsection{Testowanie komunikacji IPC} -\subsection{Testowanie obs³ugi sygna³ów} + |
|
From: mkoperto <mko...@us...> - 2004-05-30 09:27:44
|
Update of /cvsroot/sysfence/sysfence/dokprojektlic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18172 Modified Files: specuzytkownika.tex Log Message: nowa wersja Index: specuzytkownika.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/specuzytkownika.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- specuzytkownika.tex 29 May 2004 23:36:00 -0000 1.2 +++ specuzytkownika.tex 30 May 2004 09:27:32 -0000 1.3 @@ -18,7 +18,7 @@ Ka¿dy proces otrzymuje swoj± nazwê. W przypadku procesu rodzicielskiego jest to \texttt{sffetch}, a w przypadku procesów potomnych \texttt{sfwatch}. Nazwy procesów dostêpne s± np. po wykonaniu polecenia -\texttt{ps wxu} w kolumnie \texttt{COMMAND}. Podstawowe nazwy wzbogacane sa +\texttt{ps wxu} w kolumnie \texttt{COMMAND}. Podstawowe nazwy wzbogacane s± o dodatkowe informacje: \begin{itemize} \item \texttt{STOPPED} -- gdy proces zosta³ zatrzymany, @@ -27,7 +27,7 @@ \end{itemize} Informacje te umo¿liwiaj± okre¶lenie zadañ i stanów poszczególnych procesów. -Komunikacja z procesmi odbywa siê za pomoc± sygna³ów. Przydatne sygna³y +Komunikacja z procesami odbywa siê za pomoc± sygna³ów. Przydatne sygna³y zamieszczone s± w tablicach~\ref{tab:s1} i~\ref{tab:s2}. \begin{table}[ht] @@ -59,14 +59,60 @@ \subsection{Konfiguracja} -Konfiguracja programu wczytywana jest z plików. Ka¿dy plik mo¿e zwieraæ wiele regu³. -Przyk³adowy plik \texttt{example.conf} z regu³ami dostêpny jest w katalogu \texttt{doc/}. +Konfiguracja programu wczytywana jest z plików. Plik konfiguracyjny sk³ada +siê z regu³. Ka¿da regu³a sk³ada siê z trzech czê¶ci: nazwy, warunku i akcji. +Przyk³adowy plik z regu³ami dostêpny w \texttt{doc/example.conf}. Plik dodatkowo +zawiera skrócony opis sk³adni jêzyka regu³. Poni¿ej zamieszczamy precyzyjny +opis gramatyki. +{\scriptsize \begin{verbatim} +ruleset := rule [<string>] <block_expression> <rundata> [<logdata>] [<stepdata>] + | rule [<string>] <block_expression> <logdata> [<rundata>] [<stepdata>] +block_expression := { <expression> } +expression := <atomic> [<log_op> <expression>] + | <block_expression> [<log_op> <expression>] +logdata := log [once] +rundata := run [once] "command" +stepdata := step <integer> +atomic := <stat> <comp_op> <threshold> +stat := la1 | la5 | la15 | memfree | memused | swapfree | swapused + | <fs_cond> | <proc_cond> +fs_cond := spacefree "path" + | spaceavail "path" + | spaceused "path" +proc_cond := nproc [<user_list>] [<state_list>] +user_list := <uid> [, <user_list>] + | <username> [, <user_list>] +state_list := <state> [, <state_list>] +state := sleeping | running | stopped | uninterruptible | zombie +log_op := && | || +comp_op := = | < | > | <= | >= | != +\end{verbatim} } +Jest on dostêpny równie¿ w pliku \texttt{parseopt/grammar.txt}. Poni¿ej zamieszczamy kilka przyk³adowych regu³. -\begin{verbatim} -rule "" { - la1 >= 8.00 -} run once 'echo "SHOW FULL PROCESSLIST" | mysql | mail my...@em...' -\end{verbatim} +{\footnotesize \begin{verbatim} +if "something wrong" { + la15 > 4.0 + and + { + swapfree < 64M + or + memfree < 128M + } +} run 'echo "i wish you were here..." | sendsms +48ADMINCELLPHONE' + +rule "high load" { la1 > 3.0 and la15 > 2.0 } log + +when "memory low" { + freemem < 128M + or + swapused > 256M +} invoke once 'echo "go buy some memory" | mail me...@em...' +log once +step 60 +\end{verbatim} } +Nale¿y zwróciæ uwagê ¿e niektóre s³owa kluczowe posiadaj± zamienniki, np. zamiast +\texttt{if} mo¿na u¿ywaæ \texttt{rule},\texttt{when} lub \texttt{on}; zamiast \texttt{run} -- +\texttt{invoke} \texttt{exec} \texttt{execute}. Parametrami monitorowanymi w wersji 0.12 programu s±: \begin{itemize} @@ -81,4 +127,3 @@ \item \textbf{usedspace} -- wykorzystana przestrzeñ dla systemu plików, \item \textbf{availspace} -- dostêpne przestrzeñ dla systemu plików. \end{itemize} - |
|
From: mkoperto <mko...@us...> - 2004-05-29 23:36:09
|
Update of /cvsroot/sysfence/sysfence/dokprojektlic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1255/sysfence/dokprojektlic Modified Files: main.tex speckonstrukcyjna.tex specuzytkownika.tex testowanie.tex Log Message: + mistake Index: speckonstrukcyjna.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/speckonstrukcyjna.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- speckonstrukcyjna.tex 26 May 2004 20:02:34 -0000 1.1 +++ speckonstrukcyjna.tex 29 May 2004 23:36:00 -0000 1.2 @@ -0,0 +1,10 @@ +\section{Specyfikacja konstrukcyjna} + +Program z za³o¿enia ma + +\subsection{Podzia³ programu na modu³y} + +%modu³y + opis + + +\subsection{} Index: testowanie.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/testowanie.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- testowanie.tex 26 May 2004 20:02:34 -0000 1.1 +++ testowanie.tex 29 May 2004 23:36:00 -0000 1.2 @@ -0,0 +1,19 @@ +\section{Testowanie} + +W celu u³atwienia uruchomienia i testowania aplikacji wprowadzili¶my +dodatkow± opcjê kompilacji. Polecenie \texttt{make debug} +komiluje programpodczas swojej pracy wypisuje na standardowe wyj¶cie +dodatkowe informacje. + +Testowanie aplikacji podzielili¶my na $3$ g³ówne etapy; mianowicie na +testowanie: +\begin{itemize} + \item czytania plików konfiguracyjnych i tworzenia regu³, + \item komunnikacji IPC, + \item obs³ugi sygna³ów. +\end{itemize} +Wszystkie b³êdy znalezione podczas testowania zosta³y usuniête. + +\subsection{Testowanie} +\subsection{Testowanie komunikacji IPC} +\subsection{Testowanie obs³ugi sygna³ów} Index: specuzytkownika.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/specuzytkownika.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- specuzytkownika.tex 26 May 2004 20:02:34 -0000 1.1 +++ specuzytkownika.tex 29 May 2004 23:36:00 -0000 1.2 @@ -0,0 +1,84 @@ +\section{Specyfikacja u¿ytkownika} + +\subsection{Kompilacja i uruchamianie programu} + +Kompilacja programu nastêpuje po wydaniu polecenia \texttt{make} w katalogu +zawieraj±cym ¼ród³a. Program uruchamiany jest poleceniem \texttt{sysfence} z +przynajmniej jednym argumentem wskazuj±cym na plik konfiguracyjny. +W przypadku gdy pliki konfiguracyjne +nie zawieraj± b³êdów sk³adniowych program przechodzi +do pracy jako demon. + +\subsection{Komunikacja z programem} + +Po uruchomieniu programu dla ka¿dej regu³y tworzony jest proces potomny. +Proces rodzicielski odpowiedzialny jest za zbieranie informacji z systemu. +Informacje te udostêpniane s± procesom potomnym za pomoc± mechanizmów IPC. + +Ka¿dy proces otrzymuje swoj± nazwê. W przypadku procesu rodzicielskiego jest +to \texttt{sffetch}, a w przypadku procesów potomnych \texttt{sfwatch}. Nazwy procesów +dostêpne s± np. po wykonaniu polecenia +\texttt{ps wxu} w kolumnie \texttt{COMMAND}. Podstawowe nazwy wzbogacane sa +o dodatkowe informacje: +\begin{itemize} + \item \texttt{STOPPED} -- gdy proces zosta³ zatrzymany, + \item \texttt{EXEC} -- gdy proces potomny wykonuje polecenie pow³oki, + \item \texttt{'nazwa regu³y'} -- dla procesów potomnych. +\end{itemize} +Informacje te umo¿liwiaj± okre¶lenie zadañ i stanów poszczególnych procesów. + +Komunikacja z procesmi odbywa siê za pomoc± sygna³ów. Przydatne sygna³y +zamieszczone s± w tablicach~\ref{tab:s1} i~\ref{tab:s2}. + +\begin{table}[ht] +\centering +\caption{Komunikacja z \texttt{sffetch}} +\begin{tabular}{|c|p{8cm}|} \hline \label{tab:s1} +\textbf{Sygna³} & \multicolumn{1}{p{8cm}|}{\centering \textbf{Reakcja}} \\ \hline +\texttt{SIGUSR1} & zatrzymuje proces \texttt{sffetch} i wszystkie + \texttt{sfwatch}\\ \hline +\texttt{SIGCONT} & wznawia wszystkie procesy\\ \hline +\texttt{SIGTERM} & poprawnie koñczy prace programu: wysy³a \texttt{SIGTERM} do wszystkich + dzia³aj±cych procesów \texttt{sfwatch} oraz zwalnia wszystkie zasoby + (w szczególno¶ci IPC) \\ \hline +\end{tabular} \end{table} + +\begin{table}[ht] +\centering +\caption{Komunikacja z \texttt{sffwatch}} +\begin{tabular}{|c|p{8cm}|} \hline \label{tab:s2} +\textbf{Sygna³} & \multicolumn{1}{p{8cm}|}{\centering \textbf{Reakcja}} \\ \hline +\texttt{SIGUSR1} & zatrzymuje monitorowanie regu³y \\ \hline +\texttt{SIGCONT} & wznawia monitorowanie regu³y\\ \hline +\texttt{SIGTERM} & poprawnie koñczy monitorowanie regu³y, pozosta³e + regu³y s± nadal monitorowane\\ \hline +\end{tabular} \end{table} + +Nie zaleca siê wysy³ania sygna³ów \texttt{SIGSTOP} i \texttt{SIGKILL} gdy¿ mog± +spowodowaæ zak³ócenia w pracy pozosta³ych procesów aplikacji. + +\subsection{Konfiguracja} + +Konfiguracja programu wczytywana jest z plików. Ka¿dy plik mo¿e zwieraæ wiele regu³. +Przyk³adowy plik \texttt{example.conf} z regu³ami dostêpny jest w katalogu \texttt{doc/}. +Poni¿ej zamieszczamy kilka przyk³adowych regu³. +\begin{verbatim} +rule "" { + la1 >= 8.00 +} run once 'echo "SHOW FULL PROCESSLIST" | mysql | mail my...@em...' +\end{verbatim} + +Parametrami monitorowanymi w wersji 0.12 programu s±: +\begin{itemize} + \item \textbf{la1} -- obci±¿enie systemu w ostatniej minucie, + \item \textbf{la5} -- obci±¿enie systemu w ci±gu ostatnich $5$-ciu minut, + \item \textbf{la15} -- obci±¿enie systemu w ci±gu ostatnich $15$-stu minut, + \item \textbf{freemem} -- wolna pamiêæ RAM, + \item \textbf{usedswap} -- wykorzystana pamiêæ RAM, + \item \textbf{freeswap} -- wolna przestrzeñ wymiany (swap), + \item \textbf{useedswap} -- wykorzystana przesrzeñ wymiany (swap), + \item \textbf{freespace} -- wolna przesrzeñ dla systemu plików, + \item \textbf{usedspace} -- wykorzystana przestrzeñ dla systemu plików, + \item \textbf{availspace} -- dostêpne przestrzeñ dla systemu plików. +\end{itemize} + Index: main.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/main.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- main.tex 29 May 2004 17:53:36 -0000 1.4 +++ main.tex 29 May 2004 23:36:00 -0000 1.5 @@ -15,12 +15,15 @@ % abstract \input{abstract} +% table of contents +\tableofcontents + % tu dodawac rozdzialy: \input{wstep} -%\input{specuzytkownika} +\input{specuzytkownika} \input{wymagania} %\input{speckonstrukcyjna} -%\input{testowanie} +\input{testowanie} @@ -31,7 +34,5 @@ % bibliography %\input{bibliography} -% table of contents -\tableofcontents \end{document} |
|
From: mkoperto <mko...@us...> - 2004-05-29 17:53:45
|
Update of /cvsroot/sysfence/sysfence/dokprojektlic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9924 Modified Files: abstract.tex main.tex titlepage.tex Log Message: +streszczenie Index: titlepage.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/titlepage.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- titlepage.tex 26 May 2004 20:02:34 -0000 1.1 +++ titlepage.tex 29 May 2004 17:53:36 -0000 1.2 @@ -1,4 +1,4 @@ -\author{} -\title{Projekt licencjacki} +\author{Micha³ Sa³aban \and Miros³aw Kopertowski} +\title{Projekt Licencjacki\\ \textit{sysfence}} \maketitle Index: main.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/main.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- main.tex 29 May 2004 16:06:08 -0000 1.3 +++ main.tex 29 May 2004 17:53:36 -0000 1.4 @@ -13,7 +13,7 @@ \input{titlepage} % abstract -%\input{abstract} +\input{abstract} % tu dodawac rozdzialy: \input{wstep} Index: abstract.tex =================================================================== RCS file: /cvsroot/sysfence/sysfence/dokprojektlic/abstract.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- abstract.tex 29 May 2004 16:06:08 -0000 1.2 +++ abstract.tex 29 May 2004 17:53:36 -0000 1.3 @@ -1,2 +1,9 @@ -\abstract{} - +\abstract{Praca ta stanowi dokumentacjê do zdania rozwi±zanego +w ramach Projektu Licencjackiego. +Celem zadania by³o zaprojektowanie i implementacja +programu \textit{sysfence}. Program ten jest narzêdziem +monitoruj±cym okre¶lone zasoby systemu. U¿ytkownik zadaje +regu³y (czyli warunki okre¶lone na zasobach i odpowiadaj±ce im akcje), +a sysfence decyduje czy wykonaæ okre¶lon± akcjê. +Program dzia³a na platformach uniksowych. +} |
|
From: Michal S. <em...@us...> - 2004-05-29 17:31:14
|
Update of /cvsroot/sysfence/sysfence In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6455 Modified Files: datastruct.h Log Message: + new structure describing single process Index: datastruct.h =================================================================== RCS file: /cvsroot/sysfence/sysfence/datastruct.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- datastruct.h 29 May 2004 17:29:28 -0000 1.4 +++ datastruct.h 29 May 2004 17:31:05 -0000 1.5 @@ -170,6 +170,12 @@ } sf_fs_stat; typedef struct { + // Statistics of single process + char state; + uid_t uid; +} sf_proc_stat; + +typedef struct { // Main statistics database double load[3]; long int mem[ VA_LAST ]; |