check if mandatory contexts are enabled
[lttngtop.git] / src / cursesdisplay.c
index 7a9f99da3e666aea4ca83c307b0a297ea243e961..af09cb2df1280a7bb1292d988ad052ca83998c84 100644 (file)
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- * MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #include <stdio.h>
@@ -27,6 +26,7 @@
 
 #include "cursesdisplay.h"
 #include "lttngtoptypes.h"
+#include "iostreamtop.h"
 #include "common.h"
 
 #define DEFAULT_DELAY 15
@@ -47,8 +47,6 @@ int perf_line_selected = 0;
 int last_display_index, currently_displayed_index;
 
 struct processtop *selected_process = NULL;
-int selected_tid;
-char *selected_comm;
 int selected_ret;
 
 int selected_line = 0; /* select bar position */
@@ -61,9 +59,9 @@ int max_elements = 80;
 
 int toggle_threads = -1;
 int toggle_pause = -1;
-int toggle_tree = -1;
 
 int max_center_lines;
+GPtrArray *selected_processes;
 
 pthread_t keyboard_thread;
 
@@ -96,6 +94,7 @@ void init_screen()
                init_pair(3, COLOR_BLACK, COLOR_WHITE); /* keys */
                init_pair(4, COLOR_WHITE, COLOR_GREEN); /* keys activated */
                init_pair(5, COLOR_WHITE, COLOR_BLUE); /* select line */
+               init_pair(6, COLOR_WHITE, COLOR_GREEN); /* selected process */
        }
        termtype = getenv("TERM");
        if (!strcmp(termtype, "xterm") ||  !strcmp(termtype, "xterm-color") ||
@@ -165,7 +164,7 @@ void print_headers(int line, char *desc, int value, int first, int second)
        wattron(header, A_BOLD);
        mvwprintw(header, line, 4, "%s", desc);
        wattroff(header, A_BOLD);
-       mvwprintw(header, line, 16, "N/A", value);
+       mvwprintw(header, line, 16, "%d", value);
        wmove(header, line, 24);
        print_digits(header, first, second);
        wmove(header, line, 40);
@@ -210,12 +209,37 @@ void print_log(char *str)
                        wmove(status, ++current_line, 1);
                        current_char = 1;
                } else {
-                       mvwprintw(status, current_line, current_char++, "%c", log_lines[i]);
+                       mvwprintw(status, current_line, current_char++, "%c",
+                                       log_lines[i]);
                }
        }
        wrefresh(status);
 }
 
+int process_selected(struct processtop *process)
+{
+       int i;
+       struct processtop *stored_process;
+
+       for (i = 0; i < selected_processes->len; i++) {
+               stored_process = g_ptr_array_index(selected_processes, i);
+               if (stored_process->tid == process->tid)
+                       return 1;
+       }
+       return 0;
+}
+
+void update_selected_processes()
+{
+       if (process_selected(selected_process)) {
+               g_ptr_array_remove(selected_processes, selected_process);
+               print_log("Process removed");
+       } else {
+               g_ptr_array_add(selected_processes, selected_process);
+               print_log("Process added");
+       }
+}
+
 void print_key(WINDOW *win, char *key, char *desc, int toggle)
 {
        int pair;
@@ -236,8 +260,9 @@ void update_footer()
        wmove(footer, 1, 1);
        print_key(footer, "F2", "CPUtop  ", current_view == cpu);
        print_key(footer, "F3", "PerfTop  ", current_view == perf);
-       print_key(footer, "F6", "IOTop  ", current_view == iostream);
+       print_key(footer, "F4", "IOTop  ", current_view == iostream);
        print_key(footer, "Enter", "Details  ", current_view == process_details);
+       print_key(footer, "Space", "Highlight  ", 0);
        print_key(footer, "q", "Quit | ", 0);
        print_key(footer, "P", "Perf Pref  ", 0);
        print_key(footer, "p", "Pause  ", toggle_pause);
@@ -253,42 +278,85 @@ void basic_header()
        set_window_title(header, "Statistics for interval [gathering data...[");
        wattron(header, A_BOLD);
        mvwprintw(header, 1, 4, "CPUs");
-       mvwprintw(header, 2, 4, "Processes");
-       mvwprintw(header, 3, 4, "Threads");
-       mvwprintw(header, 4, 4, "Files");
-       mvwprintw(header, 5, 4, "Network");
-       mvwprintw(header, 6, 4, "IO");
+       mvwprintw(header, 2, 4, "Threads");
+       mvwprintw(header, 3, 4, "FDs");
        wattroff(header, A_BOLD);
        wrefresh(header);
 }
 
