Exemple #1
0
static void
usage(const char *av0) /*  id string */
{
        (void)fprintf(stderr,
"Usage: %s [options]\nOptions:\n", av0);
        (void)fprintf(stderr,
"\t-v           Verbose, report each notification\n");
        (void)fprintf(stderr,
"\t-x           Debug mode\n");
        (void)fprintf(stderr,
"\t-w           Wait on region locks\n");
        (void)fprintf(stderr,
"\t-l dest      Log to `dest`. One of: \"\" (system logging daemon), \"-\"\n"
"\t             (standard error), or file `dest`. Default is \"%s\"\n",
                log_get_default_destination());
        (void)fprintf(stderr,
"\t-q queue     default \"%s\"\n", getDefaultQueuePath());
        (void)fprintf(stderr,
"\t-a age       Protect products younger than \"age\" hours (default %.4f)\n",
                DEFAULT_AGE);
        (void)fprintf(stderr,
"\t-i interval  loop, restart each \"interval\" seconds (default %d)\n",
                DEFAULT_INTERVAL);
        (void)fprintf(stderr,
"\t             interval of 0 means exit after one pass\n");
        (void)fprintf(stderr,
"\t-f feedtype  Delete products from feed \"feedtype\" (default %s)\n",
                s_feedtypet(DEFAULT_FEEDTYPE));
        (void)fprintf(stderr,
"\t-p pattern   Delete products matching \"pattern\" (default \"%s\")\n",
                DEFAULT_PATTERN);
        exit(1);
}
Exemple #2
0
static void
usage(
        char *av0  /*  id string */
)
{
        (void)fprintf(stderr,
"Usage: %s [options] \t\nOptions:\n", av0);
        (void)fprintf(stderr,
"\t-v             Verbose, report each notification\n");
        (void)fprintf(stderr,
"\t-x             Debug mode\n");
        (void)fprintf(stderr,
"\t-l dest        Log to `dest`. One of: \"\" (system logging daemon), \"-\"\n"
"\t               (standard error), or file `dest`. Default is \"%s\"\n",
                log_get_default_destination());
        (void)fprintf(stderr,
"\t-h remote      Have \"remote\" send us data (default \"%s\")\n",
                DEFAULT_REMOTE);
        (void)fprintf(stderr,
"\t-f feedtype    Interested in products from feed \"feedtype\" (default %s)\n",
        s_feedtypet(DEFAULT_FEEDTYPE));
        (void)fprintf(stderr,
"\t-p pattern     Interested in products matching \"pattern\" (default \"%s\")\n",
                DEFAULT_PATTERN);
        (void)fprintf(stderr,
"\t-o offset      Set the \"from\" time offset secs before now\n");
        (void)fprintf(stderr,
"\t-t timeout     Set RPC timeout to \"timeout\" seconds (default %d)\n",
                DEFAULT_TIMEO);
        (void)fprintf(stderr,
"\t-T TotalTimeo  Give up after this many secs (default %d)\n",
                DEFAULT_TOTALTIMEO);
        exit(1);
}
Exemple #3
0
static void pti_usage(void)
{
    char        feedbuf[256];
    const char* pqPath = getDefaultQueuePath();

    (void)ft_format(feedtype, feedbuf, sizeof(feedbuf));
    log_error_q(
"Usage: %s [options] [file]\n"
"Options:\n"
"    -f feedtype   Use <feedtype> as data-product feed-type. Default is %s.\n"
"    -g sleep      Sleep <sleep> nanoseconds between inserting products.\n"
"                  Ignored if <file> given. Default is %lu\n"
"    -l dest       Log to `dest`. One of: \"\" (system logging daemon), \"-\"\n"
"                  (standard error), or file `dest`. Default is \"%s\"\n"
"    -m max_size   Maximum product size in bytes. Ignored if <file> given.\n"
"                  Default is %lu.\n"
"    -n num_prods  Number of products. Ignored if <file> given. Default is\n"
"                  %lu.\n"
"    -q queue      Use <queue> as product-queue. Default is \"%s\".\n"
"    -s seqno      Set initial product sequence number to <seqno>. Default is\n"
"                  %d.\n"
"    -v            Verbose logging level: log each product.\n"
"    -x            Debug logging level.\n"
"Operands:\n"
"    file          Pathname of file containing size and timestamp entries.\n"
"                  If given, then '-g', '-m', and '-n' options are ignored",
            progname, feedbuf, inter_prod_gap, log_get_default_destination(),
            max_prod_size, num_prods, pqPath, seq_start);
}
Exemple #4
0
static void
usage(
        const char* const av0 /*  id string */
)
{
    log_add("Usage: %s [options] feedname", av0);
    log_add("where:");
    log_add("    -5            Skip leading control characters when calculating");
    log_add("                  checksum");
    log_add("    -b baud       Set baudrate for tty input to <baud>");
    log_add("    -c            Enable checksum or parity check on non-tty input");
    log_add("    -f type       Assign feedtype <type> to products. One of");
    log_add("                  \"HDS\", \"DDPLUS\", etc.");
    log_add("    -i            Do not include a PIL-like \"/p\" identifier in");
    log_add("                  the product-identifier of suitable products");
    log_add("    -l dest       Log to `dest`. One of: \"\" (system logging daemon),");
    log_add("                  \"-\" (standard error), or file `dest`. Default");
    log_add("                  is \"%s\"", log_get_default_destination());
    log_add("    -N            Do not assign NEXRAD feedtype to NEXRAD products");
    log_add("                  (for WMO products only)");
    log_add("    -n            Disable checksum or parity check on tty input");
    log_add("    -p parity     Set input parity to <parity>. One of \"even\",");
    log_add("                  \"odd\", or \"none\"");
    log_add("    -q queue      Use product-queue <queue>. Default is");
    log_add("                  \"%s\".", getDefaultQueuePath());
#if NET
    log_add("    -P port       Get input via TCP connection to port <port> on");
    log_add("                  host <feedname>");
#endif
    log_add("    -r rawfile    Write raw input data to file <rawfile>");
    log_add("    -s size       Use <size> as the size, in bytes, of the largest");
    log_add("                  expected data-product. Default is %lu.",
            DEFAULT_MAX_PRODUCT_SIZE);
#if NET
    log_add("    -T timeout    Reconnect TCP connection after idle for <timeout>");
    log_add("                  seconds. 0 disables timeout. Default is %d.",
            DEFAULT_RESET_SECS);
#endif
    log_add("    -v            Log verbosely: report each product");
    log_add("    -x            Log debug messages");
    log_add("    feedname      Use <feedname> as input");
    log_flush_notice();
    exit(1);
}
Exemple #5
0
static void
usage(
    char *av0 /*  id string */)
{
    (void)fprintf(stderr,
"Usage: %s [options] filename ...\n\tOptions:\n", av0);
    (void)fprintf(stderr,
"\t-v           Verbose, tell me about each product\n");
    (void)fprintf(stderr,
"\t-l dest      Log to `dest`. One of: \"\" (system logging daemon), \"-\"\n"
"\t             (standard error), or file `dest`. Default is \"%s\"\n",
                log_get_default_destination());
    (void)fprintf(stderr,
"\t-h remote    remote service host, defaults to \"localhost\"\n");
    (void)fprintf(stderr,
"\t-s seqno     set initial product sequence number to \"seqno\", defaults to 0\n");
    (void)fprintf(stderr,
"\t-f feedtype  assert your feed type as \"feedtype\", defaults to \"%s\"\n", s_feedtypet(DEFAULT_FEEDTYPE));
    exit(1);
}
Exemple #6
0
static void
usage (char *av0		/*  id string */
  )
{
  (void) fprintf (stderr,
"Usage: %s [options] filename ...\n\tOptions:\n", av0);
  (void) fprintf (stderr,
"\t-v           Verbose, tell me about each product\n");
  (void) fprintf (stderr,
"\t-l dest      Log to `dest`. One of: \"\" (system logging daemon), \"-\"\n"
"\t             (standard error), or file `dest`. Default is \"%s\"\n",
                log_get_default_destination());
  (void) fprintf (stderr, "\t-q queue     default \"%s\"\n", getDefaultQueuePath());
  (void) fprintf (stderr,
"\t-s seqno     set initial product sequence number to \"seqno\", defaults to 0\n");
  (void) fprintf (stderr,
"\t-f feedtype  assert your feed type as \"feedtype\", defaults to \"EXP\"\n");
  (void) fprintf (stderr, "\t-S           Do not create .status product\n");
  exit (1);
}
Exemple #7
0
static void
usage(
        const char* const av0)
{
        log_error("Usage: %s [options] [config_file]\t\nOptions:\n", av0);
        log_error("Options:");
        log_error(
"\t-v           Log INFO-level messages, log each match (SIGUSR2 cycles)");
        log_error(
"\t-x           Log DEBUG-level messages (SIGUSR2 cycles)");
        log_error(
"\t-l dest      Log to `dest`. One of: \"\" (system logging daemon), \"-\"\n"
"\t             (standard error), or file `dest`. Default is \"%s\"\n",
                log_get_default_destination());
        log_error(
"\t-d datadir   cd(1) to \"datadir\" before interpreting pathnames in\n"
"\t             configuration-file (default: \"%s\")", getPqactDataDirPath());
        log_error(
"\t-q queue     Use product-queue \"queue\" (default: \"%s\")",
                getDefaultQueuePath());
        log_error(
"\t-p pattern   Only process products matching \"pattern\" (default: \"%s\")",
                DEFAULT_PATTERN);
        log_error(
"\t-f feedtype  Only process products from feed \"feedtype\" (default: %s)",
                s_feedtypet(DEFAULT_FEEDTYPE));
        log_error(
"\t-i interval  Loop, polling every \"interval\" seconds (default: %d)",
                DEFAULT_INTERVAL);
        log_error(
"\t-t timeo     Set write timeout for PIPE subprocs to \"timeo\" secs (default: %d)",
                DEFAULT_PIPE_TIMEO);
        log_error(
"\t-o offset    Start with products arriving \"offset\" seconds before now (default: 0)");
        log_error(
"\tconfig_file  Pathname of configuration-file (default: " "\"%s\")",
                getPqactConfigPath());
        exit(EXIT_FAILURE);
        /*NOTREACHED*/
}
Exemple #8
0
static void
usage(const char *av0)
{
#define USAGE_FMT "\
Usage: %s [options] <initialsz>[k|m|g] <pqfname>\n\
       %s [options] -s <initialsz>[k|m|g] [-q <pqfname>]\n\
Options:\n\
        -v\n\
        -c\n\
        -f\n\
        -l dest      Log to `dest`. One of: \"\" (system logging daemon),\n\
                     \"-\" (standard error), or file `dest`. Default is\n\
                     \"%s\"\n\
        -S nproducts\n\
       (default pqfname is \"%s\")\n\
"

        (void)fprintf(stderr, USAGE_FMT,
                        av0,
                        av0,
                        log_get_default_destination(),
                        getDefaultQueuePath());
        exit(1);
}
Exemple #9
0
static void
usage(
        const char* const   progname /*  id string */
)
{
    log_add(
"Usage: %s [options] filename ...\n"
"    Options:\n"
"    -v            Verbose, tell me about each product\n"
"    -l dest       Log to `dest`. One of: \"\" (system logging daemon), \"-\"\n"
"                  (standard error), or file `dest`. Default is \"%s\"\n"
"    -q queue      Use <queue> as product-queue. Default:\n"
"                  \"%s\"\n"
"    -s seqno      Set initial product sequence number to <seqno>.\n"
"                  Default: 0\n"
"    -f feedtype   Assert your feed type as <feedtype>. Default: \"EXP\"\n"
"    -p productID  Assert product-ID as <productID>. Default is the \n"
"                  filename. With multiple files, product-ID becomes\n"
"                  <productID>.<seqno>\n"
"    -i            Compute product signature (MD5 checksum) from product ID\n",
            progname, log_get_default_destination(), getDefaultQueuePath());
    log_flush_error();
    exit(1);
}