- doc updates
authorAndrei Pelinescu-Onciul <andrei@iptel.org>
Tue, 24 Sep 2002 16:16:20 +0000 (16:16 +0000)
committerAndrei Pelinescu-Onciul <andrei@iptel.org>
Tue, 24 Sep 2002 16:16:20 +0000 (16:16 +0000)
- new makefile target: make bin (creates a binary ser distribution)
- various small fixes

INSTALL
Makefile
Makefile.defs
README
main.c
modules/tm/t_stats.c
test/perf.txt

diff --git a/INSTALL b/INSTALL
index f4ba671..b4d43ae 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -15,16 +15,12 @@ TODO
 --we'll probably go for mysql dependancy,
   then INSTALL needs to be completely
   changed
---see TROUBLES -- on some hosts, like mine (Jiri)
-  ser binds to 127.0.0.1 -- not really good for
-  quick-start
-
 
 
 Installation Notes
 
 Supported arhitectures: Linux/i386, Linux/armv4l, FreeBSD/i386, Solaris/sparc64,
-Win*/i386 (CYGWIN)
+Win*/i386 (CYGWIN) - only the core
 (for other arhitectures the Makefile must be edited)
 
 There are various configuration options defined in the Makefile.
@@ -220,46 +216,3 @@ C) Troubleshooting
 listen
 aliases
 
-
-TROUBLES
-
-In the following config, ser bound itself to /dev/lo -- not
-good for quick start.
-
-
-[jiri@cat jiri]$ hostname -a
-localhost.localdomain localhost 
-[jiri@cat jiri]$ hostname
-cat
-[jiri@cat jiri]$ 
-
-
-[root@cat log]# uname -a
-Linux cat 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 unknown
-
-/etc/hosts
-
-# Do not remove the following line, or various programs
-# that require network functionality will fail.
-127.0.0.1       cat     localhost.localdomain   localhost
-
-
-[root@cat log]# /sbin/ifconfig 
-eth0      Link encap:Ethernet  HWaddr 00:08:02:38:D9:A0  
-          inet addr:192.168.0.16  Bcast:192.168.0.255  Mask:255.255.255.0
-          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
-          RX packets:152917 errors:0 dropped:0 overruns:0 frame:0
-          TX packets:87759 errors:0 dropped:0 overruns:0 carrier:0
-          collisions:35 txqueuelen:100 
-          RX bytes:216441566 (206.4 Mb)  TX bytes:5542812 (5.2 Mb)
-          Interrupt:5 Base address:0x7000 
-
-lo        Link encap:Local Loopback  
-          inet addr:127.0.0.1  Mask:255.0.0.0
-          UP LOOPBACK RUNNING  MTU:16436  Metric:1
-          RX packets:162 errors:0 dropped:0 overruns:0 frame:0
-          TX packets:162 errors:0 dropped:0 overruns:0 carrier:0
-          collisions:0 txqueuelen:0 
-          RX bytes:10568 (10.3 Kb)  TX bytes:10568 (10.3 Kb)
-
-
index 9115a89..abdd0ab 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -83,9 +83,17 @@ static_modules:
 dbg: ser
        gdb -command debug.gdb
 
-
+.PHONY: tar
 tar: mantainer-clean 
-       tar -C .. -zcf ../$(NAME)-$(RELEASE)_src.tar.gz  $(notdir $(CURDIR)) 
+       $(TAR) -C .. -zcf ../$(NAME)-$(RELEASE)_src.tar.gz  $(notdir $(CURDIR)) 
+
+# binary dist. tar.gz
+.PHONY: bin
+bin:
+       mkdir -p tmp/ser/usr/local
+       $(MAKE) install prefix=tmp/ser/usr/local
+       $(TAR) -C tmp/ser/ -zcf ../$(NAME)-$(RELEASE)_$(OS)_$(ARCH).tar.gz .
+       rm -rf tmp/ser
 
 
 install: all mk-install-dirs install-cfg install-bin install-modules \
index 3e9a1f1..711e966 100644 (file)
@@ -8,10 +8,10 @@
 VERSION = 0
 PATCHLEVEL = 8
 SUBLEVEL = 7
-EXTRAVERSION = -15-tests
+EXTRAVERSION = -16
 
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
-OS = $(shell uname -s)
+OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")
 ARCH = $(shell uname -m |sed -e s/i.86/i386/ -e s/sun4u/sparc64/ )
 
 prefix = /usr/local
@@ -28,7 +28,15 @@ modules-dir = lib/ser/modules/
 doc-dir = share/doc/ser/
 man-dir = share/man/
 
+
+ifeq ($(OS), solaris)
+#use GNU versions
+INSTALL = ginstall
+TAR = gtar
+else
 INSTALL = install 
+TAR= tar
+endif
 INSTALL-CFG = $(INSTALL) -m 644
 INSTALL-BIN = $(INSTALL) -m 755
 INSTALL-MODULES = $(INSTALL) -m 755
@@ -431,7 +439,7 @@ ifeq ($(OS), Linux)
        #same as common
 endif
 
-ifeq  ($(OS), SunOS)
+ifeq  ($(OS), solaris)
        ifeq ($(mode), release)
                #use these only if you're using gcc with Solaris ld
                #LDFLAGS=-O2 $(PROFILE)
