GtkWidget *lttctl_path_entry;
GtkWidget *lttd_path_label;
GtkWidget *lttd_path_entry;
- GtkWidget *fac_path_label;
- GtkWidget *fac_path_entry;
};
/**
gtk_table_attach( GTK_TABLE(tcd->main_box),tcd->lttd_path_entry,2,6,13,14,GTK_FILL|GTK_EXPAND|GTK_SHRINK,GTK_FILL,0,0);
- tcd->fac_path_label = gtk_label_new("path to facilities:");
- gtk_widget_show (tcd->fac_path_label);
- tcd->fac_path_entry = gtk_entry_new();
- gtk_entry_set_text(GTK_ENTRY(tcd->fac_path_entry),PACKAGE_DATA_DIR "/" "ltt-control" "/facilities");
- gtk_widget_set_size_request(tcd->fac_path_entry, 250, -1);
- gtk_widget_show (tcd->fac_path_entry);
- gtk_table_attach( GTK_TABLE(tcd->main_box),tcd->fac_path_label,0,2,14,15,GTK_FILL,GTK_FILL,2,2);
- gtk_table_attach( GTK_TABLE(tcd->main_box),tcd->fac_path_entry,2,6,14,15,GTK_FILL|GTK_EXPAND|GTK_SHRINK,GTK_FILL,0,0);
-
focus_chain = g_list_append (focus_chain, tcd->username_entry);
focus_chain = g_list_append (focus_chain, tcd->password_entry);
focus_chain = g_list_append (focus_chain, tcd->start_button);
focus_chain = g_list_append (focus_chain, tcd->lttd_threads_entry);
focus_chain = g_list_append (focus_chain, tcd->lttctl_path_entry);
focus_chain = g_list_append (focus_chain, tcd->lttd_path_entry);
- focus_chain = g_list_append (focus_chain, tcd->fac_path_entry);
gtk_container_set_focus_chain(GTK_CONTAINER(tcd->main_box), focus_chain);
}
static int execute_command(const gchar *command, const gchar *username,
- const gchar *password, const gchar *lttd_path, const gchar *fac_path)
+ const gchar *password, const gchar *lttd_path)
{
pid_t pid;
int fdpty;
/* Setup environment variables */
if(strcmp(lttd_path, "") != 0)
setenv("LTT_DAEMON", lttd_path, 1);
- if(strcmp(fac_path, "") != 0)
- setenv("LTT_FACILITIES", fac_path, 1);
/* One comment line (must be only one) */
g_printf("Executing (as %s) : %s\n", username, command);
const gchar *lttctl_path =
gtk_entry_get_text(GTK_ENTRY(tcd->lttctl_path_entry));
const gchar *lttd_path = gtk_entry_get_text(GTK_ENTRY(tcd->lttd_path_entry));
- const gchar *fac_path = gtk_entry_get_text(GTK_ENTRY(tcd->fac_path_entry));
-
/* Setup arguments to su */
/* child */
strncat(args, " ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
- /* channel dir */
- strncat(args, "-l ", args_left);
- args_left = MAX_ARGS_LEN - strlen(args) - 1;
- strncat(args, channel_dir, args_left);
- args_left = MAX_ARGS_LEN - strlen(args) - 1;
+ /* Start daemon ? */
+ if(start_daemon) {
+ strncat(args, "-C", args_left);
+ args_left = MAX_ARGS_LEN - strlen(args) - 1;
+ } else {
+ /* Simply create the channel and then start tracing */
+ //strncat(args, "-b", args_left);
+ //args_left = MAX_ARGS_LEN - strlen(args) - 1;
+ }
/* space */
strncat(args, " ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
- /* trace dir */
- strncat(args, "-t ", args_left);
- args_left = MAX_ARGS_LEN - strlen(args) - 1;
- strncat(args, trace_dir, args_left);
- args_left = MAX_ARGS_LEN - strlen(args) - 1;
-
- /* space */
- strncat(args, " ", args_left);
- args_left = MAX_ARGS_LEN - strlen(args) - 1;
-
- /* name */
- strncat(args, "-n ", args_left);
+ /* channel dir */
+ strncat(args, "--channel_root ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
- strncat(args, trace_name, args_left);
+ strncat(args, channel_dir, args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
/* space */
strncat(args, " ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
- /* trace mode */
- strncat(args, "-m ", args_left);
+ /* trace dir */
+ strncat(args, "-w ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
- strncat(args, trace_mode, args_left);
+ strncat(args, trace_dir, args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
/* space */
strncat(args, " ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
- /* Start daemon ? */
- if(start_daemon) {
- strncat(args, "-d", args_left);
+ if(strcmp(trace_mode, "flight") == 0) {
+ strncat(args, "-o channel.all.overwrite=1", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
} else {
- /* Simply create the channel and then start tracing */
- strncat(args, "-b", args_left);
+ strncat(args, "-o channel.all.overwrite=0", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
}
-
/* Append to trace ? */
if(append) {
/* space */
strncat(args, " ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
- strncat(args, "-z ", args_left);
+ strncat(args, "-o channel.all.bufsize=", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
strncat(args, subbuf_size, args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
strncat(args, " ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
- strncat(args, "-x ", args_left);
+ strncat(args, "-o channel.all.bufnum=", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
strncat(args, subbuf_num, args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
strncat(args, " ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
- strncat(args, "-N ", args_left);
+ strncat(args, "-n ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
strncat(args, threads_num, args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
}
+ /* space */
+ strncat(args, " ", args_left);
+ args_left = MAX_ARGS_LEN - strlen(args) - 1;
- int retval = execute_command(args, username, password, lttd_path, fac_path);
+ /* name */
+ strncat(args, trace_name, args_left);
+ args_left = MAX_ARGS_LEN - strlen(args) - 1;
+
+ int retval = execute_command(args, username, password, lttd_path);
if(retval) {
gchar msg[256];
const gchar *trace_name =
gtk_entry_get_text(GTK_ENTRY(tcd->trace_name_entry));
const gchar *lttd_path = "";
- const gchar *fac_path = "";
const gchar *lttctl_path =
gtk_entry_get_text(GTK_ENTRY(tcd->lttctl_path_entry));
strncat(args, lttctl_path, args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
- /* space */
+ /* space */
strncat(args, " ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
-
- /* name */
- strncat(args, "-n ", args_left);
- args_left = MAX_ARGS_LEN - strlen(args) - 1;
- strncat(args, trace_name, args_left);
+
+ /* Simply pause tracing */
+ strncat(args, "-p", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
/* space */
strncat(args, " ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
-
- /* Simply pause tracing */
- strncat(args, "-q", args_left);
+
+ /* name */
+ strncat(args, trace_name, args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
- int retval = execute_command(args, username, password, lttd_path, fac_path);
+ int retval = execute_command(args, username, password, lttd_path);
if(retval) {
gchar msg[256];
guint msg_left = 256;
const gchar *trace_name =
gtk_entry_get_text(GTK_ENTRY(tcd->trace_name_entry));
const gchar *lttd_path = "";
- const gchar *fac_path = "";
const gchar *lttctl_path =
gtk_entry_get_text(GTK_ENTRY(tcd->lttctl_path_entry));
/* space */
strncat(args, " ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
-
- /* name */
- strncat(args, "-n ", args_left);
- args_left = MAX_ARGS_LEN - strlen(args) - 1;
- strncat(args, trace_name, args_left);
+
+ /* Simply unpause tracing */
+ strncat(args, "-s", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
/* space */
strncat(args, " ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
-
- /* Simply unpause tracing */
- strncat(args, "-s", args_left);
+
+ /* name */
+ strncat(args, trace_name, args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
- int retval = execute_command(args, username, password, lttd_path, fac_path);
+ int retval = execute_command(args, username, password, lttd_path);
if(retval) {
gchar msg[256];
guint msg_left = 256;
const gchar *trace_name =
gtk_entry_get_text(GTK_ENTRY(tcd->trace_name_entry));
const gchar *lttd_path = "";
- const gchar *fac_path = "";
+ const gchar *trace_mode;
+ const gchar *trace_mode_sel;
+ GtkTreeIter iter;
+ gtk_combo_box_get_active_iter(GTK_COMBO_BOX(tcd->trace_mode_combo), &iter);
+ gtk_tree_model_get(
+ gtk_combo_box_get_model(GTK_COMBO_BOX(tcd->trace_mode_combo)),
+ &iter, 0, &trace_mode_sel, -1);
+ if(strcmp(trace_mode_sel, "normal") == 0)
+ trace_mode = "normal";
+ else
+ trace_mode = "flight";
+
const gchar *lttctl_path =
gtk_entry_get_text(GTK_ENTRY(tcd->lttctl_path_entry));
gchar *trace_dir = gtk_entry_get_text(GTK_ENTRY(tcd->trace_dir_entry));
/* space */
strncat(args, " ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
-
- /* name */
- strncat(args, "-n ", args_left);
- args_left = MAX_ARGS_LEN - strlen(args) - 1;
- strncat(args, trace_name, args_left);
+
+ /* Simply stop tracing and destroy channel */
+ strncat(args, "-D", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
+ if(strcmp(trace_mode, "flight") == 0) {
+ /* space */
+ strncat(args, " ", args_left);
+ args_left = MAX_ARGS_LEN - strlen(args) - 1;
+
+ /* trace dir */
+ strncat(args, "-w ", args_left);
+ args_left = MAX_ARGS_LEN - strlen(args) - 1;
+ strncat(args, trace_dir, args_left);
+ args_left = MAX_ARGS_LEN - strlen(args) - 1;
+ }
+
/* space */
strncat(args, " ", args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
-
- /* Simply stop tracing and destroy channel */
- strncat(args, "-R", args_left);
+
+ /* name */
+ strncat(args, trace_name, args_left);
args_left = MAX_ARGS_LEN - strlen(args) - 1;
- int retval = execute_command(args, username, password, lttd_path, fac_path);
+ int retval = execute_command(args, username, password, lttd_path);
if(retval) {
gchar msg[256];
guint msg_left = 256;