--- a/src/lparstat.h	2011-11-25 12:39:35.000000000 -0500
+++ b/src/lparstat.h	2011-12-14 10:58:45.000000000 -0500
@@ -32,6 +32,7 @@ extern void get_mem_total(struct sysentr
 extern void get_smt_mode(struct sysentry *, char *);
 extern void get_cpu_stat(struct sysentry *, char *);
 extern void get_cpu_physc(struct sysentry *, char *);
+extern void get_per_entc(struct sysentry *, char *);
 
 struct sysentry system_data[] = {
 	/* System Names */
@@ -79,7 +80,7 @@ struct sysentry system_data[] = {
 	 .descr = "Desired Variable Capacity Weight"},
 	{.name = "DedDonMode",
 	 .descr = "Dedicated Donation Mode"},
-	{.name = "partition_entitled_capcity",
+	{.name = "partition_entitled_capacity",
 	 .descr = "Partition Entitled Capacity"},
 	{.name = "system_active_processors",
 	 .descr = "Active Physical CPUs in system"},
@@ -165,9 +166,9 @@ struct sysentry system_data[] = {
 	 .get = &get_mem_total},
 
 	/* ppc64_cpu --smt */
-	{.name = "smt_state",
+	{.name = "smt_mode",
 	 .descr = "SMT",
-	 .get = &get_smt_state},
+	 .get = &get_smt_mode},
 
 	/* /proc/stat */
 	{.name = "cpu_total",
@@ -204,6 +205,9 @@ struct sysentry system_data[] = {
 	{.name = "physc",
 	 .descr = "Physical CPU Consumed",
 	 .get = &get_cpu_physc},
+	{.name = "per_entc",
+	 .descr = "Entitled CPU Consumed",
+	 .get = &get_per_entc},
 
 	/* Time */
 	{.name = "time",
@@ -213,6 +217,10 @@ struct sysentry system_data[] = {
 	{.name = "timebase",
 	 .descr = "Timebase"},
 
+	/* /proc/interrupts*/
+	{.name = "phint",
+	 .descr = "Phantom Interrupts"},
+
 	{.name[0] = '\0'},
 };
 
--- a/src/lparstat.c	2011-11-25 12:39:35.000000000 -0500
+++ b/src/lparstat.c	2011-12-14 10:59:25.000000000 -0500
@@ -123,6 +123,18 @@ void get_cpu_physc(struct sysentry *unus
 	sprintf(buf, "%.2f", physc);
 }
 
+void get_per_entc(struct sysentry *unused_se, char *buf)
+{
+	char *descr;
+	char physc[32];
+	char entc[32];
+	
+	get_sysdata("DesEntCap", &descr, entc);
+	get_sysdata("physc", &descr, physc);
+
+	sprintf(buf, "%.2f", atof(physc) / atof(entc));
+}
+
 int parse_lparcfg()
 {
 	FILE *f;
@@ -148,7 +160,6 @@ int parse_lparcfg()
 		value = strchr(line, '=');
 		*value = '\0';
 		value++;
-
 		nl = strchr(value, '\n');
 		*nl = '\0';
 		
@@ -201,6 +212,35 @@ int parse_proc_stat()
 	return 0;
 }
 
+int parse_proc_ints()
+{
+	FILE *f;
+	char line[512];
+	char *value;
+	struct sysentry *se;
+	long long int phint = 0;
+
+	f = fopen("/proc/interrupts", "r");
+	while (fgets(line, 512, f) != NULL) {
+		/* we just need the SPU line */
+		if (line[0] != 'S' || line[1] != 'P' || line[2] != 'U')
+			continue;
+
+		for ( value = &line[5]; value[2] != 'S'; value += 11) {
+			int v;
+			v = atoi(value);
+			phint += v;
+		}
+	}
+
+	fclose(f);
+
+	se = get_sysentry("phint");
+	sprintf(se->value, "%lld", phint);
+
+	return 0;
+}
+
 void get_smt_state(struct sysentry *se, char *buf)
 {
 	char *value = "?";
@@ -340,7 +380,7 @@ void get_smt_mode(struct sysentry *se, c
 	else if (line[8] == 'f')
 		sprintf(buf, "Off");
 	else
-		sprintf(buf, "Unknown");
+		sprintf(buf, "%c", line[4]);
 }
 
 long long get_cpu_time_diff()
@@ -372,6 +412,7 @@ void init_sysdata(void)
 	get_time();
 	parse_lparcfg();
 	parse_proc_stat();
+	parse_proc_ints();
 	get_time_base();
 }
 
@@ -420,9 +461,9 @@ void print_default_output(int interval,
 	offset = sprintf(buf, "type=%s ", value);
 	get_sysdata("capped", &descr, value);
 	offset += sprintf(buf + offset, "mode=%s ", value);
-	get_sysdata("smt_state", &descr, value);
+	get_sysdata("smt_mode", &descr, value);
 	offset += sprintf(buf + offset, "smt=%s ", value);
-	get_sysdata("system_active_processors", &descr, value);
+	get_sysdata("partition_active_processors", &descr, value);
 	offset += sprintf(buf + offset, "lcpu=%s ", value);
 	get_sysdata("MemTotal", &descr, value);
 	offset += sprintf(buf + offset, "mem=%s ", value);
@@ -451,9 +492,11 @@ void print_default_output(int interval,
 		get_sysdata("cpu_lbusy", &descr, lbusy);
 		get_sysdata("dispatches", &descr, vcsw);
 		get_sysdata("physc", &descr, physc);
+		get_sysdata("per_entc", &descr, entc);
+		get_sysdata("phint", &descr, phint);
 
-		fprintf(stdout, fmt, user, sys, wait, idle, physc, "XXX",
-			lbusy, vcsw, "XXX");
+		fprintf(stdout, fmt, user, sys, wait, idle, physc, entc,
+			lbusy, vcsw, phint);
 	} while (--count > 0);
 }
 
