docs: private static void launchTSD(String[] args) {
      ConfigArgP cap = new ConfigArgP(args);
      Config config = cap.getConfig();
      ArgP argp = cap.getArgp();
      applyCommandLine(cap, argp);
      config.loadStaticVariables();   
      // All options are now correctly set in config
      setJVMName(config.getInt("tsd.network.port"), config.getString("tsd.network.bind"));
      // Configure the logging
      if(config.hasProperty("tsd.logback.file")) {
        final String logBackFile = config.getString("tsd.logback.file");
        final String rollPattern = config.hasProperty("tsd.logback.rollpattern") ? config.getString("tsd.logback.rollpattern") : null;
        final boolean keepConsoleOpen = config.hasProperty("tsd.logback.console") ? config.getBoolean("tsd.logback.console") : false;       
        log.info("\n\t===================================\n\tReconfiguring logback. Logging to file:\n\t{}\n\t===================================\n", logBackFile);
        setLogbackInternal(logBackFile, rollPattern, keepConsoleOpen);
      } else {      
        final String logBackConfig;
        if(config.hasProperty("tsd.logback.config")) {
          logBackConfig = config.getString("tsd.logback.config");
        } else {
          logBackConfig = System.getProperty("tsd.logback.config", null);
        }
        if(logBackConfig!=null && !logBackConfig.trim().isEmpty() && new File(logBackConfig.trim()).canRead()) {
          setLogbackExternal(logBackConfig.trim());
        }
      }   
      if(config.auto_metric()) {
        log.info("\n\t==========================================\n\tAuto-Metric Enabled\n\t==========================================\n");
      } else {
        log.warn("\n\t==========================================\n\tAuto-Metric Disabled\n\t==========================================\n");
      }
      try {
          // Write the PID file
          writePid(config.getString("tsd.process.pid.file"), config.getBoolean("tsd.process.pid.ignore.existing"));       
          // Export the UI content
          if(!config.getBoolean("tsd.ui.noexport")) {
            loadContent(config.getString("tsd.http.staticroot"));
          }
          // Create the cache dir if it does not exist
          File cacheDir = new File(config.getString("tsd.http.cachedir"));
          if(cacheDir.exists()) {
            if(!cacheDir.isDirectory()) {
              throw new IllegalArgumentException("The http cache directory [" + cacheDir + "] is not a directory, but a file, which is bad");
            }
          } else {
            if(!cacheDir.mkdirs()) {
              throw new IllegalArgumentException("Failed to create the http cache directory [" + cacheDir + "]");
            }
          }
      } catch (Exception ex) {
        log.error("Failed to process tsd configuration", ex);
        System.exit(-1);
      }
      
      //  =====================================================================    
      //  Command line processing complete, ready to start TSD.
      //  The code from here to the end of the method is an exact duplicate
      //  of {@link TSDMain#main(String[])} once configuration is complete.
      //  At the time of this writing, this is at line 123 starting with the
      //  code:  final ServerSocketChannelFactory factory;
      // =====================================================================     
       
      log.info("Configuration complete. Starting TSDB");
        final ServerSocketChannelFactory factory;
        if (config.getBoolean("tsd.network.async_io")) {
          int workers = Runtime.getRuntime().availableProcessors() * 2;
          if (config.hasProperty("tsd.network.worker_threads")) {
            try {
            workers = config.getInt("tsd.network.worker_threads");
            } catch (NumberFormatException nfe) {
              usage(argp, "Invalid worker thread count", 1);
            }
          }
          final Executor executor = Executors.newCachedThreadPool();
          final NioServerBossPool boss_pool = 
              new NioServerBossPool(executor, 1, new Threads.BossThreadNamer());
          final NioWorkerPool worker_pool = new NioWorkerPool(executor, 
              workers, new Threads.WorkerThreadNamer());
          factory = new NioServerSocketChannelFactory(boss_pool, worker_pool);
        } else {
          factory = new OioServerSocketChannelFactory(
              Executors.newCachedThreadPool(), Executors.newCachedThreadPool());
        }
        
        TSDB tsdb = null;
        try {
          tsdb = new TSDB(config);
          tsdb.initializePlugins(true);
          
          // Make sure we don't even start if we can't find our tables.
          tsdb.checkNecessaryTablesExist().joinUninterruptibly();
  
          registerShutdownHook(tsdb);
          final ServerBootstrap server = new ServerBootstrap(factory);
  
          server.setPipelineFactory(new PipelineFactory(tsdb));
          if (config.hasProperty("tsd.network.backlog")) {
            server.setOption("backlog", config.getInt("tsd.network.backlog")); 
          }
          server.setOption("child.tcpNoDelay", 
              config.getBoolean("tsd.network.tcp_no_delay"));
          server.setOption("child.keepAlive", 
              config.getBoolean("tsd.network.keep_alive"));
          server.setOption("reuseAddress", 
              config.getBoolean("tsd.network.reuse_address"));
  
          // null is interpreted as the wildcard address.
          InetAddress bindAddress = null;
          if (config.hasProperty("tsd.network.bind")) {
            bindAddress = InetAddress.getByName(config.getString("tsd.network.bind"));
          }
  
          // we validated the network port config earlier
          final InetSocketAddress addr = new InetSocketAddress(bindAddress,
              config.getInt("tsd.network.port"));
          server.bind(addr);
          log.info("Ready to serve on " + addr);
        } catch (Throwable e) {
          factory.releaseExternalResources();
          try {
            if (tsdb != null)
              tsdb.shutdown().joinUninterruptibly();
          } catch (Exception e2) {
            log.error("Failed to shutdown HBase client", e2);
          }
          throw new RuntimeException("Initialization failed", e);
        }
        // The server is now running in separate threads, we can exit main.
    }