lttng: remove usage strings from commands
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 17 Nov 2015 06:30:17 +0000 (01:30 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 18 Mar 2016 01:31:22 +0000 (21:31 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
19 files changed:
src/bin/lttng/commands/add_context.c
src/bin/lttng/commands/calibrate.c
src/bin/lttng/commands/create.c
src/bin/lttng/commands/destroy.c
src/bin/lttng/commands/disable_channels.c
src/bin/lttng/commands/disable_events.c
src/bin/lttng/commands/enable_channels.c
src/bin/lttng/commands/enable_events.c
src/bin/lttng/commands/list.c
src/bin/lttng/commands/load.c
src/bin/lttng/commands/save.c
src/bin/lttng/commands/set_session.c
src/bin/lttng/commands/snapshot.c
src/bin/lttng/commands/start.c
src/bin/lttng/commands/status.c
src/bin/lttng/commands/stop.c
src/bin/lttng/commands/track-untrack.c
src/bin/lttng/commands/version.c
src/bin/lttng/commands/view.c

index 56ee2aca44a82e7157526c87c9fed9332a486bd0..f19a54e67d5b9d82b3f5035fc8ee3b861b92c978 100644 (file)
@@ -490,48 +490,6 @@ static void print_ctx_type(FILE *ofp)
        }
 }
 
        }
 }
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng add-context -t TYPE [-k|-u] [OPTIONS]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "If no channel is given (-c), the context is added to\n");
-       fprintf(ofp, "all channels.\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Otherwise the context is added only to the channel (-c).\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Exactly one domain (-k or -u) must be specified.\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help               Show this help\n");
-       fprintf(ofp, "      --list-options       Simple listing of options\n");
-       fprintf(ofp, "  -s, --session NAME       Apply to session name\n");
-       fprintf(ofp, "  -c, --channel NAME       Apply to channel\n");
-       fprintf(ofp, "  -k, --kernel             Apply to the kernel tracer\n");
-       fprintf(ofp, "  -u, --userspace          Apply to the user-space tracer\n");
-       fprintf(ofp, "  -j, --jul                Apply to Java application using JUL\n");
-       fprintf(ofp, "  -l, --log4j              Apply for Java application using LOG4j\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Context:\n");
-       fprintf(ofp, "  -t, --type TYPE          Context type. You can repeat that option on\n");
-       fprintf(ofp, "                           the command line to specify multiple contexts at once.\n");
-       fprintf(ofp, "                           (--kernel preempts --userspace)\n");
-       fprintf(ofp, "                           TYPE can be one of the strings below:\n");
-       print_ctx_type(ofp);
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Note that the vpid, vppid and vtid context types represent the virtual process id,\n"
-                       "virtual parent process id and virtual thread id as seen from the current execution context\n"
-                       "as opposed to the pid, ppid and tid which are kernel internal data structures.\n\n");
-       fprintf(ofp, "Example:\n");
-       fprintf(ofp, "This command will add the context information 'prio' and two per-cpu\n"
-                       "perf counters (hardware branch misses and cache misses), to all channels\n"
-                       "in the trace data output:\n");
-       fprintf(ofp, "# lttng add-context -k -t prio -t perf:cpu:branch-misses -t perf:cpu:cache-misses\n");
-       fprintf(ofp, "\n");
-}
-
 /*
  * Find context numerical value from string.
  *
 /*
  * Find context numerical value from string.
  *
@@ -830,7 +788,6 @@ int cmd_add_context(int argc, const char **argv)
        char *session_name = NULL;
 
        if (argc < 2) {
        char *session_name = NULL;
 
        if (argc < 2) {
-               usage(stderr);
                ret = CMD_ERROR;
                goto end;
        }
                ret = CMD_ERROR;
                goto end;
        }
@@ -870,7 +827,6 @@ int cmd_add_context(int argc, const char **argv)
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
@@ -885,7 +841,6 @@ int cmd_add_context(int argc, const char **argv)
 
        if (!opt_type) {
                ERR("Missing mandatory -t TYPE");
 
        if (!opt_type) {
                ERR("Missing mandatory -t TYPE");
-               usage(stderr);
                ret = CMD_ERROR;
                goto end;
        }
                ret = CMD_ERROR;
                goto end;
        }
index ba3350fb60eeb8e6a982a6ffe26dc6aea0edeca5..95a03d2129dfdde54fbd56cd5e4c982e20d4d7d9 100644 (file)
@@ -62,24 +62,6 @@ static struct poptOption long_options[] = {
        {0, 0, 0, 0, 0, 0, 0}
 };
 
        {0, 0, 0, 0, 0, 0, 0}
 };
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng calibrate [-k|-u] [OPTIONS]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help               Show this help\n");
-       fprintf(ofp, "      --list-options       Simple listing of options\n");
-       fprintf(ofp, "  -k, --kernel             Apply to the kernel tracer\n");
-       fprintf(ofp, "  -u, --userspace          Apply to the user-space tracer\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Calibrate options:\n");
-       fprintf(ofp, "    --function             Dynamic function entry/return probe (default)\n");
-       fprintf(ofp, "\n");
-}
-
 /*
  * Calibrate LTTng.
  *
 /*
  * Calibrate LTTng.
  *
@@ -202,7 +184,6 @@ int cmd_calibrate(int argc, const char **argv)
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
index efc9e60c1609c189daae7ca09f3b765568c27b4c..525464aa822d90b556308d830196eb38ed92b898 100644 (file)
@@ -82,79 +82,6 @@ static struct poptOption long_options[] = {
 extern int _lttng_create_session_ext(const char *name, const char *url,
                const char *datetime);
 
 extern int _lttng_create_session_ext(const char *name, const char *url,
                const char *datetime);
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng create [NAME] [OPTIONS] \n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Without a given NAME, the default is 'auto-<yyyymmdd>-<hhmmss>'\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help           Show this help\n");
-       fprintf(ofp, "      --list-options   Simple listing of options\n");
-       fprintf(ofp, "  -o, --output PATH    Specify output path for traces\n");
-       fprintf(ofp, "      --no-output      Traces will not be outputted\n");
-       fprintf(ofp, "      --snapshot       Set the session in snapshot mode.\n");
-       fprintf(ofp, "                       Created in no-output mode and uses the URL,\n");
-       fprintf(ofp, "                       if one, as the default snapshot output.\n");
-       fprintf(ofp, "                       Every channel will be set in overwrite mode\n");
-       fprintf(ofp, "                       and with mmap output (splice not supported).\n");
-       fprintf(ofp, "      --live [USEC]    Set the session in live-reading mode.\n");
-       fprintf(ofp, "                       The delay parameter in micro-seconds is the\n");
-       fprintf(ofp, "                       maximum time the user can wait for the data\n");
-       fprintf(ofp, "                       to be flushed. Can be set with a network\n");
-       fprintf(ofp, "                       URL (-U or -C/-D) and must have a relayd listening.\n");
-       fprintf(ofp, "                       By default, %u is used for the timer and the\n",
-                                                                                       DEFAULT_LTTNG_LIVE_TIMER);
-       fprintf(ofp, "                       network URL is set to net://127.0.0.1.\n");
-       fprintf(ofp, "      --shm-path PATH  Path where shared memory holding buffers\n");
-       fprintf(ofp, "                       should be created. Useful when used with pramfs\n");
-       fprintf(ofp, "                       to extract trace data after crash.\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Extended Options:\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Using these options, each API call can be controlled individually.\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "  -U, --set-url=URL    Set URL destination of the trace data.\n");
-       fprintf(ofp, "                       It is persistent for the session lifetime.\n");
-       fprintf(ofp, "                       This will set both data and control URL.\n");
-       fprintf(ofp, "  -C, --ctrl-url=URL   Set control path URL. (Must use -D also)\n");
-       fprintf(ofp, "  -D, --data-url=URL   Set data path URL. (Must use -C also)\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Please refer to the man page (lttng(1)) for more information on network\n");
-       fprintf(ofp, "streaming mechanisms and explanation of the control and data port\n");
-       fprintf(ofp, "You must have a running remote lttng-relayd for network streaming\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "URL format is has followed:\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "  proto://[HOST|IP][:PORT1[:PORT2]][/TRACE_PATH]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "  Supported protocols are (proto):\n");
-       fprintf(ofp, "  > file://...\n");
-       fprintf(ofp, "    Local filesystem full path.\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "  > net[6]://...\n");
-       fprintf(ofp, "    This will use the default network transport layer which is\n");
-       fprintf(ofp, "    TCP for both control (PORT1) and data port (PORT2).\n");
-       fprintf(ofp, "    The default ports are respectively 5342 and 5343.\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "  > tcp[6]://...\n");
-       fprintf(ofp, "    Can only be used with -C and -D together\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "NOTE: IPv6 address MUST be enclosed in brackets '[]' (rfc2732)\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Examples:\n");
-       fprintf(ofp, "    # lttng create -U net://192.168.1.42\n");
-       fprintf(ofp, "    Uses TCP and default ports for the given destination.\n");
-       fprintf(ofp, "    # lttng create -U net6://[fe80::f66d:4ff:fe53:d220]\n");
-       fprintf(ofp, "    Uses TCP, default ports and IPv6.\n");
-       fprintf(ofp, "    # lttng create s1 -U net://myhost.com:3229\n");
-       fprintf(ofp, "    Set the consumer to the remote HOST on port 3229 for control.\n");
-       fprintf(ofp, "\n");
-}
-
 /*
  * Retrieve the created session and mi output it based on provided argument
  * This is currently a summary of what was pretty printed and is subject to
 /*
  * Retrieve the created session and mi output it based on provided argument
  * This is currently a summary of what was pretty printed and is subject to
@@ -739,7 +666,6 @@ int cmd_create(int argc, const char **argv)
                        break;
                }
                default:
                        break;
                }
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
index 661c0a2356ae42acdf7dfb0fbd047a7bff45e5b0..aad4bdd23f07db2ac8a9b53eaab6044a0abdf54e 100644 (file)
@@ -52,24 +52,6 @@ static struct poptOption long_options[] = {
        {0, 0, 0, 0, 0, 0, 0}
 };
 
        {0, 0, 0, 0, 0, 0, 0}
 };
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng destroy [NAME] [OPTIONS]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Where NAME is an optional session name. If not specified, lttng will\n");
-       fprintf(ofp, "get it from the configuration directory (.lttng).\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help           Show this help\n");
-       fprintf(ofp, "  -a, --all            Destroy all sessions\n");
-       fprintf(ofp, "      --list-options   Simple listing of options\n");
-       fprintf(ofp, "  -n, --no-wait        Don't wait for data availability\n");
-       fprintf(ofp, "\n");
-}
-
 /*
  * destroy_session
  *
 /*
  * destroy_session
  *
@@ -195,7 +177,6 @@ int cmd_destroy(int argc, const char **argv)
                        list_cmd_options(stdout, long_options);
                        break;
                default:
                        list_cmd_options(stdout, long_options);
                        break;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        break;
                }
                        ret = CMD_UNDEFINED;
                        break;
                }
index a8bfa5deaeda8ad759eb82fee2f31412d34ab291..678af746d5091181aed4febe926130525afa7c5b 100644 (file)
@@ -53,22 +53,6 @@ static struct poptOption long_options[] = {
        {0, 0, 0, 0, 0, 0, 0}
 };
 
        {0, 0, 0, 0, 0, 0, 0}
 };
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng disable-channel NAME[,NAME2,...] (-k | -u) [OPTIONS]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help               Show this help\n");
-       fprintf(ofp, "      --list-options       Simple listing of options\n");
-       fprintf(ofp, "  -s, --session NAME       Apply to session name\n");
-       fprintf(ofp, "  -k, --kernel             Apply to the kernel tracer\n");
-       fprintf(ofp, "  -u, --userspace          Apply to the user-space tracer\n");
-       fprintf(ofp, "\n");
-}
-
 static int mi_partial_channel_print(char *channel_name, unsigned int enabled,
                int success)
 {
 static int mi_partial_channel_print(char *channel_name, unsigned int enabled,
                int success)
 {
@@ -242,7 +226,6 @@ int cmd_disable_channels(int argc, const char **argv)
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
@@ -257,7 +240,6 @@ int cmd_disable_channels(int argc, const char **argv)
        opt_channels = (char*) poptGetArg(pc);
        if (opt_channels == NULL) {
                ERR("Missing channel name(s).\n");
        opt_channels = (char*) poptGetArg(pc);
        if (opt_channels == NULL) {
                ERR("Missing channel name(s).\n");
-               usage(stderr);
                ret = CMD_ERROR;
                goto end;
        }
                ret = CMD_ERROR;
                goto end;
        }
index b853c57f7eee9b41f761a2b3e7affc35d73c7ef9..e301b71b38642a0b841df04ed658fdb4bd025f0c 100644 (file)
@@ -73,34 +73,6 @@ static struct poptOption long_options[] = {
        {0, 0, 0, 0, 0, 0, 0}
 };
 
        {0, 0, 0, 0, 0, 0, 0}
 };
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng disable-event NAME[,NAME2,...] (-k | -u | -j | -l | -p) [OPTIONS]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help               Show this help\n");
-       fprintf(ofp, "      --list-options       Simple listing of options\n");
-       fprintf(ofp, "  -s, --session NAME       Apply to session name\n");
-       fprintf(ofp, "  -c, --channel NAME       Apply to this channel\n");
-       fprintf(ofp, "  -a, --all-events         Disable all tracepoints\n");
-       fprintf(ofp, "  -k, --kernel             Apply to the kernel tracer\n");
-       fprintf(ofp, "  -u, --userspace          Apply to the user-space tracer\n");
-       fprintf(ofp, "  -j, --jul                Apply to Java application using JUL\n");
-       fprintf(ofp, "  -l, --log4j              Apply to Java application using LOG4j\n");
-       fprintf(ofp, "  -p, --python             Apply to Python application using logging\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Event type options (Only supported with kernel domain):\n");
-       fprintf(ofp, "      --all                All event types (default)\n");
-       fprintf(ofp, "      --tracepoint         Tracepoint event\n");
-       fprintf(ofp, "      --syscall            System call event\n");
-       fprintf(ofp, "      --probe              Probe event\n");
-       fprintf(ofp, "      --function           Function event\n");
-       fprintf(ofp, "\n");
-}
-
 static
 const char *print_channel_name(const char *name)
 {
 static
 const char *print_channel_name(const char *name)
 {
@@ -382,7 +354,6 @@ int cmd_disable_events(int argc, const char **argv)
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
@@ -410,7 +381,6 @@ int cmd_disable_events(int argc, const char **argv)
        if ((opt_userspace || opt_jul || opt_log4j || opt_python)
                        && opt_event_type != LTTNG_EVENT_ALL) {
                ERR("Disabling userspace and agent (-j | -l | -p) event(s) based on instrumentation type is not supported.\n");
        if ((opt_userspace || opt_jul || opt_log4j || opt_python)
                        && opt_event_type != LTTNG_EVENT_ALL) {
                ERR("Disabling userspace and agent (-j | -l | -p) event(s) based on instrumentation type is not supported.\n");
-               usage(stderr);
                ret = CMD_ERROR;
                goto end;
        }
                ret = CMD_ERROR;
                goto end;
        }
@@ -418,7 +388,6 @@ int cmd_disable_events(int argc, const char **argv)
        opt_event_list = (char*) poptGetArg(pc);
        if (opt_event_list == NULL && opt_disable_all == 0) {
                ERR("Missing event name(s).\n");
        opt_event_list = (char*) poptGetArg(pc);
        if (opt_event_list == NULL && opt_disable_all == 0) {
                ERR("Missing event name(s).\n");
-               usage(stderr);
                ret = CMD_ERROR;
                goto end;
        }
                ret = CMD_ERROR;
                goto end;
        }
index 93d81d7355167a310685f9a75209009e55d9e195..9a990030d5023ff38f0b984f1329f32e5feb849f 100644 (file)
@@ -88,67 +88,6 @@ static struct poptOption long_options[] = {
        {0, 0, 0, 0, 0, 0, 0}
 };
 
        {0, 0, 0, 0, 0, 0, 0}
 };
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng enable-channel NAME[,NAME2,...] (-u | -k) [OPTIONS]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help               Show this help\n");
-       fprintf(ofp, "      --list-options       Simple listing of options\n");
-       fprintf(ofp, "  -s, --session NAME       Apply to session name\n");
-       fprintf(ofp, "  -k, --kernel             Apply to the kernel tracer\n");
-       fprintf(ofp, "  -u, --userspace          Apply to the user-space tracer\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Channel options:\n");
-       fprintf(ofp, "      --discard            Discard event when buffers are full%s\n",
-               DEFAULT_CHANNEL_OVERWRITE ? "" : " (default)");
-       fprintf(ofp, "      --overwrite          Flight recorder mode%s\n",
-               DEFAULT_CHANNEL_OVERWRITE ? " (default)" : "");
-       fprintf(ofp, "      --subbuf-size SIZE   Subbuffer size in bytes {+k,+M,+G}\n");
-       fprintf(ofp, "                               (default UST uid: %zu, UST pid: %zu, kernel: %zu, metadata: %zu)\n",
-               default_get_ust_uid_channel_subbuf_size(),
-               default_get_ust_pid_channel_subbuf_size(),
-               default_get_kernel_channel_subbuf_size(),
-               default_get_metadata_subbuf_size());
-       fprintf(ofp, "                               Rounded up to the next power of 2.\n");
-       fprintf(ofp, "      --num-subbuf NUM     Number of subbufers\n");
-       fprintf(ofp, "                               (default UST uid: %u, UST pid: %u, kernel: %u, metadata: %u)\n",
-               DEFAULT_UST_UID_CHANNEL_SUBBUF_NUM, DEFAULT_UST_PID_CHANNEL_SUBBUF_NUM,
-               DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM, DEFAULT_METADATA_SUBBUF_NUM);
-       fprintf(ofp, "                               Rounded up to the next power of 2.\n");
-       fprintf(ofp, "      --switch-timer USEC  Switch timer interval in usec\n");
-       fprintf(ofp, "                               (default UST uid: %u, UST pid: %u, kernel: %u, metadata: %u)\n",
-               DEFAULT_UST_UID_CHANNEL_SWITCH_TIMER, DEFAULT_UST_PID_CHANNEL_SWITCH_TIMER,
-               DEFAULT_KERNEL_CHANNEL_SWITCH_TIMER, DEFAULT_METADATA_SWITCH_TIMER);
-       fprintf(ofp, "      --read-timer USEC    Read timer interval in usec.\n");
-       fprintf(ofp, "                               (default UST uid: %u, UST pid: %u, kernel: %u, metadata: %u)\n",
-               DEFAULT_UST_UID_CHANNEL_READ_TIMER, DEFAULT_UST_UID_CHANNEL_READ_TIMER,
-               DEFAULT_KERNEL_CHANNEL_READ_TIMER, DEFAULT_METADATA_READ_TIMER);
-       fprintf(ofp, "      --output TYPE        Channel output type (Values: %s, %s)\n",
-                       output_mmap, output_splice);
-       fprintf(ofp, "                               (default UST uid: %s, UST pid: %s, kernel: %s, metadata: %s)\n",
-                       DEFAULT_UST_UID_CHANNEL_OUTPUT == LTTNG_EVENT_MMAP ? output_mmap : output_splice,
-                       DEFAULT_UST_PID_CHANNEL_OUTPUT == LTTNG_EVENT_MMAP ? output_mmap : output_splice,
-                       DEFAULT_KERNEL_CHANNEL_OUTPUT == LTTNG_EVENT_MMAP ? output_mmap : output_splice,
-                       DEFAULT_METADATA_OUTPUT == LTTNG_EVENT_MMAP ? output_mmap : output_splice);
-       fprintf(ofp, "      --buffers-uid        Use per UID buffer (-u only)\n");
-       fprintf(ofp, "      --buffers-pid        Use per PID buffer (-u only)\n");
-       fprintf(ofp, "      --buffers-global     Use shared buffer for the whole system (-k only)\n");
-       fprintf(ofp, "  -C, --tracefile-size SIZE\n");
-       fprintf(ofp, "                           Maximum size of each tracefile within a stream (in bytes). 0 means unlimited.\n");
-       fprintf(ofp, "                               (default: %u)\n", DEFAULT_CHANNEL_TRACEFILE_SIZE);
-       fprintf(ofp, "                           Note: traces generated with this option may inaccurately report\n");
-       fprintf(ofp, "                           discarded events as per CTF 1.8.\n");
-       fprintf(ofp, "  -W, --tracefile-count COUNT\n");
-       fprintf(ofp, "                           Used in conjunction with -C option, this will limit the number\n");
-       fprintf(ofp, "                           of files created to the specified count. 0 means unlimited.\n");
-       fprintf(ofp, "                               (default: %u)\n", DEFAULT_CHANNEL_TRACEFILE_COUNT);
-       fprintf(ofp, "\n");
-}
-
 /*
  * Set default attributes depending on those already defined from the command
  * line.
 /*
  * Set default attributes depending on those already defined from the command
  * line.
@@ -248,7 +187,6 @@ static int enable_channel(char *session_name)
                } else {
                        ERR("Unknown output type %s. Possible values are: %s, %s\n",
                                        opt_output, output_mmap, output_splice);
                } else {
                        ERR("Unknown output type %s. Possible values are: %s, %s\n",
                                        opt_output, output_mmap, output_splice);
-                       usage(stderr);
                        ret = CMD_ERROR;
                        goto error;
                }
                        ret = CMD_ERROR;
                        goto error;
                }
@@ -563,7 +501,6 @@ int cmd_enable_channels(int argc, const char **argv)
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
@@ -603,7 +540,6 @@ int cmd_enable_channels(int argc, const char **argv)
        opt_channels = (char*) poptGetArg(pc);
        if (opt_channels == NULL) {
                ERR("Missing channel name.\n");
        opt_channels = (char*) poptGetArg(pc);
        if (opt_channels == NULL) {
                ERR("Missing channel name.\n");
-               usage(stderr);
                ret = CMD_ERROR;
                success = 0;
                goto mi_closing;
                ret = CMD_ERROR;
                success = 0;
                goto mi_closing;
index 2c366c6d2e6db46636d1f8b98701a8415608e00a..8a32837e6216e599c06c0861ebd64c1e8a641fd9 100644 (file)
@@ -95,147 +95,6 @@ static struct poptOption long_options[] = {
        {0, 0, 0, 0, 0, 0, 0}
 };
 
        {0, 0, 0, 0, 0, 0, 0}
 };
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng enable-event NAME[,NAME2,...] (-k | -u | -j | -l | -p) [OPTIONS] \n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help               Show this help\n");
-       fprintf(ofp, "      --list-options       Simple listing of options\n");
-       fprintf(ofp, "  -s, --session NAME       Apply to session name\n");
-       fprintf(ofp, "  -c, --channel NAME       Apply to this channel\n");
-       fprintf(ofp, "  -a, --all                Enable all tracepoints and syscalls\n");
-       fprintf(ofp, "  -k, --kernel             Apply to the kernel tracer\n");
-       fprintf(ofp, "  -u, --userspace          Apply to the user-space tracer\n");
-       fprintf(ofp, "  -j, --jul                Apply to Java application using JUL\n");
-       fprintf(ofp, "  -l, --log4j              Apply for Java application using LOG4j\n");
-       fprintf(ofp, "  -p, --python             Apply for Python application\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Event options:\n");
-       fprintf(ofp, "    --tracepoint           Tracepoint event (default)\n");
-       fprintf(ofp, "                           - userspace tracer supports wildcards at end of string.\n");
-       fprintf(ofp, "                             Don't forget to quote to deal with bash expansion.\n");
-       fprintf(ofp, "                             e.g.:\n");
-       fprintf(ofp, "                               \"*\"\n");
-       fprintf(ofp, "                               \"app_component:na*\"\n");
-       fprintf(ofp, "    --probe (addr | symbol | symbol+offset)\n");
-       fprintf(ofp, "                           Dynamic probe.\n");
-       fprintf(ofp, "                           Addr and offset can be octal (0NNN...),\n");
-       fprintf(ofp, "                           decimal (NNN...) or hexadecimal (0xNNN...)\n");
-       fprintf(ofp, "    --function (addr | symbol | symbol+offset)\n");
-       fprintf(ofp, "                           Dynamic function entry/return probe.\n");
-       fprintf(ofp, "                           Addr and offset can be octal (0NNN...),\n");
-       fprintf(ofp, "                           decimal (NNN...) or hexadecimal (0xNNN...)\n");
-       fprintf(ofp, "    --syscall              System call event\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "    --loglevel name\n");
-       fprintf(ofp, "                           Tracepoint loglevel range from 0 to loglevel.\n");
-       fprintf(ofp, "                           For JUL/LOG4j/Python domains, see the table below for the range values.\n");
-       fprintf(ofp, "    --loglevel-only name\n");
-       fprintf(ofp, "                           Tracepoint loglevel (only this loglevel)\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "                           The loglevel or loglevel-only options should be\n");
-       fprintf(ofp, "                           combined with a tracepoint name or tracepoint\n");
-       fprintf(ofp, "                           wildcard.\n");
-       fprintf(ofp, "                           Available loglevels:\n");
-       fprintf(ofp, "                                              (higher value is more verbose)\n");
-       fprintf(ofp, "                               TRACE_EMERG          = 0\n");
-       fprintf(ofp, "                               TRACE_ALERT          = 1\n");
-       fprintf(ofp, "                               TRACE_CRIT           = 2\n");
-       fprintf(ofp, "                               TRACE_ERR            = 3\n");
-       fprintf(ofp, "                               TRACE_WARNING        = 4\n");
-       fprintf(ofp, "                               TRACE_NOTICE         = 5\n");
-       fprintf(ofp, "                               TRACE_INFO           = 6\n");
-       fprintf(ofp, "                               TRACE_DEBUG_SYSTEM   = 7\n");
-       fprintf(ofp, "                               TRACE_DEBUG_PROGRAM  = 8\n");
-       fprintf(ofp, "                               TRACE_DEBUG_PROCESS  = 9\n");
-       fprintf(ofp, "                               TRACE_DEBUG_MODULE   = 10\n");
-       fprintf(ofp, "                               TRACE_DEBUG_UNIT     = 11\n");
-       fprintf(ofp, "                               TRACE_DEBUG_FUNCTION = 12\n");
-       fprintf(ofp, "                               TRACE_DEBUG_LINE     = 13\n");
-       fprintf(ofp, "                               TRACE_DEBUG          = 14\n");
-       fprintf(ofp, "                               (shortcuts such as \"system\" are allowed)\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "                           Available JUL domain loglevels:\n");
-       fprintf(ofp, "                               JUL_OFF            = INT32_MAX\n");
-       fprintf(ofp, "                               JUL_SEVERE         = %d\n", LTTNG_LOGLEVEL_JUL_SEVERE);
-       fprintf(ofp, "                               JUL_WARNING        = %d\n", LTTNG_LOGLEVEL_JUL_WARNING);
-       fprintf(ofp, "                               JUL_INFO           = %d\n", LTTNG_LOGLEVEL_JUL_INFO);
-       fprintf(ofp, "                               JUL_CONFIG         = %d\n", LTTNG_LOGLEVEL_JUL_CONFIG);
-       fprintf(ofp, "                               JUL_FINE           = %d\n", LTTNG_LOGLEVEL_JUL_FINE);
-       fprintf(ofp, "                               JUL_FINER          = %d\n", LTTNG_LOGLEVEL_JUL_FINER);
-       fprintf(ofp, "                               JUL_FINEST         = %d\n", LTTNG_LOGLEVEL_JUL_FINEST);
-       fprintf(ofp, "                               JUL_ALL            = INT32_MIN\n");
-       fprintf(ofp, "                               (shortcuts such as \"severe\" are allowed)\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "                           Available LOG4j domain loglevels:\n");
-       fprintf(ofp, "                               LOG4J_OFF            = INT32_MAX\n");
-       fprintf(ofp, "                               LOG4J_FATAL          = %d\n", LTTNG_LOGLEVEL_LOG4J_FATAL);
-       fprintf(ofp, "                               LOG4J_ERROR          = %d\n", LTTNG_LOGLEVEL_LOG4J_ERROR);
-       fprintf(ofp, "                               LOG4J_WARN           = %d\n", LTTNG_LOGLEVEL_LOG4J_WARN);
-       fprintf(ofp, "                               LOG4J_INFO           = %d\n", LTTNG_LOGLEVEL_LOG4J_INFO);
-       fprintf(ofp, "                               LOG4J_DEBUG          = %d\n", LTTNG_LOGLEVEL_LOG4J_DEBUG);
-       fprintf(ofp, "                               LOG4J_TRACE          = %d\n", LTTNG_LOGLEVEL_LOG4J_TRACE);
-       fprintf(ofp, "                               LOG4J_ALL            = INT32_MIN\n");
-       fprintf(ofp, "                               (shortcuts such as \"severe\" are allowed)\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "                           Available Python domain loglevels:\n");
-       fprintf(ofp, "                               PYTHON_CRITICAL      = %d\n", LTTNG_LOGLEVEL_PYTHON_CRITICAL);
-       fprintf(ofp, "                               PYTHON_ERROR         = %d\n", LTTNG_LOGLEVEL_PYTHON_ERROR);
-       fprintf(ofp, "                               PYTHON_WARNING       = %d\n", LTTNG_LOGLEVEL_PYTHON_WARNING);
-       fprintf(ofp, "                               PYTHON_INFO          = %d\n", LTTNG_LOGLEVEL_PYTHON_INFO);
-       fprintf(ofp, "                               PYTHON_DEBUG         = %d\n", LTTNG_LOGLEVEL_PYTHON_DEBUG);
-       fprintf(ofp, "                               PYTHON_NOTSET        = %d\n", LTTNG_LOGLEVEL_PYTHON_NOTSET);
-       fprintf(ofp, "                               (shortcuts such as \"critical\" are allowed)\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "  -f, --filter \'expression\'\n");
-       fprintf(ofp, "                           Filter expression on event fields and context.\n");
-       fprintf(ofp, "                           Event recording depends on evaluation.\n");
-       fprintf(ofp, "                           Only specify on first activation of\n");
-       fprintf(ofp, "                           a given event within a session.\n");
-       fprintf(ofp, "                           Filter only allowed when enabling\n");
-       fprintf(ofp, "                           events within a session before tracing\n");
-       fprintf(ofp, "                           is started. If the filter fails to link\n");
-       fprintf(ofp, "                           with the event within the traced domain,\n");
-       fprintf(ofp, "                           the event will be discarded. Currently,\n");
-       fprintf(ofp, "                           filter is only implemented for the user-space\n");
-       fprintf(ofp, "                           tracer.\n");
-       fprintf(ofp, "                           Expression examples:.\n");
-       fprintf(ofp, "                           \n");
-       fprintf(ofp, "                           'intfield > 500 && intfield < 503'\n");
-       fprintf(ofp, "                           '(strfield == \"test\" || intfield != 10) && intfield > 33'\n");
-       fprintf(ofp, "                           'doublefield > 1.1 && intfield < 5.3'\n");
-       fprintf(ofp, "                           \n");
-       fprintf(ofp, "                           Wildcards are allowed at the end of strings:\n");
-       fprintf(ofp, "                           'seqfield1 == \"te*\"'\n");
-       fprintf(ofp, "                           In string literals, the escape character is '\\'.\n");
-       fprintf(ofp, "                           Use '\\*' for the '*' character, and '\\\\' for\n");
-       fprintf(ofp, "                           the '\\' character. Wildcard match any sequence of,\n");
-       fprintf(ofp, "                           characters including an empty sub-string (match 0 or\n");
-       fprintf(ofp, "                           more characters).\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "                           Context information can be used for filtering. The\n");
-       fprintf(ofp, "                           examples below show usage of context filtering on\n");
-       fprintf(ofp, "                           process name (with a wildcard), process ID range, and\n");
-       fprintf(ofp, "                           unique thread ID for filtering. The process and\n");
-       fprintf(ofp, "                           thread ID of running applications can be found under\n");
-       fprintf(ofp, "                           columns \"PID\" and \"LWP\" of the \"ps -eLf\" command.\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "                           '$ctx.procname == \"demo*\"'\n");
-       fprintf(ofp, "                           '$ctx.vpid >= 4433 && $ctx.vpid < 4455'\n");
-       fprintf(ofp, "                           '$ctx.vtid == 1234'\n");
-       fprintf(ofp, "  -x, --exclude LIST\n");
-       fprintf(ofp, "                           Add exclusions to UST tracepoints:\n");
-       fprintf(ofp, "                           Events that match any of the items\n");
-       fprintf(ofp, "                           in the comma-separated LIST are not\n");
-       fprintf(ofp, "                           enabled, even if they match a wildcard\n");
-       fprintf(ofp, "                           definition of the event.\n");
-       fprintf(ofp, "\n");
-}
-
 /*
  * Parse probe options.
  */
 /*
  * Parse probe options.
  */