+struct tm format_timestamp(uint64_t timestamp)
+{
+       struct tm tm;
+       uint64_t ts_sec = 0, ts_nsec;
+       time_t time_s;
+
+       ts_nsec = timestamp;
+       ts_sec += ts_nsec / NSEC_PER_SEC;
+       ts_nsec = ts_nsec % NSEC_PER_SEC;
+
+       time_s = (time_t) ts_sec;
+
+       localtime_r(&time_s, &tm);
+
+       return tm;
+}
+
+static void scale_unit(uint64_t bytes, char *ret)
+{
+       if (bytes >= 1000000000)
+               sprintf(ret, "%" PRIu64 "G", bytes/1000000000);
+       if (bytes >= 1000000)
+               sprintf(ret, "%" PRIu64 "M", bytes/1000000);
+       else if (bytes >= 1000)
+               sprintf(ret, "%" PRIu64 "K", bytes/1000);
+       else
+               sprintf(ret, "%" PRIu64, bytes);
+}
+uint64_t total_io()
+{
+       int i;
+       struct processtop *tmp;
+       uint64_t total = 0;
+
+       for (i = 0; i < data->process_table->len; i++) {
+               tmp = g_ptr_array_index(data->process_table, i);
+               total += tmp->fileread;
+               total += tmp->filewrite;
+       }
+
+       return total;
+}
+
 void update_header()
 {
+       struct tm start, end;
+       uint64_t ts_nsec_start, ts_nsec_end;
+       char io[4];
+
+       ts_nsec_start = data->start % NSEC_PER_SEC;
+       start = format_timestamp(data->start);
+
+       ts_nsec_end = data->end % NSEC_PER_SEC;
+       end = format_timestamp(data->end);
+
        werase(header);
        box(header, 0 , 0);
        set_window_title(header, "Statistics for interval ");
        wattron(header, A_BOLD);
-       /*
-       wprintw(header, "[%lu.%lu, %lu.%lu[",
-                       data->start.tv_sec, data->start.tv_nsec,
-                       data->end.tv_sec, data->end.tv_nsec);
-                       */
-       wprintw(header, "[%lu, %lu[",
-            data->start,
-            data->end);
+
+       wprintw(header, "[%02d:%02d:%02d.%09" PRIu64 ", %02d:%02d:%02d.%09" PRIu64 "[",
+               start.tm_hour, start.tm_min, start.tm_sec, ts_nsec_start,
+               end.tm_hour, end.tm_min, end.tm_sec, ts_nsec_end);
        mvwprintw(header, 1, 4, "CPUs");
        wattroff(header, A_BOLD);
        wprintw(header, "\t%d\t(max/cpu : %0.2f%)", data->cpu_table->len,
                        100.0/data->cpu_table->len);
-       print_headers(2, "Processes", data->nbproc, data->nbnewproc,
-                       -1*(data->nbdeadproc));
-       print_headers(3, "Threads", data->nbthreads, data->nbnewthreads,
+       print_headers(2, "Threads", data->nbthreads, data->nbnewthreads,
                        -1*(data->nbdeadthreads));
-       print_headers(4, "Files", data->nbfiles, data->nbnewfiles,
+       print_headers(3, "FDs", data->nbfiles, data->nbnewfiles,
                        -1*(data->nbclosedfiles));
-       mvwprintw(header, 4, 43, "N/A kbytes/sec");
-       print_headers(5, "Network", 114, 0, 0);
-       mvwprintw(header, 5, 43, "N/A Mbytes/sec");
+       scale_unit(total_io(), io);
+       mvwprintw(header, 3, 43, "%sB/sec", io);
        wrefresh(header);
 }
 
@@ -343,17 +411,19 @@ void update_cputop_display()
        mvwprintw(center, 1, 32, "NAME");
        wattroff(center, A_BOLD);
 
-       max_center_lines = LINES - 7 - 7 - 1 - header_offset;
+       max_center_lines = LINES - 5 - 7 - 1 - header_offset;
 
        /* iterate the process (thread) list */
        for (i = list_offset; i < data->process_table->len &&
                        nblinedisplayed < max_center_lines; i++) {
                tmp = g_ptr_array_index(data->process_table, i);
 
+               if (process_selected(tmp)) {
+                       wattron(center, COLOR_PAIR(6));
+                       mvwhline(center, current_line + header_offset, 1, ' ', COLS-3);
+               }
                if (current_line == selected_line) {
                        selected_process = tmp;
-                       selected_tid = tmp->tid;
-                       selected_comm = tmp->comm;
                        wattron(center, COLOR_PAIR(5));
                        mvwhline(center, current_line + header_offset, 1, ' ', COLS-3);
                }
@@ -366,6 +436,7 @@ void update_cputop_display()
                mvwprintw(center, current_line + header_offset, 22, "%d", tmp->tid);
                /* NAME */
                mvwprintw(center, current_line + header_offset, 32, "%s", tmp->comm);
+               wattroff(center, COLOR_PAIR(6));
                wattroff(center, COLOR_PAIR(5));
                nblinedisplayed++;
                current_line++;
@@ -419,18 +490,24 @@ void update_process_details()
 {
        unsigned long elapsed;
        double maxcputime;
-       struct processtop *tmp = find_process_tid(data, selected_tid, selected_comm);
+       struct processtop *tmp;
+       struct files *file_tmp;
+       int i, j = 0;
+       char unit[4];
 
        set_window_title(center, "Process details");
 
 
+       tmp = find_process_tid(data,
+                       selected_process->tid,
+                       selected_process->comm);
        elapsed = data->end - data->start;
        maxcputime = elapsed * data->cpu_table->len / 100.0;
 
        print_key_title("Name", 1);
-       wprintw(center, "%s", selected_comm);
+       wprintw(center, "%s", selected_process->comm);
        print_key_title("TID", 2);
-       wprintw(center, "%d", selected_tid);
+       wprintw(center, "%d", selected_process->tid);
        if (!tmp) {
                print_key_title("Does not exit at this time", 3);
                return;
@@ -442,6 +519,34 @@ void update_process_details()
        wprintw(center, "%d", tmp->ppid);
        print_key_title("CPU", 5);
        wprintw(center, "%1.2f %%", tmp->totalcpunsec/maxcputime);
+
+       print_key_title("READ B/s", 6);
+       scale_unit(tmp->fileread, unit);
+       wprintw(center, "%s", unit);
+
+       print_key_title("WRITE B/s", 7);
+       scale_unit(tmp->filewrite, unit);
+       wprintw(center, "%s", unit);
+
+       wattron(center, A_BOLD);
+       mvwprintw(center, 8, 1, "FD");
+       mvwprintw(center, 8, 10, "READ");
+       mvwprintw(center, 8, 17, "WRITE");
+       mvwprintw(center, 8, 24, "FILENAME");
+       wattroff(center, A_BOLD);
+
+       for (i = 0; i < tmp->process_files_table->len; i++) {
+               file_tmp = get_file(tmp, i);
+               if (file_tmp != NULL) {
+                       mvwprintw(center, 9 + j, 1, "%d", i);
+                       scale_unit(file_tmp->read, unit);
+                       mvwprintw(center, 9 + j, 10, "%s", unit);
+                       scale_unit(file_tmp->write, unit);
+                       mvwprintw(center, 9 + j, 17, "%s", unit);
+                       mvwprintw(center, 9 + j, 24, "%s", file_tmp->name);
+                       j++;
+               }
+       }
 }
 
 void update_perf()
@@ -468,9 +573,9 @@ void update_perf()
        g_hash_table_iter_init(&iter, data->perf_list);
        while (g_hash_table_iter_next (&iter, &key, (gpointer) &perfn1)) {
                if (perfn1->visible) {
-                       /* + 6 to strip the "_perf_" prefix */
+                       /* + 5 to strip the "perf_" prefix */
                        mvwprintw(center, 1, perf_row, "%s",
-                                       (char *) key + 6);
+                                       (char *) key + 5);
                        perf_row += 20;
                }
                if (perfn1->sort) {
@@ -482,10 +587,14 @@ void update_perf()
 
        g_ptr_array_sort_with_data(data->process_table, sort_perf, perf_key);
 
-       for (i = 0; i < data->process_table->len && 
+       for (i = 0; i < data->process_table->len &&
                        nblinedisplayed < max_center_lines; i++) {
                tmp = g_ptr_array_index(data->process_table, i);
 
+               if (process_selected(tmp)) {
+                       wattron(center, COLOR_PAIR(6));
+                       mvwhline(center, current_line + header_offset, 1, ' ', COLS-3);
+               }
                if (current_line == selected_line) {
                        selected_process = tmp;
                        wattron(center, COLOR_PAIR(5));
@@ -506,64 +615,26 @@ void update_perf()
                                        value = perfn2->count;
                                else
                                        value = 0;
-                               mvwprintw(center, current_line + header_offset, perf_row, "%d", value);
+                               mvwprintw(center, current_line + header_offset,
+                                               perf_row, "%d", value);
                                perf_row += 20;
                        }
                }
 
+               wattroff(center, COLOR_PAIR(6));
                wattroff(center, COLOR_PAIR(5));
                nblinedisplayed++;
                current_line++;
        }
 }
 
-void update_fileio()
-{
-       int i;
-       int offset;
-
-       set_window_title(center, "IO Top");
-       wattron(center, A_BOLD);
-       mvwprintw(center, 1, 10, "READ");
-       mvwprintw(center, 2, 1, "bytes");
-       mvwprintw(center, 2, 15, "bytes/sec");
-
-       mvwprintw(center, 1, 39, "WRITE");
-       mvwprintw(center, 2, 33, "bytes");
-       mvwprintw(center, 2, 45, "bytes/sec");
-
-       if (toggle_threads > 0) {
-               mvwprintw(center, 1, 60, "TGID");
-               mvwprintw(center, 1, 70, "PID");
-               offset = 8;
-       } else {
-               mvwprintw(center, 1, 60, "PID(TGID)");
-               offset = 0;
-       }
-       mvwprintw(center, 1, 72 + offset, "NAME");
-       wattroff(center, A_BOLD);
-
-       for (i = 3; i < LINES - 3 - 8 - 1; i++) {
-               mvwprintw(center, i, 1, "%d", i*1000);
-               mvwprintw(center, i, 15, "%dk", i);
-               mvwprintw(center, i, 28, "|    %d", i*2000);
-               mvwprintw(center, i, 45, "%dk", i*2);
-               if (toggle_threads > 0) {
-                       mvwprintw(center, i, 57, "|  %d", i);
-                       mvwprintw(center, i, 70, "%d", i);
-               } else {
-                       mvwprintw(center, i, 57, "|  %d", i);
-               }
-               mvwprintw(center, i, 72 + offset, "process_%d", i);
-       }
-}
-
 gint sort_by_ret_desc(gconstpointer p1, gconstpointer p2)
 {
        struct processtop *n1 = *(struct processtop **)p1;
        struct processtop *n2 = *(struct processtop **)p2;
-       unsigned long totaln1 = n1->iostream->ret_total;
-       unsigned long totaln2 = n2->iostream->ret_total;
+
+       unsigned long totaln1 = n1->totalfileread + n1->totalfilewrite;
+       unsigned long totaln2 = n2->totalfileread + n2->totalfilewrite;
 
        if (totaln1 < totaln2)
                return 1;
@@ -579,18 +650,17 @@ void update_iostream()
        struct processtop *tmp;
        int nblinedisplayed = 0;
        int current_line = 0;
+       int total = 0;
+       char unit[4];
 
        set_window_title(center, "IO Top");
        wattron(center, A_BOLD);
-       mvwprintw(center, 1, 1, "READ (B/s)");
-       mvwprintw(center, 1, 20, "WRITE (B/s)");
-
-       mvwprintw(center, 1, 40, "TOTAL STREAM");
-
-       mvwprintw(center, 1, 60, "TGID");
-       mvwprintw(center, 1, 80, "PID");
-
-       mvwprintw(center, 1, 92, "NAME");
+       mvwprintw(center, 1, 1, "PID");
+       mvwprintw(center, 1, 11, "TID");
+       mvwprintw(center, 1, 22, "NAME");
+       mvwprintw(center, 1, 40, "R (B/sec)");
+       mvwprintw(center, 1, 52, "W (B/sec)");
+       mvwprintw(center, 1, 64, "Total");
        wattroff(center, A_BOLD);
 
        g_ptr_array_sort(data->process_table, sort_by_ret_desc);
@@ -599,37 +669,37 @@ void update_iostream()
                        nblinedisplayed < max_center_lines; i++) {
                tmp = g_ptr_array_index(data->process_table, i);
 
+               if (process_selected(tmp)) {
+                       wattron(center, COLOR_PAIR(6));
+                       mvwhline(center, current_line + header_offset, 1, ' ', COLS-3);
+               }
                if (current_line == selected_line) {
                        selected_process = tmp;
-                       selected_tid = tmp->tid;
-                       selected_comm = tmp->comm;
                        wattron(center, COLOR_PAIR(5));
                        mvwhline(center, current_line + header_offset, 1, ' ', COLS-3);
                }
+               /* TGID */
+               mvwprintw(center, current_line + header_offset, 1, "%d", tmp->pid);
+               /* PID */
+               mvwprintw(center, current_line + header_offset, 11, "%d", tmp->tid);
+               /* NAME */
+               mvwprintw(center, current_line + header_offset, 22, "%s", tmp->comm);
+
                /* READ (bytes/sec) */
-               mvwprintw(center, current_line + header_offset, 1, "%lu",
-                               tmp->iostream->ret_read);
+               scale_unit(tmp->fileread, unit);
+               mvwprintw(center, current_line + header_offset, 40, "%s", unit);
 
                /* WRITE (bytes/sec) */
-               mvwprintw(center, current_line + header_offset, 20, "%lu",
-                               tmp->iostream->ret_write);
+               scale_unit(tmp->filewrite, unit);
+               mvwprintw(center, current_line + header_offset, 52, "%s", unit);
 
                /* TOTAL STREAM */
-               if(tmp->iostream->ret_total >= 1000000)
-                       mvwprintw(center, current_line + header_offset, 40, "%lu MB",
-                                       tmp->iostream->ret_total/1000000);
-               else if(tmp->iostream->ret_total >=1000)
-                       mvwprintw(center, current_line + header_offset, 40, "%lu KB",
-                                       tmp->iostream->ret_total/1000);
-               else
-                       mvwprintw(center, current_line + header_offset, 40, "%lu B",
-                                       tmp->iostream->ret_total);
-               /* TGID */
-               mvwprintw(center, current_line + header_offset, 60, "%d", tmp->pid);
-               /* PID */
-               mvwprintw(center, current_line + header_offset, 80, "%d", tmp->tid);
-               /* NAME */
-               mvwprintw(center, current_line + header_offset, 92, "%s", tmp->comm);
+               total = tmp->totalfileread + tmp->totalfilewrite;
+
+               scale_unit(total, unit);
+               mvwprintw(center, current_line + header_offset, 64, "%s", unit);
+
+               wattroff(center, COLOR_PAIR(6));
                wattroff(center, COLOR_PAIR(5));
                nblinedisplayed++;
                current_line++;
@@ -655,9 +725,6 @@ void update_current_view()
        case process_details:
                update_process_details();
                break;
-       case fileio:
-               update_fileio();
-               break;
        case iostream:
                update_iostream();
                break;
@@ -701,7 +768,8 @@ void update_perf_panel(int line_selected, int toggle_view, int toggle_sort)
        box(perf_panel_window, 0 , 0);
        set_window_title(perf_panel_window, "Perf Preferences ");
        wattron(perf_panel_window, A_BOLD);
-       mvwprintw(perf_panel_window, g_hash_table_size(data->perf_list) + 1, 1, " 's' to sort");
+       mvwprintw(perf_panel_window, g_hash_table_size(data->perf_list) + 1, 1,
+                       " 's' to sort");
        wattroff(perf_panel_window, A_BOLD);
 
        if (toggle_sort == 1) {
@@ -735,7 +803,7 @@ void update_perf_panel(int line_selected, int toggle_view, int toggle_sort)
                        wattron(perf_panel_window, A_BOLD);
                mvwprintw(perf_panel_window, i + 1, 1, "[%c] %s",
                                perf->visible == 1 ? 'x' : ' ',
-                               (char *) perflist->data + 6);
+                               (char *) perflist->data + 5);
                wattroff(perf_panel_window, A_BOLD);
                wattroff(perf_panel_window, COLOR_PAIR(5));
                i++;
@@ -745,7 +813,6 @@ void update_perf_panel(int line_selected, int toggle_view, int toggle_sort)
        doupdate();
 }
 
-
 void toggle_perf_panel(void)
 {
        if (perf_panel_visible) {
@@ -814,20 +881,6 @@ void *handle_keyboard(void *p)
                        }
                        break;
                case KEY_NPAGE:
-                       if ((selected_line + 10 < max_center_lines - 1) &&
-                                       ((selected_line + 10) < max_elements - 1)) {
-                               selected_line += 10;
-                               selected_in_list += 10;
-                       } else if (max_elements > max_center_lines) {
-                               selected_line = max_center_lines - 1;
-                               if (selected_in_list + 10 < max_elements - 1) {
-                                       selected_in_list += 10;
-                                       list_offset += (selected_in_list - max_center_lines + 1);
-                               }
-                       } else if (selected_line + 10 > max_elements) {
-                               selected_line = max_elements - 1;
-                       }
-                       update_current_view();
                        break;
                case KEY_UP:
                        if (perf_panel_visible) {
@@ -846,11 +899,6 @@ void *handle_keyboard(void *p)
                        }
                        break;
                case KEY_PPAGE:
-                       if (selected_line - 10 > 0)
-                               selected_line -= 10;
-                       else
-                               selected_line = 0;
-                       update_current_view();
                        break;
 
                /* Navigate the history with arrows */
@@ -889,8 +937,12 @@ void *handle_keyboard(void *p)
 
                        break;
                case ' ':
-                       if (perf_panel_visible)
+                       if (perf_panel_visible) {
                                update_perf_panel(perf_line_selected, 1, 0);
+                       } else {
+                               update_selected_processes();
+                               update_current_view();
+                       }
                        break;
                case 's':
                        if (perf_panel_visible)
@@ -898,39 +950,34 @@ void *handle_keyboard(void *p)
                        break;
 
                case 13: /* FIXME : KEY_ENTER ?? */
-                       if (current_view == cpu) {
+                       if (current_view != process_details) {
+                               previous_view = current_view;
                                current_view = process_details;
+                       } else {
+                               current_view = previous_view;
+                               previous_view = process_details;
                        }
                        update_current_view();
                        break;
 
                case KEY_F(1):
-                       toggle_tree *= -1;
                        current_view = cpu;
+                       selected_line = 0;
                        update_current_view();
                        break;
                case KEY_F(2):
                        current_view = cpu;
+                       selected_line = 0;
                        update_current_view();
                        break;
                case KEY_F(3):
                        current_view = perf;
-                       toggle_tree = -1;
+                       selected_line = 0;
                        update_current_view();
                        break;
                case KEY_F(4):
-                       current_view = fileio;
-                       toggle_tree = -1;
-                       update_current_view();
-                       break;
-               case KEY_F(5):
-                       current_view = netio;
-                       toggle_tree = -1;
-                       update_current_view();
-                       break;
-               case KEY_F(6):
                        current_view = iostream;
-                       toggle_tree = -1;
+                       selected_line = 0;
                        update_current_view();
                        break;
                case KEY_F(10):
@@ -952,12 +999,8 @@ void *handle_keyboard(void *p)
                        toggle_perf_panel();
                        break;
                default:
-                       /*
-                        * commented because it makes the list refresh in different order
-                        * if we sort and there are equal values
-                        if (data)
-                        update_current_view();
-                        */
+                       if (data)
+                               update_current_view();
                        break;
                }
                update_footer();
@@ -967,11 +1010,12 @@ void *handle_keyboard(void *p)
 
 void init_ncurses()
 {
+       selected_processes = g_ptr_array_new();
        sem_init(&update_display_sem, 0, 1);
        init_screen();
 
-       header = create_window(7, COLS - 1, 0, 0);
-       center = create_window(LINES - 7 - 7, COLS - 1, 7, 0);
+       header = create_window(5, COLS - 1, 0, 0);
+       center = create_window(LINES - 5 - 7, COLS - 1, 5, 0);
        status = create_window(MAX_LOG_LINES + 2, COLS - 1, LINES - 7, 0);
        footer = create_window(1, COLS - 1, LINES - 1, 0);
 
This page took 0.030216 seconds and 4 git commands to generate.