--- src/interface.cpp	2007-04-08 16:43:03.000000000 -0500
+++ src/interface.cpp	2007-11-21 02:04:18.046890135 -0600
@@ -266,14 +266,17 @@
 
 	sizegroup = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
-	GtkWidget* cpu_table = gtk_table_new(std::min(procdata->config.num_cpus / 4, 1),
-					     std::min(procdata->config.num_cpus, 4),
+	const gint num_cpu_entries =
+	  procdata->config.num_cpus + ((procdata->config.num_cpus > 1) ? 1 : 0);
+
+	GtkWidget* cpu_table = gtk_table_new(std::min(num_cpu_entries / 4, 1),
+					     std::min(num_cpu_entries, 4),
 					     TRUE);
 	gtk_table_set_row_spacings(GTK_TABLE(cpu_table), 6);
 	gtk_table_set_col_spacings(GTK_TABLE(cpu_table), 12);
 	gtk_box_pack_start(GTK_BOX(cpu_graph_box), cpu_table, FALSE, FALSE, 0);
 
-	for (i=0;i<procdata->config.num_cpus; i++) {
+	for (i=0;i<num_cpu_entries; i++) {
 		GtkWidget *temp_hbox;
 		gchar *text;
 
@@ -297,6 +300,9 @@
 		if(procdata->config.num_cpus == 1) {
 			text = g_strdup (_("CPU:"));
 		}
+		else if(i == procdata->config.num_cpus) {
+			text = g_strdup (_("Avg:"));
+		}
 		else {
 			text = g_strdup_printf (_("CPU%d:"), i+1);
 		}
--- src/load-graph.cpp	2007-04-08 16:43:03.000000000 -0500
+++ src/load-graph.cpp	2007-11-20 23:50:02.545714026 -0600
@@ -247,9 +247,13 @@
 		NOW[0][CPU_TOTAL] = cpu.total;
 		NOW[0][CPU_USED] = cpu.user + cpu.nice + cpu.sys;
 	} else {
-		for (i = 0; i < g->n; i++) {
-			NOW[i][CPU_TOTAL] = cpu.xcpu_total[i];
-			NOW[i][CPU_USED] = cpu.xcpu_user[i] + cpu.xcpu_nice[i]
+          const guint avg = g->n - 1;
+
+          NOW[avg][CPU_TOTAL] = NOW[avg][CPU_USED] = 0;
+
+		for (i = 0; i < avg; i++) {
+			NOW[avg][CPU_TOTAL] += NOW[i][CPU_TOTAL] = cpu.xcpu_total[i];
+			NOW[avg][CPU_USED] += NOW[i][CPU_USED] = cpu.xcpu_user[i] + cpu.xcpu_nice[i]
 				+ cpu.xcpu_sys[i];
 		}
 	}
@@ -549,10 +553,10 @@
 	g->type = type;
 	switch (type) {
 	case LOAD_GRAPH_CPU:
-		if (procdata->config.num_cpus == 0)
+		if (procdata->config.num_cpus < 2)
 			g->n = 1;
 		else
-			g->n = procdata->config.num_cpus;
+			g->n = procdata->config.num_cpus + 1;
 
 		for(i = 0; i < G_N_ELEMENTS(g->labels.cpu); ++i)
 			g->labels.cpu[i] = gtk_label_new(NULL);