@@ -1434,7 +1293,6 @@ int cmd_enable_events(int argc, const char **argv)
                case OPT_EXCLUDE:
                        break;
                default:
                case OPT_EXCLUDE:
                        break;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
@@ -1486,7 +1344,6 @@ int cmd_enable_events(int argc, const char **argv)
        opt_event_list = (char*) poptGetArg(pc);
        if (opt_event_list == NULL && opt_enable_all == 0) {
                ERR("Missing event name(s).\n");
        opt_event_list = (char*) poptGetArg(pc);
        if (opt_event_list == NULL && opt_enable_all == 0) {
                ERR("Missing event name(s).\n");
-               usage(stderr);
                ret = CMD_ERROR;
                goto end;
        }
                ret = CMD_ERROR;
                goto end;
        }
index 7a35258b4b9d4ef2db48442210e8fefc61f716b3..0dd74e595b2c3c133e1fa8299c1ad7915421781b 100644 (file)
@@ -67,34 +67,6 @@ static struct poptOption long_options[] = {
        {0, 0, 0, 0, 0, 0, 0}
 };
 
        {0, 0, 0, 0, 0, 0, 0}
 };
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng list [OPTIONS] [SESSION [SESSION OPTIONS]]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "With no arguments, list available tracing session(s)\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Without a session, -k lists available kernel events\n");
-       fprintf(ofp, "Without a session, -u lists available userspace events\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "  -h, --help              Show this help\n");
-       fprintf(ofp, "      --list-options      Simple listing of options\n");
-       fprintf(ofp, "  -k, --kernel            Select kernel domain\n");
-       fprintf(ofp, "  -u, --userspace         Select user-space domain.\n");
-       fprintf(ofp, "  -j, --jul               Apply for Java application using JUL\n");
-       fprintf(ofp, "  -l, --log4j             Apply for Java application using LOG4J\n");
-       fprintf(ofp, "  -p, --python            Apply for Python application using logging\n");
-       fprintf(ofp, "  -f, --fields            List event fields.\n");
-       fprintf(ofp, "      --syscall           List available system calls.\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Session Options:\n");
-       fprintf(ofp, "  -c, --channel NAME      List details of a channel\n");
-       fprintf(ofp, "  -d, --domain            List available domain(s)\n");
-       fprintf(ofp, "\n");
-}
-
 /*
  * Get command line from /proc for a specific pid.
  *
 /*
  * Get command line from /proc for a specific pid.
  *
@@ -1726,7 +1698,6 @@ int cmd_list(int argc, const char **argv)
        memset(&domain, 0, sizeof(domain));
 
        if (argc < 1) {
        memset(&domain, 0, sizeof(domain));
 
        if (argc < 1) {
-               usage(stderr);
                ret = CMD_ERROR;
                goto end;
        }
                ret = CMD_ERROR;
                goto end;
        }
@@ -1746,7 +1717,6 @@ int cmd_list(int argc, const char **argv)
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
index 7a29da52da3ed780dfff56970678a5750bf3f970..d58cc07e0daa20853f59dcc411c670b936f70e04 100644 (file)
@@ -53,24 +53,6 @@ static struct poptOption load_opts[] = {
        {0, 0, 0, 0, 0, 0, 0}
 };
 
        {0, 0, 0, 0, 0, 0, 0}
 };
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng load [OPTIONS] [SESSION]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help               Show this help\n");
-       fprintf(ofp, "  -a, --all                Load all sessions (default)\n");
-       fprintf(ofp, "  -i, --input-path PATH    Input path of the session file(s).\n");
-       fprintf(ofp, "                           If a directory, load all files in it\n");
-       fprintf(ofp, "                           else try to load the given file.\n");
-       fprintf(ofp, "  -f, --force              Override existing session(s).\n");
-       fprintf(ofp, "                           This will destroy existing session(s)\n");
-       fprintf(ofp, "                           before creating new one(s).\n");
-}
-
 static int mi_partial_session(const char *session_name)
 {
        int ret;
 static int mi_partial_session(const char *session_name)
 {
        int ret;
@@ -163,7 +145,6 @@ int cmd_load(int argc, const char **argv)
                        opt_force = 1;
                        break;
                default:
                        opt_force = 1;
                        break;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
index 66ec5b6ebe904f5c2ec0ff33bb32598226b367ab..fe051966cdc6a568046b477a223b113d0bbaac19 100644 (file)
@@ -51,20 +51,6 @@ static struct poptOption save_opts[] = {
 
 static struct mi_writer *writer;
 
 
 static struct mi_writer *writer;
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng save [OPTIONS] [SESSION]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help           Show this help\n");
-       fprintf(ofp, "  -a, --all            Save all sessions (default)\n");
-       fprintf(ofp, "  -o, --output-path    Output path of the session configuration(s)\n");
-       fprintf(ofp, "  -f, --force          Overwrite existing session configuration(s)\n");
-}
-
 static int mi_partial_session(const char *session_name)
 {
        int ret;
 static int mi_partial_session(const char *session_name)
 {
        int ret;
@@ -158,7 +144,6 @@ int cmd_save(int argc, const char **argv)
                        list_cmd_options(stdout, save_opts);
                        goto end;
                default:
                        list_cmd_options(stdout, save_opts);
                        goto end;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
index d41dc1d191ccf2be56935c3b06e87e596a657ecd..4a41d9068a60bae986220e0e2db7f9aea45918f1 100644 (file)
@@ -45,19 +45,6 @@ static struct poptOption long_options[] = {
        {0, 0, 0, 0, 0, 0, 0}
 };
 
        {0, 0, 0, 0, 0, 0, 0}
 };
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng set-session NAME [OPTIONS]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help               Show this help\n");
-       fprintf(ofp, "      --list-options       Simple listing of options\n");
-       fprintf(ofp, "\n");
-}
-
 /*
  * Print the necessary mi for a session and name.
  */
 /*
  * Print the necessary mi for a session and name.
  */
@@ -180,7 +167,6 @@ int cmd_set_session(int argc, const char **argv)
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
@@ -189,7 +175,6 @@ int cmd_set_session(int argc, const char **argv)
        opt_session_name = (char *) poptGetArg(pc);
        if (opt_session_name == NULL) {
                ERR("Missing session name");
        opt_session_name = (char *) poptGetArg(pc);
        if (opt_session_name == NULL) {
                ERR("Missing session name");
-               usage(stderr);
                ret = CMD_ERROR;
                goto end;
        }
                ret = CMD_ERROR;
                goto end;
        }
index 1d7843954ecc60e6ad94ea62b8004338eb372325..abdf1890198b1653a2a3a2ab0bc5bc0599d584aa 100644 (file)
@@ -78,41 +78,6 @@ static struct cmd_struct actions[] = {
        { NULL, NULL }  /* Array closure */
 };
 
        { NULL, NULL }  /* Array closure */
 };
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng snapshot [OPTION] ACTION\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Actions:\n");
-       fprintf(ofp, "   add-output [-m <SIZE>] [-s <NAME>] [-n <NAME>] <URL> | -C <URL> -D <URL>\n");
-       fprintf(ofp, "      Setup and add an snapshot output for a session.\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "   del-output ID | NAME [-s <NAME>]\n");
-       fprintf(ofp, "      Delete an output for a session using the ID.\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "   list-output [-s <NAME>]\n");
-       fprintf(ofp, "      List the output of a session.\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "   record [-m <SIZE>] [-s <NAME>] [-n <NAME>] [<URL> | -C <URL> -D <URL>]\n");
-       fprintf(ofp, "      Snapshot a session's buffer(s) for all domains. If an URL is\n");
-       fprintf(ofp, "      specified, it is used instead of a previously added output.\n");
-       fprintf(ofp, "      Specifying only a name or/a size will override the current output value.\n");
-       fprintf(ofp, "      For instance, you can record a snapshot with a custom maximum size\n");
-       fprintf(ofp, "      or with a different name.\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help           Show this help\n");
-       fprintf(ofp, "      --list-options   Simple listing of options\n");
-       fprintf(ofp, "  -s, --session NAME   Apply to session name\n");
-       fprintf(ofp, "  -n, --name NAME      Name of the output or snapshot\n");
-       fprintf(ofp, "  -m, --max-size SIZE  Maximum bytes size of the snapshot {+k,+M,+G}\n");
-       fprintf(ofp, "  -C, --ctrl-url URL   Set control path URL. (Must use -D also)\n");
-       fprintf(ofp, "  -D, --data-url URL   Set data path URL. (Must use -C also)\n");
-       fprintf(ofp, "\n");
-}
-
 /*
  * Count and return the number of arguments in argv.
  */
 /*
  * Count and return the number of arguments in argv.
  */
@@ -455,7 +420,6 @@ static int cmd_add_output(int argc, const char **argv)
        int ret;
 
        if (argc < 2 && (!opt_data_url || !opt_ctrl_url)) {
        int ret;
 
        if (argc < 2 && (!opt_data_url || !opt_ctrl_url)) {
-               usage(stderr);
                ret = CMD_ERROR;
                goto end;
        }
                ret = CMD_ERROR;
                goto end;
        }
@@ -477,7 +441,6 @@ static int cmd_del_output(int argc, const char **argv)
        long id;
 
        if (argc < 2) {
        long id;
 
        if (argc < 2) {
-               usage(stderr);
                ret = CMD_ERROR;
                goto end;
        }
                ret = CMD_ERROR;
                goto end;
        }
@@ -615,7 +578,6 @@ static int handle_command(const char **argv)
 
        if (argv == NULL || (!opt_ctrl_url && opt_data_url) ||
                        (opt_ctrl_url && !opt_data_url)) {
 
        if (argv == NULL || (!opt_ctrl_url && opt_data_url) ||
                        (opt_ctrl_url && !opt_data_url)) {
-               usage(stderr);
                command_ret = CMD_ERROR;
                goto end;
        }
                command_ret = CMD_ERROR;
                goto end;
        }
@@ -739,7 +701,6 @@ int cmd_snapshot(int argc, const char **argv)
                        break;
                }
                default:
                        break;
                }
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
index 90794c66990bfc5fed93e3a0949385b8d8c95217..03d99cf4143b4f5a42245a474af9663d9f2e92d6 100644 (file)
@@ -45,22 +45,6 @@ static struct poptOption long_options[] = {
        {0, 0, 0, 0, 0, 0, 0}
 };
 
        {0, 0, 0, 0, 0, 0, 0}
 };
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng start [NAME] [OPTIONS]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Where NAME is an optional session name. If not specified, lttng will\n");
-       fprintf(ofp, "get it from the configuration directory (.lttng).\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help               Show this help\n");
-       fprintf(ofp, "      --list-options       Simple listing of options\n");
-       fprintf(ofp, "\n");
-}
-
 static int mi_print_session(char *session_name, int enabled)
 {
        int ret;
 static int mi_print_session(char *session_name, int enabled)
 {
        int ret;
@@ -167,7 +151,6 @@ int cmd_start(int argc, const char **argv)
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
index 693527535418cb647a6b8400ccc247d6cd4e39f1..5daabdac2f7ec62dd2b67d56d029b5f8a0ad8221 100644 (file)
@@ -40,15 +40,6 @@ static struct poptOption long_options[] = {
        {0, 0, 0, 0, 0, 0, 0}
 };
 
        {0, 0, 0, 0, 0, 0, 0}
 };
 
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "Usage: lttng status [options]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help          Show this help\n");
-       fprintf(ofp, "      --list-options  List options\n");
-}
-
 static int status(void)
 {
        const char *argv[2];
 static int status(void)
 {
        const char *argv[2];
@@ -89,7 +80,6 @@ int cmd_status(int argc, const char **argv)
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
@@ -97,7 +87,6 @@ int cmd_status(int argc, const char **argv)
 
        if (poptPeekArg(pc) != NULL) {
                ERR("This command does not accept positional arguments.\n");
 
        if (poptPeekArg(pc) != NULL) {
                ERR("This command does not accept positional arguments.\n");
-               usage(stderr);
                ret = CMD_UNDEFINED;
                goto end;
        }
                ret = CMD_UNDEFINED;
                goto end;
        }
index e946d4fdb503ad274a4e58f596d3fe28647760f5..c38fc894a741debd87a91aec43ec69701a1af178 100644 (file)
@@ -47,22 +47,6 @@ static struct poptOption long_options[] = {
        {0, 0, 0, 0, 0, 0, 0}
 };
 
        {0, 0, 0, 0, 0, 0, 0}
 };
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng stop [NAME] [OPTIONS]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Where NAME is an optional session name. If not specified, lttng will\n");
-       fprintf(ofp, "get it from the configuration directory (.lttng).\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help               Show this help\n");
-       fprintf(ofp, "      --list-options       Simple listing of options\n");
-       fprintf(ofp, "  -n, --no-wait            Don't wait for data availability\n");
-       fprintf(ofp, "\n");
-}
 /*
  * Mi print of partial session
  */
 /*
  * Mi print of partial session
  */
