home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 May / INTERNET103.ISO / pc / software / windows / building / mysql / data1.cab / Development / scripts / mysqld_multi < prev    next >
Encoding:
Text File  |  2003-01-22  |  18.0 KB  |  611 lines

  1. #!/usr/bin/perl
  2.  
  3. use Getopt::Long;
  4. use POSIX qw(strftime);
  5.  
  6. $|=1;
  7. $VER="2.2";
  8.  
  9. $opt_config_file   = undef();
  10. $opt_example       = 0;
  11. $opt_help          = 0;
  12. $opt_log           = "/tmp/mysqld_multi.log";
  13. $opt_mysqladmin    = "/usr/local/mysql/bin/mysqladmin";
  14. $opt_mysqld        = "/usr/local/mysql/libexec/mysqld";
  15. $opt_no_log        = 0;
  16. $opt_password      = undef();
  17. $opt_tcp_ip        = 0;
  18. $opt_user          = "root";
  19. $opt_version       = 0;
  20.  
  21. my ($mysqld, $mysqladmin, $groupids, $homedir, $my_progname);
  22.  
  23. $homedir = $ENV{HOME};
  24. $my_progname = $0;
  25. $my_progname =~ s/.*[\/]//;
  26.  
  27. main();
  28.  
  29. ####
  30. #### main sub routine
  31. ####
  32.  
  33. sub main
  34. {
  35.   my ($flag_exit);
  36.  
  37.   if (!defined(my_which(my_print_defaults)))
  38.   {
  39.     # We can't throw out yet, since --version, --help, or --example may
  40.     # have been given
  41.     print "WARNING! my_print_defaults command not found!\n";
  42.     print "Please make sure you have this command available and\n";
  43.     print "in your path. The command is available from the latest\n";
  44.     print "MySQL distribution.\n";
  45.   }
  46.   my @defops = `my_print_defaults mysqld_multi`;
  47.   chop @defops;
  48.   splice @ARGV, 0, 0, @defops;
  49.   GetOptions("help","example","version","mysqld=s","mysqladmin=s",
  50.          "config-file=s","user=s","password=s","log=s","no-log","tcp-ip")
  51.   || die "Wrong option! See $my_progname --help for detailed information!\n";
  52.  
  53.   $groupids = $ARGV[1];
  54.  
  55.   if ($opt_version)
  56.   {
  57.     print "$my_progname version $VER by Jani Tolonen\n";
  58.     exit(0);
  59.   }
  60.   example() if ($opt_example);
  61.   if (!defined(($mysqld = my_which($opt_mysqld))))
  62.   {
  63.     print "Couldn't find the mysqld binary! Tried: $opt_mysqld\n";
  64.     $flag_exit=1;
  65.   }
  66.   if (!defined(($mysqladmin = my_which($opt_mysqladmin))))
  67.   {
  68.     print "Couldn't find the mysqladmin binary! Tried: $opt_mysqladmin\n";
  69.     $flag_exit=1;
  70.   }
  71.   usage() if ($opt_help);
  72.   if ($flag_exit)
  73.   {
  74.     print "Error with an option, see $my_progname --help for more info!\n";
  75.     exit(1);
  76.   }
  77.   if (!defined(my_which(my_print_defaults)))
  78.   {
  79.     print "ABORT: Can't find command 'my_print_defaults'!\n";
  80.     print "This command is available from the latest MySQL\n";
  81.     print "distribution. Please make sure you have the command\n";
  82.     print "in your PATH.\n";
  83.     exit(1);
  84.   }
  85.   usage() if (!defined($ARGV[0]) ||
  86.           ($ARGV[0] ne 'start' && $ARGV[0] ne 'START' &&
  87.            $ARGV[0] ne 'stop' && $ARGV[0] ne 'STOP' &&
  88.            $ARGV[0] ne 'report' && $ARGV[0] ne 'REPORT'));
  89.  
  90.   if (!$opt_no_log)
  91.   {
  92.     w2log("$my_progname log file version $VER; run: ",
  93.       "$opt_log", 1, 0);
  94.   }
  95.   else
  96.   {
  97.     print "$my_progname log file version $VER; run: ";
  98.     print strftime "%a %b %e %H:%M:%S %Y", localtime;
  99.     print "\n";
  100.   }
  101.   if ($ARGV[0] eq 'report' || $ARGV[0] eq 'REPORT')
  102.   {
  103.     report_mysqlds();
  104.   }
  105.   elsif ($ARGV[0] eq 'start' || $ARGV[0] eq 'START')
  106.   {
  107.     start_mysqlds();
  108.   }
  109.   else
  110.   {
  111.     stop_mysqlds();
  112.   }
  113. }
  114.  
  115. ####
  116. #### Report living and not running MySQL servers
  117. ####
  118.  
  119. sub report_mysqlds
  120. {
  121.   my (@groups, $com, $i, @options, $j, $pec);
  122.  
  123.   print "Reporting MySQL servers\n";
  124.   if (!$opt_no_log)
  125.   {
  126.     w2log("\nReporting MySQL servers","$opt_log",0,0);
  127.   }
  128.   @groups = &find_groups($groupids);
  129.   for ($i = 0; defined($groups[$i]); $i++)
  130.   {
  131.     $com = "my_print_defaults";
  132.     $com.= defined($opt_config_file) ? " --config-file=$opt_config_file" : "";
  133.     $com.= " $groups[$i]";
  134.     @options = `$com`;
  135.     chop @options;
  136.  
  137.     $com = "$mysqladmin -u $opt_user";
  138.     $com.= defined($opt_password) ? " -p$opt_password" : "";
  139.     $com.= $opt_tcp_ip ? " -h 127.0.0.1" : "";
  140.     for ($j = 0; defined($options[$j]); $j++)
  141.     {
  142.       if ((($options[$j] =~ m/^(\-\-socket\=)(.*)$/) && !$opt_tcp_ip) ||
  143.       ($options[$j] =~ m/^(\-\-port\=)(.*)$/))
  144.       {
  145.     $com.= " $options[$j]";
  146.       }
  147.     }
  148.     $com.= " ping >> /dev/null 2>&1";
  149.     system($com);
  150.     $pec = $? >> 8;
  151.     if ($pec)
  152.     {
  153.       print "MySQL server from group: $groups[$i] is not running\n";
  154.       if (!$opt_no_log)
  155.       {
  156.     w2log("MySQL server from group: $groups[$i] is not running",
  157.           "$opt_log", 0, 0);
  158.       }
  159.     }
  160.     else
  161.     {
  162.       print "MySQL server from group: $groups[$i] is running\n";
  163.       if (!$opt_no_log)
  164.       {
  165.     w2log("MySQL server from group: $groups[$i] is running",
  166.           "$opt_log", 0, 0);
  167.       }
  168.     }
  169.   }
  170.   if (!$i)
  171.   {
  172.     print "No groups to be reported (check your GNRs)\n";
  173.     if (!$opt_no_log)
  174.     {
  175.       w2log("No groups to be reported (check your GNRs)", "$opt_log", 0, 0);
  176.     }
  177.   }
  178. }
  179.  
  180. ####
  181. #### start multiple servers
  182. ####
  183.  
  184. sub start_mysqlds()
  185. {
  186.   my (@groups, $com, $i, @options, $j);
  187.  
  188.   if (!$opt_no_log)
  189.   {
  190.     w2log("\nStarting MySQL servers\n","$opt_log",0,0);
  191.   }
  192.   else
  193.   {
  194.     print "\nStarting MySQL servers\n";
  195.   }
  196.   @groups = &find_groups($groupids);
  197.   for ($i = 0; defined($groups[$i]); $i++)
  198.   {
  199.     $com = "my_print_defaults";
  200.     $com.= defined($opt_config_file) ? " --config-file=$opt_config_file" : "";
  201.     $com.= " $groups[$i]";
  202.     @options = `$com`;
  203.     chop @options;
  204.  
  205.     $com = "$mysqld";
  206.     for ($j = 0; defined($options[$j]); $j++)
  207.     {
  208.       $com.= " $options[$j]";
  209.     }
  210.     $com.= " >> $opt_log 2>&1" if (!$opt_no_log);
  211.     $com.= " &";
  212.     system($com);
  213.   }
  214.   if (!$i && !$opt_no_log)
  215.   {
  216.     w2log("No MySQL servers to be started (check your GNRs)",
  217.       "$opt_log", 0, 0);
  218.   }
  219. }
  220.  
  221. ####
  222. #### stop multiple servers
  223. ####
  224.  
  225. sub stop_mysqlds()
  226. {
  227.   my (@groups, $com, $i, @options, $j);
  228.  
  229.   if (!$opt_no_log)
  230.   {
  231.     w2log("\nStopping MySQL servers\n","$opt_log",0,0);
  232.   }
  233.   else
  234.   {
  235.     print "\nStopping MySQL servers\n";
  236.   }
  237.   @groups = &find_groups($groupids);
  238.   for ($i = 0; defined($groups[$i]); $i++)
  239.   {
  240.     $com = "my_print_defaults";
  241.     $com.= defined($opt_config_file) ? " --config-file=$opt_config_file" : "";
  242.     $com.= " $groups[$i]";
  243.     @options = `$com`;
  244.     chop @options;
  245.  
  246.     $com = "$mysqladmin -u $opt_user";
  247.     $com.= defined($opt_password) ? " -p$opt_password" : "";
  248.     $com.= $opt_tcp_ip ? " -h 127.0.0.1" : "";
  249.     for ($j = 0; defined($options[$j]); $j++)
  250.     {
  251.       if ((($options[$j] =~ m/^(\-\-socket\=)(.*)$/) && !$opt_tcp_ip) ||
  252.       ($options[$j] =~ m/^(\-\-port\=)(.*)$/))
  253.       {
  254.     $com.= " $options[$j]";
  255.       }
  256.     }
  257.     $com.= " shutdown";
  258.     $com.= " >> $opt_log 2>&1" if (!$opt_no_log);
  259.     $com.= " &";
  260.     system($com);
  261.   }
  262.   if (!$i && !$opt_no_log)
  263.   {
  264.     w2log("No MySQL servers to be stopped (check your GNRs)",
  265.       "$opt_log", 0, 0);
  266.   }
  267. }
  268.  
  269. ####
  270. #### Find groups. Takes the valid group numbers as an argument, parses
  271. #### them, puts them in the ascending order, removes duplicates and
  272. #### returns the wanted groups accordingly.
  273. ####
  274.  
  275. sub find_groups
  276. {
  277.   my ($raw_gids) = @_;
  278.   my (@groups, @data, @tmp, $line, $i, $k, @pre_gids, @gids, @tmp2,
  279.       $prev_value);
  280.  
  281.   # Read the lines from the config file to variable 'data'
  282.   if (defined($opt_config_file))
  283.   {
  284.     open(MY_CNF, "<$opt_config_file") && (@data=<MY_CNF>) && close(MY_CNF);
  285.   }
  286.   else
  287.   {
  288.     if (-f "/etc/my.cnf" && -r "/etc/my.cnf")
  289.     {
  290.       open(MY_CNF, "</etc/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
  291.     }
  292.     for ($i = 0; ($line = shift @tmp); $i++)
  293.     {
  294.       $data[$i] = $line;
  295.     }
  296.     if (-f "$homedir/.my.cnf" && -r "$homedir/.my.cnf")
  297.     {
  298.       open(MY_CNF, "<$homedir/.my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
  299.     }
  300.     for (; ($line = shift @tmp); $i++)
  301.     {
  302.       $data[$i] = $line;
  303.     }
  304.   }
  305.   chop @data;
  306.   # Make a list of the wanted group ids
  307.   if (defined($raw_gids))
  308.   {
  309.     @pre_gids = split(',', $raw_gids);
  310.   }
  311.   if (defined($raw_gids))
  312.   {
  313.     for ($i = 0, $j = 0; defined($pre_gids[$i]); $i++)
  314.     {
  315.       if ($pre_gids[$i] =~ m/^(\d+)$/)
  316.       {
  317.     $gids[$j] = $1;
  318.     $j++;
  319.       }
  320.       elsif ($pre_gids[$i] =~ m/^(\d+)(\-)(\d+)$/)
  321.       {
  322.     for ($k = $1; $k <= $3; $k++)
  323.     {
  324.       $gids[$j] = $k;
  325.       $j++;
  326.     }
  327.       }
  328.       else
  329.       {
  330.     print "ABORT: Bad GNR: $pre_gids[$i] See $my_progname --help\n";
  331.     exit(1);
  332.       }
  333.     }
  334.   }
  335.   # Sort the list of gids numerically in ascending order
  336.   @gids = sort {$a <=> $b} @gids;
  337.   # Remove non-positive integers and duplicates
  338.   for ($i = 0, $j = 0; defined($gids[$i]); $i++)
  339.   {
  340.     next if ($gids[$i] <= 0);
  341.     if (!$i || $prev_value != $gids[$i])
  342.     {
  343.       $tmp2[$j] = $gids[$i];
  344.       $j++;
  345.     }
  346.     $prev_value = $gids[$i];
  347.   }
  348.   @gids = @tmp2;
  349.   # Find and return the wanted groups
  350.   for ($i = 0, $j = 0; defined($data[$i]); $i++)
  351.   {
  352.     if ($data[$i] =~ m/^(\s*\[\s*)(mysqld)(\d+)(\s*\]\s*)$/)
  353.     {
  354.       if (defined($raw_gids))
  355.       {
  356.     for ($k = 0; defined($gids[$k]); $k++)
  357.     {
  358.       if ($gids[$k] == $3)
  359.       {
  360.         $groups[$j] = $2 . $3;
  361.         $j++;
  362.       }
  363.     }
  364.       }
  365.       else
  366.       {
  367.     $groups[$j] = $2 . $3;
  368.     $j++;
  369.       }
  370.     }
  371.   }
  372.   return @groups;
  373. }
  374.  
  375. ####
  376. #### w2log: Write to a logfile.
  377. #### 1.arg: append to the log file (given string, or from a file. if a file,
  378. ####        file will be read from $opt_logdir)
  379. #### 2.arg: logfile -name (w2log assumes that the logfile is in $opt_logdir).
  380. #### 3.arg. 0 | 1, if true, print current date to the logfile. 3. arg will
  381. ####        be ignored, if 1. arg is a file.
  382. #### 4.arg. 0 | 1, if true, first argument is a file, else a string
  383. ####
  384.  
  385. sub w2log
  386. {
  387.   my ($msg, $file, $date_flag, $is_file)= @_;
  388.   my (@data);
  389.  
  390.   open (LOGFILE, ">>$opt_log")
  391.     or die "FATAL: w2log: Couldn't open log file: $opt_log\n";
  392.  
  393.   if ($is_file)
  394.   {
  395.     open (FROMFILE, "<$msg") && (@data=<FROMFILE>) &&
  396.       close(FROMFILE)
  397.     or die "FATAL: w2log: Couldn't open file: $msg\n";
  398.     foreach my $line (@data)
  399.     {
  400.       print LOGFILE "$line";
  401.     }
  402.   }
  403.   else
  404.   {
  405.     print LOGFILE "$msg";
  406.     print LOGFILE strftime "%a %b %e %H:%M:%S %Y", localtime if ($date_flag);
  407.     print LOGFILE "\n";
  408.   }
  409.   close (LOGFILE);
  410.   return;
  411. }
  412.  
  413. ####
  414. #### my_which is used, because we can't assume that every system has the
  415. #### which -command. my_which can take only one argument at a time.
  416. #### Return values: requested system command with the first found path,
  417. #### or undefined, if not found.
  418. ####
  419.  
  420. sub my_which
  421. {
  422.   my ($command) = @_;
  423.   my (@paths, $path);
  424.  
  425.   return $command if (-f $command && -x $command);
  426.   @paths = split(':', $ENV{'PATH'});
  427.   foreach $path (@paths)
  428.   {
  429.     $path .= "/$command";
  430.     return $path if (-f $path && -x $path);
  431.   }
  432.   return undef();
  433. }
  434.  
  435.  
  436. ####
  437. #### example
  438. ####
  439.  
  440. sub example
  441. {
  442.   print <<EOF;
  443. # This is an example of a my.cnf file on behalf of $my_progname.
  444. # This file should probably be in your home dir (~/.my.cnf) or /etc/my.cnf
  445. # Version $VER by Jani Tolonen
  446. # NOTES:
  447. # 1.Make sure that the MySQL user, who is stopping the mysqld services (e.g
  448. #   using the mysqladmin) have the same password and username for all the
  449. #   data directories accessed (to the 'mysql' database) And make sure that
  450. #   the user has the 'Shutdown_priv' privilege! If you have many data-
  451. #   directories and many different 'mysql' databases with different passwords
  452. #   for the MySQL 'root' user, you may want to create a common 'multi_admin'
  453. #   user for each using the same password (see below). Example how to do it:
  454. #   shell> mysql -u root -S /tmp/mysql.sock -proot_password -e
  455. #   "GRANT SHUTDOWN ON *.* TO multi_admin\@localhost IDENTIFIED BY 'multipass'"
  456. #   You will have to do the above for each mysqld running in each data
  457. #   directory, that you have (just change the socket, -S=...)
  458. #   See more detailed information from chapter:
  459. #   '6 The MySQL Access Privilege System' from the MySQL manual.
  460. # 2.pid-file is very important, if you are using safe_mysqld to start mysqld
  461. #   (e.g. --mysqld=safe_mysqld) Every mysqld should have it's own pid-file.
  462. #   The advantage using safe_mysqld instead of mysqld directly here is, that
  463. #   safe_mysqld 'guards' every mysqld process and will restart it, if mysqld
  464. #   process fails due to signal kill -9, or similar. (Like segmentation fault,
  465. #   which MySQL should never do, of course ;) Please note that safe_mysqld
  466. #   script may require that you start it from a certain place. This means that
  467. #   you may have to CD to a certain directory, before you start the
  468. #   mysqld_multi. If you have problems starting, please see the script.
  469. #   Check especially the lines:
  470. #   --------------------------------------------------------------------------
  471. #   MY_PWD=`pwd`
  472. #   Check if we are starting this relative (for the binary release)
  473. #   if test -d $MY_PWD/data/mysql -a -f ./share/mysql/english/errmsg.sys -a \
  474. #   -x ./bin/mysqld
  475. #   --------------------------------------------------------------------------
  476. #   The above test should be successful, or you may encounter problems.
  477. # 3.Beware of the dangers starting multiple mysqlds in the same data directory.
  478. #   Use separate data directories, unless you *KNOW* what you are doing!
  479. # 4.The socket file and the TCP/IP port must be different for every mysqld.
  480. # 5.The first and fifth mysqld was intentionally left out from the example.
  481. #   You may have 'gaps' in the config file. This gives you more flexibility.
  482. #   The order in which the mysqlds are started or stopped depends on the order
  483. #   in which they appear in the config file.
  484. # 6.When you want to refer to a certain group with GNR with this program,
  485. #   just use the number in the end of the group name ( [mysqld# <== )
  486. # 7.You may want to use option '--user' for mysqld, but in order to do this
  487. #   you need to be root when you start this script. Having the option
  488. #   in the config file doesn't matter; you will just get a warning, if you are
  489. #   not the superuser and the mysqlds are started under *your* unix account.
  490. #   IMPORTANT: Make sure that the pid-file and the data directory are
  491. #   read+write(+execute for the latter one) accessible for *THAT* UNIX user,
  492. #   who the specific mysqld process is started as. *DON'T* use the UNIX root
  493. #   account for this, unless you *KNOW* what you are doing!
  494. # 8.MOST IMPORTANT: Make sure that you understand the meanings of the options
  495. #   that are passed to the mysqlds and why *WOULD YOU WANT* to have separate
  496. #   mysqld processes. Starting multiple mysqlds in one data directory *WON'T*
  497. #   give you extra performance in a threaded system!
  498. #
  499. [mysqld_multi]
  500. mysqld     = /usr/local/mysql/bin/safe_mysqld
  501. mysqladmin = /usr/local/mysql/bin/mysqladmin
  502. user       = multi_admin
  503. password   = multipass
  504.  
  505. [mysqld2]
  506. socket     = /tmp/mysql.sock2
  507. port       = 3307
  508. pid-file   = /usr/local/mysql/var2/hostname.pid2
  509. datadir    = /usr/local/mysql/var2
  510. language   = /usr/local/mysql/share/mysql/english
  511. user       = john
  512.  
  513. [mysqld3]
  514. socket     = /tmp/mysql.sock3
  515. port       = 3308
  516. pid-file   = /usr/local/mysql/var3/hostname.pid3
  517. datadir    = /usr/local/mysql/var3
  518. language   = /usr/local/mysql/share/mysql/swedish
  519. user       = monty
  520.  
  521. [mysqld4]
  522. socket     = /tmp/mysql.sock4
  523. port       = 3309
  524. pid-file   = /usr/local/mysql/var4/hostname.pid4
  525. datadir    = /usr/local/mysql/var4
  526. language   = /usr/local/mysql/share/mysql/estonia
  527. user       = tonu
  528.  
  529.  
  530. [mysqld6]
  531. socket     = /tmp/mysql.sock6
  532. port       = 3311
  533. pid-file   = /usr/local/mysql/var6/hostname.pid6
  534. datadir    = /usr/local/mysql/var6
  535. language   = /usr/local/mysql/share/mysql/japanese
  536. user       = jani
  537. EOF
  538.   exit(0);
  539. }
  540.  
  541. ####
  542. #### usage
  543. ####
  544.  
  545. sub usage
  546. {
  547.   print <<EOF;
  548. $my_progname version $VER by Jani Tolonen
  549.  
  550. This software comes with ABSOLUTELY NO WARRANTY. This is free software,
  551. and you are welcome to modify and redistribute it under the GPL license.
  552.  
  553. Description:
  554. $my_progname can be used to start, or stop any number of separate
  555. mysqld processes running in different TCP/IP ports and UNIX sockets.
  556.  
  557. This program can read group [mysqld_multi] from my.cnf file.
  558. You may want to put options mysqld=... and mysqladmin=... there.
  559.  
  560. The program will search for group(s) named [mysqld#] from my.cnf (or
  561. the given --config-file=...), where # can be any positive number
  562. starting from 1. These groups should be the same as the usual [mysqld]
  563. group (e.g. options to mysqld, see MySQL manual for detailed
  564. information about this group), but with those port, socket
  565. etc. options that are wanted for each separate mysqld processes. The
  566. number in the group name has another function; it can be used for
  567. starting, stopping, or reporting some specific mysqld servers with
  568. this program. See the usage and options below for more information.
  569.  
  570. Usage: $my_progname [OPTIONS] {start|stop|report} [GNR,GNR,GNR...]
  571. or     $my_progname [OPTIONS] {start|stop|report} [GNR-GNR,GNR,GNR-GNR,...]
  572.  
  573. The GNR above means the group number. You can start, stop or report
  574. any GNR, or several of them at the same time. (See --example) The GNRs
  575. list can be comma separated, or a dash combined, of which the latter
  576. means that all the GNRs between GNR1-GNR2 will be affected. Without
  577. GNR argument all the found groups will be either started, stopped, or
  578. reported. Note that you must not have any white spaces in the GNR
  579. list. Anything after a white space are ignored.
  580.  
  581. Options:
  582. --config-file=...  Alternative config file. NOTE: This will not affect
  583.                    this program's own options (group [mysqld_multi]),
  584.                    but only groups [mysqld#]. Without this option everything
  585.                    will be searched from the ordinary my.cnf file.
  586.                    Using: $opt_config_file
  587. --example          Give an example of a config file. (PLEASE DO CHECK THIS!)
  588. --help             Print this help and exit.
  589. --log=...          Log file. Full path to and the name for the log file. NOTE:
  590.                    If the file exists, everything will be appended.
  591.                    Using: $opt_log
  592. --mysqladmin=...   mysqladmin binary to be used for a server shutdown.
  593.                    Using: $mysqladmin
  594. --mysqld=...       mysqld binary to be used. Note that you can give safe_mysqld
  595.                    to this option also. The options are passed to mysqld. Just
  596.                    make sure you have mysqld in your PATH or fix safe_mysqld.
  597.                    Using: $mysqld
  598. --no-log           Print to stdout instead of the log file. By default the log
  599.                    file is turned on.
  600. --password=...     Password for user for mysqladmin.
  601. --tcp-ip           Connect to the MySQL server(s) via the TCP/IP port instead
  602.                    of the UNIX socket. This affects stopping and reporting.
  603.                    If a socket file is missing, the server may still be
  604.                    running, but can be accessed only via the TCP/IP port.
  605.                    By default connecting is done via the UNIX socket.
  606. --user=...         MySQL user for mysqladmin. Using: $opt_user
  607. --version          Print the version number and exit.
  608. EOF
  609.   exit(0);
  610. }
  611.