X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Flttngtop.c;h=ec8839c37220e41595c8d162637936a61b4b4799;hb=38e240608abcec56b7bee5a076e3992c835de834;hp=8cec6d52c1ffeb0765cc56eb93f914c374493d47;hpb=3bcf0f6b3dc99e6328bc3191cb43f386cca5a44b;p=lttngtop.git diff --git a/src/lttngtop.c b/src/lttngtop.c index 8cec6d5..ec8839c 100644 --- a/src/lttngtop.c +++ b/src/lttngtop.c @@ -52,7 +52,7 @@ #include "common.h" #include "network-live.h" -#include "lttng-index.h" +#include "ctf-index.h" #define DEFAULT_FILE_ARRAY_SIZE 1 @@ -540,14 +540,16 @@ void init_lttngtop() void usage(FILE *fp) { fprintf(fp, "LTTngTop %s\n\n", VERSION); - fprintf(fp, "Usage : lttngtop [OPTIONS] [TRACE]\n"); - fprintf(fp, " TRACE Path to the trace to analyse (no trace path for live tracing)\n"); + fprintf(fp, "Usage : lttngtop [OPTIONS] TRACE\n"); + fprintf(fp, " TRACE Path to the trace to analyse (-r for network live tracing, nothing for mmap live streaming)\n"); fprintf(fp, " -h, --help This help message\n"); fprintf(fp, " -t, --textdump Display live events in text-only\n"); fprintf(fp, " -p, --pid Comma-separated list of PIDs to display\n"); fprintf(fp, " -f, --child Follow threads associated with selected PIDs\n"); fprintf(fp, " -n, --hostname Comma-separated list of hostnames to display (require hostname context in trace)\n"); fprintf(fp, " -k, --kprobes Comma-separated list of kprobes to insert (same format as lttng enable-event)\n"); + fprintf(fp, " -r, --relay-hostname Network live streaming : hostname of the lttng-relayd (default port)\n"); + fprintf(fp, " -b, --begin Network live streaming : read the trace for the beginning of the recording\n"); } /* @@ -1037,7 +1039,10 @@ int main(int argc, char **argv) goto end; #else - fprintf(stderr, "Mmap live support not compiled\n"); + fprintf(stderr, "[ERROR] Mmap live support not compiled, specify a " + "trace directory or -r \n"); + usage(stdout); + ret = -1; goto end; #endif /* LTTNGTOP_MMAP_LIVE */ } else if (!opt_input_path && remote_live) { @@ -1078,9 +1083,11 @@ int main(int argc, char **argv) quit = 1; pthread_join(timer_thread, NULL); + ret = 0; + end: if (bt_ctx) bt_context_put(bt_ctx); - return 0; + return ret; }