@@ -195,7 +179,6 @@ int cmd_stop(int argc, const char **argv)
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
index 6d8d91ffd73b70948c371cb69dbe0a9bc9e14210..3771de5d94b5b7bfcaacf26b0663044cecaac98f 100644 (file)
@@ -64,28 +64,6 @@ static struct poptOption long_options[] = {
        { 0, 0, 0, 0, 0, 0, 0, },
 };
 
        { 0, 0, 0, 0, 0, 0, 0, },
 };
 
-/*
- * usage
- */
-static void usage(FILE *ofp, const char *cmd_str)
-{
-       fprintf(ofp, "usage: lttng %s [-k|-u] [OPTIONS]\n", cmd_str);
-       fprintf(ofp, "\n");
-       fprintf(ofp, "If no session is given (-s), the context is added to\n");
-       fprintf(ofp, "the current sesssion. Exactly one domain (-k or -u)\n");
-       fprintf(ofp, "must be specified.\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help               Show this help.\n");
-       fprintf(ofp, "      --list-options       Simple listing of options.\n");
-       fprintf(ofp, "  -s, --session NAME       Apply to session name.\n");
-       fprintf(ofp, "  -k, --kernel             Apply to the kernel tracer.\n");
-       fprintf(ofp, "  -u, --userspace          Apply to the user-space tracer.\n");
-       fprintf(ofp, "  -p, --pid [PID]          Process ID tracker. Leave PID empty when used with --all.\n");
-       fprintf(ofp, "  -a, --all                All PIDs (use with --pid).\n");
-       fprintf(ofp, "\n");
-}
-
 static
 int parse_pid_string(const char *_pid_string,
                int all, int **_pid_list, int *nr_pids)
 static
 int parse_pid_string(const char *_pid_string,
                int all, int **_pid_list, int *nr_pids)
