Update of /cvsroot/monetdb/MonetDB5/src/modules/mal
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13472/src/modules/mal
Modified Files:
Tag: GDK-2
Makefile.ag batxml.mx clients.mx mserver.mx
Log Message:
propagated changes of Monday Sep 03 2007 - Thursday Sep 06 2007
from the development trunk to the GDK-2 branch
Index: Makefile.ag
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/Makefile.ag,v
retrieving revision 1.102.2.3
retrieving revision 1.102.2.4
diff -u -d -r1.102.2.3 -r1.102.2.4
--- Makefile.ag 23 Aug 2007 17:56:37 -0000 1.102.2.3
+++ Makefile.ag 6 Sep 2007 13:52:37 -0000 1.102.2.4
@@ -35,7 +35,7 @@
#datacell.mx radix.mx batxml.mx
HEADERS = h
- LIBS = ../../mal/libmal $(MONETDB_LIBS) -lbat -lstream $(MATH_LIBS) \
+ LIBS = ../../mal/libmal ../atoms/lib_xml $(MONETDB_LIBS) -lbat -lstream
$(MATH_LIBS) \
$(CLIENTS_LIBS) -lMapi \
$(SOCKET_LIBS) $(Z_LIBS) $(BZ_LIBS) \
$(MALLOC_LIBS) $(PTHREAD_LIBS) $(DL_LIBS)
Index: clients.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/clients.mx,v
retrieving revision 1.67
retrieving revision 1.67.2.1
diff -u -d -r1.67 -r1.67.2.1
--- clients.mx 1 Jul 2007 22:00:59 -0000 1.67
+++ clients.mx 6 Sep 2007 13:52:38 -0000 1.67.2.1
@@ -66,6 +66,14 @@
address CLTLogin
comment "Pseudo bat of client login time.";
+command getActions( ):bat[:int,:int]
+address CLTActions
+comment "Pseudo bat of client command counts.";
+
+command getTime( ):bat[:int,:lng]
+address CLTTime
+comment "Pseudo bat of client total time usage(in usec).";
+
command getUsers( ):bat[:int,:str]
address CLTusers
comment "Pseudo bat of users logged in.";
@@ -78,6 +86,13 @@
command wakeup(id:int):void
address CLTwakeup
comment "Wakeup a client process";
+
+command shutdown(forced:bit):void
+address CLTshutdown
+comment "Close all client connections. If forced=false the
+clients are moved into FINISHING mode, which means that
+the process stops at the next cycle of the scenario.
+If forced=true all client processes are immediately killed";
@-
@{
@include prelude.mx
@@ -110,6 +125,8 @@
clients_export str CLTexit(int *ret);
clients_export str CLTquit(int *ret);
clients_export str CLTLogin(int *ret);
+clients_export str CLTActions(int *ret);
+clients_export str CLTTime(int *ret);
clients_export str CLTInfo(int *ret);
clients_export str CLTsuspend(int *ret, int *id);
@@ -123,6 +140,7 @@
clients_export str CLTaddScenario(int *ret, str *usr, str *sc);
clients_export str CLTremoveScenario(int *ret, str *usr, str *sc);
clients_export str CLTgetUsers(bat *ret, bat *scens);
+clients_export str CLTshutdown(int *ret, bit *forced);
#endif /* _CLIENTS_H */
@c
@@ -270,6 +288,42 @@
@:Pseudo(client,login,)@
return MAL_SUCCEED;
}
+str
+CLTActions(int *ret)
+{
+ BAT *b = BATnew(TYPE_int, TYPE_int, 12);
+ int i;
+
+ if (b == 0)
+ throw(MAL, "clients.getActions", "failed to create BAT");
+ for (i = 0; i < MAL_MAXCLIENTS; i++) {
+ Client c = mal_clients+i;
+ if (c->mode >= CLAIMED && c->user != oid_nil) {
+ BUNins(b, &i, &c->actions, FALSE);
+ }
+ }
+ if (!(b->batDirty&2)) b = BATsetaccess(b, BAT_READ);
+ @:Pseudo(client,actions,)@
+ return MAL_SUCCEED;
+}
+str
+CLTTime(int *ret)
+{
+ BAT *b = BATnew(TYPE_int, TYPE_lng, 12);
+ int i;
+
+ if (b == 0)
+ throw(MAL, "clients.getTime", "failed to create BAT");
+ for (i = 0; i < MAL_MAXCLIENTS; i++) {
+ Client c = mal_clients+i;
+ if (c->mode >= CLAIMED && c->user != oid_nil) {
+ BUNins(b, &i, &c->totaltime, FALSE);
+ }
+ }
+ if (!(b->batDirty&2)) b = BATsetaccess(b, BAT_READ);
+ @:Pseudo(client,usec,)@
+ return MAL_SUCCEED;
+}
@-
Produce a list of clients currently logged in
@@ -468,4 +522,10 @@
rethrow("getUsers", tmp, AUTHgetUsers(ret, scens));
return(MAL_SUCCEED);
}
+
+str CLTshutdown(int *ret, bit *forced) {
+ (void) ret;
+ (void) forced;
+ throw(MAL,"clients.shutdown","not yet implemented");
+}
@}
Index: mserver.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/mserver.mx,v
retrieving revision 1.88.2.1
retrieving revision 1.88.2.2
diff -u -d -r1.88.2.1 -r1.88.2.2
--- mserver.mx 17 Aug 2007 15:37:03 -0000 1.88.2.1
+++ mserver.mx 6 Sep 2007 13:52:38 -0000 1.88.2.2
@@ -1136,7 +1136,8 @@
int ret;
SERVERstop(&ret);
/* remove any port identity file */
- system("rm -rf .*_port");
+ ret = system("rm -rf .*_port");
+ (void) ret;
}
@+ Remote Processing
The remainder of the file contains the wrappers around
Index: batxml.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/batxml.mx,v
retrieving revision 1.4.2.4
retrieving revision 1.4.2.5
diff -u -d -r1.4.2.4 -r1.4.2.5
--- batxml.mx 3 Sep 2007 13:08:18 -0000 1.4.2.4
+++ batxml.mx 6 Sep 2007 13:52:37 -0000 1.4.2.5
@@ -729,7 +729,7 @@
BAT *j, *r, *g, *b, *bn;
BUN p,q;
int xx;
- oid gid,o=0;
+ oid gid = 0,o=0;
int first= 1;
str t;
str buf= GDKmalloc(BUFSIZ);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins