+ else if(!strncmp(recvbuf, "get_shmid ", 10)) {
+ struct ltt_trace_struct *trace;
+ char trace_name[] = "auto";
+ int i;
+
+ DBG("get_shmid");
+
+ ltt_lock_traces();
+ trace = _ltt_trace_find(trace_name);
+ ltt_unlock_traces();
+
+ if(trace == NULL) {
+ CPRINTF("cannot find trace!");
+ return 1;
+ }
+
+ for(i=0; i<trace->nr_channels; i++) {
+ struct rchan *rchan = trace->channels[i].trans_channel_data;
+ struct rchan_buf *rbuf = rchan->buf;
+
+ DBG("the shmid is %d", rbuf->shmid);
+
+ }
+ }