@@ -236,7 +214,6 @@ enum cmd_error_code track_untrack_pid(enum cmd_type cmd_type, const char *cmd_st
        ret = parse_pid_string(pid_string, all, &pid_list, &nr_pids);
        if (ret != CMD_SUCCESS) {
                ERR("Error parsing PID string");
        ret = parse_pid_string(pid_string, all, &pid_list, &nr_pids);
        if (ret != CMD_SUCCESS) {
                ERR("Error parsing PID string");
-               usage(stderr, cmd_str);
                retval = CMD_ERROR;
                goto end;
        }
                retval = CMD_ERROR;
                goto end;
        }
@@ -353,7 +330,6 @@ int cmd_track_untrack(enum cmd_type cmd_type, const char *cmd_str,
        struct mi_writer *writer = NULL;
 
        if (argc < 1) {
        struct mi_writer *writer = NULL;
 
        if (argc < 1) {
-               usage(stderr, cmd_str);
                command_ret = CMD_ERROR;
                goto end;
        }
                command_ret = CMD_ERROR;
                goto end;
        }
@@ -374,7 +350,6 @@ int cmd_track_untrack(enum cmd_type cmd_type, const char *cmd_str,
                        opt_pid = 1;
                        break;
                default:
                        opt_pid = 1;
                        break;
                default:
-                       usage(stderr, cmd_str);
                        command_ret = CMD_UNDEFINED;
                        goto end;
                }
                        command_ret = CMD_UNDEFINED;
                        goto end;
                }
@@ -399,7 +374,6 @@ int cmd_track_untrack(enum cmd_type cmd_type, const char *cmd_str,
        /* Currently only PID tracker is supported */
        if (!opt_pid) {
                ERR("Please specify at least one tracker with its expected arguments");
        /* Currently only PID tracker is supported */
        if (!opt_pid) {
                ERR("Please specify at least one tracker with its expected arguments");
-               usage(stderr, cmd_str);
                command_ret = CMD_ERROR;
                goto end;
        }
                command_ret = CMD_ERROR;
                goto end;
        }
index 3630950bbcd0eb63b47f99fd86f2e13318f634d6..cf46a8cb0e32fe7f3e1b35ed1dffa43d41dd0a90 100644 (file)
@@ -42,19 +42,6 @@ static struct poptOption long_options[] = {
        {0, 0, 0, 0, 0, 0, 0}
 };
 
        {0, 0, 0, 0, 0, 0, 0}
 };
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng version [OPTIONS]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help               Show this help\n");
-       fprintf(ofp, "      --list-options       Simple listing of options\n");
-       fprintf(ofp, "\n");
-}
-
 /*
  *  create_version
  */
 /*
  *  create_version
  */
