]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-server-argument-consistency-and-jumbograms-off-20080824
authorDerrick Brashear <shadow@dementia.org>
Mon, 25 Aug 2008 02:15:18 +0000 (02:15 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 25 Aug 2008 02:15:18 +0000 (02:15 +0000)
LICENSE IPL10
FIXES 108703

go through and make servers able to take debug log level on command line;
add -jumbo; default to -nojumbo

(cherry picked from commit 12c8abc69030d3368194b148c692215c61b5da9c)

doc/man-pages/pod8/fileserver.pod
doc/man-pages/pod8/ptserver.pod
doc/man-pages/pod8/vlserver.pod
doc/man-pages/pod8/volserver.pod
src/ptserver/ptserver.c
src/viced/viced.c
src/vlserver/vlserver.c
src/volser/volmain.c

index 9a1309aea31705f44a98b2b8745b87d5cb45cdcc..64964e8c2e0dd2b7eebafec16346e3dcb091ed45 100644 (file)
@@ -20,7 +20,7 @@ B<fileserver> S<<< [B<-auditlog> <I<path to log file>>] >>>
     S<<< [B<-busyat> <I<< redirect clients when queue > n >>>] >>>
     [B<-nobusy>] S<<< [B<-rxpck> <I<number of rx extra packets>>] >>>
     [B<-rxdbg>] [B<-rxdbge>] S<<< [B<-rxmaxmtu> <I<bytes>>] >>>
-    [B<-allow-dotted-principal>]
+    [B<-allow-dotted-principal>] [B<-jumbo>] [B<-nojumbo>]
     S<<< [B<-rxbind> <I<address to bind the Rx socket to>>] >>>
     S<<< [B<-vattachpar> <I<number of volume attach threads>>] >>>
     S<<< [B<-m> <I<min percentage spare in partition>>] >>>
@@ -404,6 +404,18 @@ listed in the local F</usr/afs/etc/ThisCell> file.
 Sets the size of the UDP buffer, which is 64 KB by default. Provide a
 positive integer, preferably larger than the default.
 
+=item B<-jumbo>
+
+Allows the server to send and receive jumbograms. A jumbogram is
+a large-size packet composed of 2 to 4 normal Rx data packets that share
+the same header. The fileserver does not use jumbograms by default, as some
+routers are not capable of properly breaking the jumbogram into smaller
+packets and reassembling them.
+
+=item B<-nojumbo>
+  
+Deprecated; jumbograms are disabled by default.
+
 =item B<-enable_peer_stats>
 
 Activates the collection of Rx statistics and allocates memory for their
index 9879fe9b7bd53287b0238b80a6da1c8149fc312b..ab94704c6f6a1072b3da688048f135cf5acbc2de 100644 (file)
@@ -7,7 +7,7 @@ ptserver - Initializes the Protection Server
 =for html
 <div class="synopsis">
 
-B<ptserver> S<<< [B<-database> <I<db path>>] >>> S<<< [B<-p> <I<number of processes>>] >>>
+B<ptserver> S<<< [B<-database> <I<db path>>] >>> S<<< [B<-p> <I<number of processes>>] >>> S<<< [B<-d> <I<debug level>>] >>>
     [B<-rebuildDB>] S<<< [B<-groupdepth> <I<# of nested groups>>] >>>
     S<<< [B<-default_access> <I<user access mask>> <I<group access mask>>] >>>
     [B<-restricted>] [B<-enable_peer_stats>]
@@ -68,6 +68,13 @@ suites. Provide the command name and all option names in full.
 
 =over 4
 
+=item B<-d> <I<debug level>>
+
+Sets the detail level for the debugging trace written to the
+F</usr/afs/logs/PtLog> file. Provide one of the following values, each
+of which produces an increasingly detailed trace: C<0>, C<1>, C<5>, C<25>,
+and C<125>. 
+
 =item B<-database> <I<db path>>, B<-db> <I<db path>>
 
 Specifies the pathname of an alternate directory in which the Protection
index 5a03f11978196f790b1f0886b8438a3f64339d67..194388fafbd2693faeaf866b474302145fd8ff10 100644 (file)
@@ -7,7 +7,7 @@ vlserver - Initializes the Volume Location Server
 =for html
 <div class="synopsis">
 
-B<vlserver> S<<< [B<-p> <I<lwp processes>>] >>> [B<-nojumbo>]
+B<vlserver> S<<< [B<-p> <I<lwp processes>>] >>> [B<-nojumbo>] [B<-jumbo>] S<<< [B<-d> <I<debug level>>] >>>
     [B<-allow-dotted-principal>] [B<-enable_peer_stats>] [B<-enable_process_stats>] 
     [B<-help>]
 
@@ -60,14 +60,25 @@ suites. Provide the command name and all option names in full.
 Sets the number of server lightweight processes (LWPs) to run.  Provide an
 integer between C<4> and C<16>. The default is C<9>.
 
-=item B<-nojumbo>
+=item B<-d> <I<debug level>>
+
+Sets the detail level for the debugging trace written to the
+F</usr/afs/logs/VLLog> file. Provide one of the following values, each
+of which produces an increasingly detailed trace: C<0>, C<1>, C<5>, C<25>,
+and C<125>. 
+
+=item B<-jumbo>
 
-Prohibits the server from sending or receiving jumbograms. A jumbogram is
+Allows the server to send and receive jumbograms. A jumbogram is
 a large-size packet composed of 2 to 4 normal Rx data packets that share
-the same header. The VL Server uses jumbograms by default, but some
+the same header. The VL Server does not use jumbograms by default, as some
 routers are not capable of properly breaking the jumbogram into smaller
 packets and reassembling them.
 
+=item B<-nojumbo>
+
+Deprecated; Jumbograms are disabled by default. 
+
 =item B<-enable_peer_stats>
 
 Activates the collection of Rx statistics and allocates memory for their
index 8f13a06ae1a8b0794e536a2d65d239db3f43bfd0..8970414940058921903f12e41b7e96ffa1c84013 100644 (file)
@@ -9,6 +9,8 @@ volserver - Initializes the Volume Server component of the fs process
 
 B<volserver> [B<-log>] S<<< [B<-p> <I<number of processes>>] >>>
     S<<< [B<-udpsize> <I<size of socket buffer in bytes>>] >>>
+    S<<< [B<-d> <I<debug level>>] >>>
+    [B<-nojumbo>] [B<-jumbo>] 
     [B<-enable_peer_stats>] [B<-enable_process_stats>] 
     [B<-allow-dotted-principal>] [B<-help>]
 
@@ -45,6 +47,13 @@ suites. Provide the command name and all option names in full.
 
 =over 4
 
+=item B<-d> <I<debug level>>
+
+Sets the detail level for the debugging trace written to the
+F</usr/afs/logs/VolserLog> file. Provide one of the following values, each
+of which produces an increasingly detailed trace: C<0>, C<1>, C<5>, C<25>,
+and C<125>. 
+
 =item B<-log>
 
 Records in the /usr/afs/logs/VolserLog file the names of all users who
@@ -62,6 +71,18 @@ integer between C<4> and C<16>. The default is C<9>.
 Sets the size of the UDP buffer in bytes, which is 64 KB by
 default. Provide a positive integer, preferably larger than the default.
 
+=item B<-jumbo>
+
+Allows the server to send and receive jumbograms. A jumbogram is
+a large-size packet composed of 2 to 4 normal Rx data packets that share
+the same header. The volserver does not use jumbograms by default, as some
+routers are not capable of properly breaking the jumbogram into smaller
+packets and reassembling them.
+
+=item B<-nojumbo>
+
+Deprecated; jumbograms are disabled by default.
+
 =item B<-enable_peer_stats>
 
 Activates the collection of Rx statistics and allocates memory for their
index 527efb5e1fb963f6eb2983fffc4172e9c51773ad..6e76174d565ed09d5cf554f1c4e20c50a5180740 100644 (file)
@@ -161,6 +161,7 @@ extern int afsconf_CheckAuth();
 int pr_realmNameLen;
 char *pr_realmName;
 
+int debuglevel = 0;
 int restricted = 0;
 int rxMaxMTU = -1;
 int rxBind = 0;
@@ -281,6 +282,13 @@ main(int argc, char **argv)
        if ((strncmp(arg, "-database", alen) == 0)
            || (strncmp(arg, "-db", alen) == 0)) {
            pr_dbaseName = argv[++a];   /* specify a database */
+       } else if (strcmp(argv[a], "-d") == 0) {
+           if ((a + 1) >= argc) {
+               fprintf(stderr, "missing argument for -d\n"); 
+               return -1; 
+           }
+           debuglevel = atoi(argv[++a]);
+           LogLevel = debuglevel;
        } else if (strncmp(arg, "-p", alen) == 0) {
            lwps = atoi(argv[++a]);
            if (lwps > 16) {    /* maximum of 16 */
@@ -379,7 +387,7 @@ main(int argc, char **argv)
 #ifndef AFS_NT40_ENV
            printf("Usage: ptserver [-database <db path>] "
                   "[-auditlog <log path>] "
-                  "[-syslog[=FACILITY]] "
+                  "[-syslog[=FACILITY]] [-d <debug level>] "
                   "[-p <number of processes>] [-rebuild] "
                   "[-groupdepth <depth>] "
                   "[-restricted] [-rxmaxmtu <bytes>] [-rxbind] "
@@ -389,7 +397,7 @@ main(int argc, char **argv)
                   "[-help]\n");
 #else /* AFS_NT40_ENV */
            printf("Usage: ptserver [-database <db path>] "
-                  "[-auditlog <log path>] "
+                  "[-auditlog <log path>] [-d <debug level>] "
                   "[-p <number of processes>] [-rebuild] [-rxbind] "
                   "[-allow-dotted-principals] "
                   "[-default_access default_user_access default_group_access] "
@@ -399,7 +407,7 @@ main(int argc, char **argv)
 #else
 #ifndef AFS_NT40_ENV
            printf("Usage: ptserver [-database <db path>] "
-                  "[-auditlog <log path>] "
+                  "[-auditlog <log path>] [-d <debug level>] "
                   "[-syslog[=FACILITY]] "
                   "[-p <number of processes>] [-rebuild] "
                   "[-enable_peer_stats] [-enable_process_stats] "
@@ -409,7 +417,7 @@ main(int argc, char **argv)
                   "[-help]\n");
 #else /* AFS_NT40_ENV */
            printf("Usage: ptserver [-database <db path>] "
-                  "[-auditlog <log path>] "
+                  "[-auditlog <log path>] [-d <debug level>] "
                   "[-default_access default_user_access default_group_access] "
                   "[-restricted] [-rxmaxmtu <bytes>] [-rxbind] "
                   "[-allow-dotted-principals] "
index a42950b480d14d0467c724c51ff724ab79568d2f..992ffd3881391d6a002bfac49f451b0130e60ae5 100644 (file)
@@ -157,7 +157,7 @@ int SawSpare;
 int SawPctSpare;
 int debuglevel = 0;
 int printBanner = 0;
-int rxJumbograms = 1;          /* default is to send and receive jumbograms. */
+int rxJumbograms = 0;          /* default is to not send and receive jumbograms. */
 int rxBind = 0;                /* don't bind */
 int rxkadDisableDotCheck = 0;      /* disable check for dot in principal name */ 
 int rxMaxMTU = -1;
@@ -756,6 +756,8 @@ FlagMsg()
     strcat(buffer, "[-udpsize <size of socket buffer in bytes>] ");
     strcat(buffer, "[-sendsize <size of send buffer in bytes>] ");
     strcat(buffer, "[-abortthreshold <abort threshold>] ");
+    strcat(buffer, "[-nojumbo (disable jumbogram network packets - deprecated)] ");
+    strcat(buffer, "[-jumbo (enable jumbogram network packets)] ");
 /*   strcat(buffer, "[-enable_peer_stats] "); */
 /*   strcat(buffer, "[-enable_process_stats] "); */
     strcat(buffer, "[-help]\n");
@@ -1056,6 +1058,8 @@ ParseArgs(int argc, char *argv[])
 #endif
        else if (!strcmp(argv[i], "-nojumbo")) {
            rxJumbograms = 0;
+       } else if (!strcmp(argv[i], "-jumbo")) {
+           rxJumbograms = 1;
        } else if (!strcmp(argv[i], "-rxbind")) {
            rxBind = 1;
        } else if (!strcmp(argv[i], "-allow-dotted-principals")) {
index 2be4314ed94c742925a3a4299c68a0bb5fd0872b..b0e509f818453bd4aff557fc9d8cc569e8d7568b 100644 (file)
@@ -63,10 +63,11 @@ extern int afsconf_ServerAuth();
 static void *CheckSignal(void*);
 int LogLevel = 0;
 int smallMem = 0;
-int rxJumbograms = 1;          /* default is to send and receive jumbo grams */
+int rxJumbograms = 0;          /* default is to not send and receive jumbo grams */
 int rxMaxMTU = -1;
 afs_int32 rxBind = 0;
 int rxkadDisableDotCheck = 0;
+int debuglevel = 0;
 
 #define ADDRSPERSITE 16         /* Same global is in rx/rx_user.c */
 afs_uint32 SHostAddrs[ADDRSPERSITE];
@@ -166,7 +167,6 @@ main(argc, argv)
     for (index = 1; index < argc; index++) {
        if (strcmp(argv[index], "-noauth") == 0) {
            noAuth = 1;
-
        } else if (strcmp(argv[index], "-p") == 0) {
            lwps = atoi(argv[++index]);
            if (lwps > MAXLWP) {
@@ -174,10 +174,17 @@ main(argc, argv)
                       lwps, MAXLWP);
                lwps = MAXLWP;
            }
-
+       } else if (strcmp(argv[index], "-d") == 0) {
+           if ((index + 1) >= argc) {
+               fprintf(stderr, "missing argument for -d\n"); 
+               return -1; 
+           }
+           debuglevel = atoi(argv[++index]);
+           LogLevel = debuglevel;
        } else if (strcmp(argv[index], "-nojumbo") == 0) {
            rxJumbograms = 0;
-
+       } else if (strcmp(argv[index], "-jumbo") == 0) {
+           rxJumbograms = 1;
        } else if (strcmp(argv[index], "-rxbind") == 0) {
            rxBind = 1;
        } else if (strcmp(argv[index], "-allow-dotted-principals") == 0) {
@@ -249,14 +256,14 @@ main(argc, argv)
 #ifndef AFS_NT40_ENV
            printf("Usage: vlserver [-p <number of processes>] [-nojumbo] "
                   "[-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals] "
-                  "[-auditlog <log path>] "
+                  "[-auditlog <log path>] [-jumbo] [-d <debug level>] "
                   "[-syslog[=FACILITY]] "
                   "[-enable_peer_stats] [-enable_process_stats] "
                   "[-help]\n");
 #else
            printf("Usage: vlserver [-p <number of processes>] [-nojumbo] "
                   "[-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals] "
-                  "[-auditlog <log path>] "
+                  "[-auditlog <log path>] [-jumbo] [-d <debug level>] "
                   "[-enable_peer_stats] [-enable_process_stats] "
                   "[-help]\n");
 #endif
index 513907778a8719c4ba220671d59a15a3f73ed5c8..ecb6066671906db73729023edf926d8b1cbf6f1a 100644 (file)
@@ -85,6 +85,7 @@ extern void RXSTATS_ExecuteRequest();
 struct afsconf_dir *tdir;
 static afs_int32 runningCalls = 0;
 int DoLogging = 0;
+int debuglevel = 0; 
 #define MAXLWP 16
 int lwps = 9;
 int udpBufSize = 0;            /* UDP buffer size for receive */
@@ -243,7 +244,7 @@ main(int argc, char **argv)
     int rxpackets = 100;
     char commandLine[150];
     int i;
-    int rxJumbograms = 1;      /* default is to send and receive jumbograms. */
+    int rxJumbograms = 0;      /* default is to send and receive jumbograms. */
     int rxMaxMTU = -1;
     int bufSize = 0;           /* temp variable to read in udp socket buf size */
     afs_uint32 host = ntohl(INADDR_ANY);
@@ -295,6 +296,13 @@ main(int argc, char **argv)
            rxBind = 1;
        } else if (strcmp(argv[code], "-allow-dotted-principals") == 0) {
            rxkadDisableDotCheck = 1;
+       } else if (strcmp(argv[code], "-d") == 0) {
+           if ((code + 1) >= argc) {
+               fprintf(stderr, "missing argument for -d\n"); 
+               return -1; 
+           }
+           debuglevel = atoi(argv[++code]);
+           LogLevel = debuglevel;
        } else if (strcmp(argv[code], "-p") == 0) {
            lwps = atoi(argv[++code]);
            if (lwps > MAXLWP) {
@@ -334,6 +342,8 @@ main(int argc, char **argv)
                printf("Warning: auditlog %s not writable, ignored.\n", fileName);
        } else if (strcmp(argv[code], "-nojumbo") == 0) {
            rxJumbograms = 0;
+       } else if (strcmp(argv[code], "-jumbo") == 0) {
+           rxJumbograms = 1;
        } else if (!strcmp(argv[code], "-rxmaxmtu")) {
            if ((code + 1) >= argc) {
                fprintf(stderr, "missing argument for -rxmaxmtu\n"); 
@@ -385,16 +395,16 @@ main(int argc, char **argv)
          usage:
 #ifndef AFS_NT40_ENV
            printf("Usage: volserver [-log] [-p <number of processes>] "
-                  "[-auditlog <log path>] "
-                  "[-nojumbo] [-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals] "
+                  "[-auditlog <log path>] [-d <debug level>] "
+                  "[-nojumbo] [-jumbo] [-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals] "
                   "[-udpsize <size of socket buffer in bytes>] "
                   "[-syslog[=FACILITY]] "
                   "[-enable_peer_stats] [-enable_process_stats] "
                   "[-help]\n");
 #else
            printf("Usage: volserver [-log] [-p <number of processes>] "
-                  "[-auditlog <log path>] "
-                  "[-nojumbo] [-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals] "
+                  "[-auditlog <log path>] [-d <debug level>] "
+                  "[-nojumbo] [-jumbo] [-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals] "
                   "[-udpsize <size of socket buffer in bytes>] "
                   "[-enable_peer_stats] [-enable_process_stats] "
                   "[-help]\n");