@@ -450,7 +458,7 @@ endif
        # -lrt needed for sched_yield
 endif
 
-ifeq ($(OS), FreeBSD)
+ifeq ($(OS), freebsd)
 
        YACC=yacc
        LIBS= -lfl  #dlopen is in libc
diff --git a/README b/README
index a007904..9d36c03 100644 (file)
--- a/README
+++ b/README
@@ -20,10 +20,12 @@ Configuration files:
        Global parameters:
                - debug
                - listen
+               - alias
                - port
                - fork
                - children_no
                - log_stderror
+               - fifo
                - loadmodule "path/modulename"
                ...
 
@@ -38,12 +40,15 @@ Configuration files:
                        - uri
                        - method
                        - src_ip
-                       - dst_ip [not working yet]
+                       - dst_ip
+                       - myself
                Rvalues:
                        - string
                        - integer
                        - ipv4 or ipv6 address
                        - netv4 or netv6 address
+                       - myself (matches any uri or ip address the server listens on or 
+                        registered as an alias for the server)
                        
        Commands:
                - forward
diff --git a/main.c b/main.c
index 4c3d53f..6169279 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1163,7 +1163,9 @@ int main(int argc, char** argv)
                r++;
        }
        /* get ips & fill the port numbers*/
+#ifdef EXTRA_DEBUG
        printf("Listening on \n");
+#endif
        for (r=0; r<sock_no;r++){
                he=resolvehost(sock_info[r].name.s);
                if (he==0){
@@ -1228,8 +1230,10 @@ int main(int argc, char** argv)
                strncpy(sock_info[r].port_no_str.s, port_no_str, strlen(port_no_str)+1);
                sock_info[r].port_no_str.len=strlen(port_no_str);
                
+#ifdef EXTRA_DEBUG
                printf("              %s [%s]:%s\n",sock_info[r].name.s,
                                sock_info[r].address_str.s, sock_info[r].port_no_str.s);
+#endif
        }
        /* removing duplicate addresses*/
        for (r=0; r<sock_no; r++){
@@ -1240,10 +1244,11 @@ int main(int argc, char** argv)
                                                sock_info[t].address.u.addr,
                                                sock_info[r].address.len)  == 0)
                                ){
+#ifdef EXTRA_DEBUG
                                printf("removing duplicate (%d) %s [%s] == (%d) %s [%s]\n",
                                                r, sock_info[r].name.s, sock_info[r].address_str.s,
                                                t, sock_info[t].name.s, sock_info[t].address_str.s);
-                               
+#endif
                                /* add the name to the alias list*/
                                if ((!sock_info[t].is_ip) && (
                                                (sock_info[t].name.len!=sock_info[r].name.len)||
index 55ee1e6..59cc033 100644 (file)
@@ -45,32 +45,32 @@ struct t_stats *cur_stats, *acc_stats;
 int print_stats(  FILE *f )
 {
        fprintf(f, "Current:\n");
-       fprintf(f, "# of transactions: %ld, ", 
+       fprintf(f, "# of transactions: %10lu, ", 
                cur_stats->transactions );
-       fprintf(f, "local: %ld, ",
+       fprintf(f, "local: %10lu, ",
                cur_stats->client_transactions );
-       fprintf(f, "waiting: %ld" CLEANUP_EOL ,
+       fprintf(f, "waiting: %10lu" CLEANUP_EOL ,
                cur_stats->waiting );
 
        fprintf(f, "Total:\n");
-       fprintf(f, "# of transactions: %ld,",
+       fprintf(f, "# of transactions: %10lu,",
                acc_stats->transactions );
-       fprintf(f, " local: %ld,",
+       fprintf(f, " local: %10lu,",
                acc_stats->client_transactions );
-       fprintf(f, " waiting: %ld" CLEANUP_EOL ,
+       fprintf(f, " waiting: %10lu" CLEANUP_EOL ,
                acc_stats->waiting );
 
-       fprintf(f, "Replied localy: %ld" CLEANUP_EOL ,
+       fprintf(f, "Replied localy: %10lu" CLEANUP_EOL ,
                acc_stats->replied_localy );
-       fprintf(f, "Completion status 6xx: %ld,",
+       fprintf(f, "Completion status 6xx: %10lu,",
                acc_stats->completed_6xx );
-       fprintf(f, " 5xx: %ld,",
+       fprintf(f, " 5xx: %10lu,",
                acc_stats->completed_5xx );
-       fprintf(f, " 4xx: %ld,",
+       fprintf(f, " 4xx: %10lu,",
                acc_stats->completed_4xx );
-       fprintf(f, " 3xx: %ld,",
+       fprintf(f, " 3xx: %10lu,",
                acc_stats->completed_3xx );
-       fprintf(f, "2xx: %ld" CLEANUP_EOL ,
+       fprintf(f, "2xx: %10lu" CLEANUP_EOL ,
                acc_stats->completed_2xx );
        
        return 1;
index 5d887c2..ec8f5cc 100644 (file)
@@ -100,5 +100,6 @@ ser gcc3.2         20             704  725       1137  1202      1460  1575
 
 stress:
 test calls: 1000000
-                   20          100 procs (cps)
+                  100          100 procs (cps)
+                                   107* - out of mem