@@ -154,7 +141,6 @@ int cmd_version(int argc, const char **argv)
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
index dac2c3e247b4e3607bafeb6de7db7c5a3799e6da..09acc30f42d20803a993c4a777a8496e976b9b74 100644 (file)
@@ -78,30 +78,6 @@ static struct viewers {
 /* Is the session we are trying to view is in live mode. */
 static int session_live_mode;
 
 /* Is the session we are trying to view is in live mode. */
 static int session_live_mode;
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng view [SESSION_NAME] [OPTIONS]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "By default, the babeltrace viewer will be used for text viewing\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Where SESSION_NAME is an optional session name. If not specified, lttng will\n");
-       fprintf(ofp, "get it from the configuration file (.lttngrc).\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help               Show this help\n");
-       fprintf(ofp, "      --list-options       Simple listing of options\n");
-       fprintf(ofp, "  -t, --trace-path PATH    Trace directory path for the viewer\n");
-       fprintf(ofp, "  -e, --viewer CMD         Specify viewer and/or options to use\n");
-       fprintf(ofp, "                           This will completely override the default viewers so\n");
-       fprintf(ofp, "                           please make sure to specify the full command. The trace\n");
-       fprintf(ofp, "                           directory path of the session will be appended at the end\n");
-       fprintf(ofp, "                           to the arguments\n");
-       fprintf(ofp, "\n");
-}
-
 static struct viewers *parse_options(void)
 {
        if (opt_viewer == NULL) {
 static struct viewers *parse_options(void)
 {
        if (opt_viewer == NULL) {
@@ -450,7 +426,6 @@ int cmd_view(int argc, const char **argv)
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
                        ret = CMD_UNDEFINED;
                        goto end;
                }
This page took 0.044724 seconds and 4 git commands to generate.