Index: kernel/generic/include/ps/taskinfo.h
===================================================================
--- kernel/generic/include/ps/taskinfo.h	(revision f773206d4e59480542f9fecae5c95c53bb888e6f)
+++ kernel/generic/include/ps/taskinfo.h	(revision 34bba0e9424b4550e78c0742e0ca374742498082)
@@ -75,4 +75,5 @@
 	int priority;
 	uint64_t cycles;
+	unsigned int cpu;
 } thread_info_t;
 
Index: kernel/generic/src/ps/ps.c
===================================================================
--- kernel/generic/src/ps/ps.c	(revision f773206d4e59480542f9fecae5c95c53bb888e6f)
+++ kernel/generic/src/ps/ps.c	(revision 34bba0e9424b4550e78c0742e0ca374742498082)
@@ -170,4 +170,9 @@
 	result.cycles = t->cycles;
 
+	if (t->cpu)
+		result.cpu = t->cpu->id;
+	else
+		result.cpu = -1;
+
 	WRITE_THREAD_INFO(infos, count - 1, &result);
 
@@ -187,4 +192,8 @@
 	spinlock_unlock(&tasks_lock);
 
+	if (!selected_task) {
+		return 0;
+	}
+
 	spinlock_lock(&threads_lock);
 
Index: uspace/app/ps/ps.c
===================================================================
--- uspace/app/ps/ps.c	(revision f773206d4e59480542f9fecae5c95c53bb888e6f)
+++ uspace/app/ps/ps.c	(revision 34bba0e9424b4550e78c0742e0ca374742498082)
@@ -47,4 +47,15 @@
 #define THREAD_COUNT 50
 
+/** Thread states */
+static const char *thread_states[] = {
+	"Invalid",
+	"Running",
+	"Sleeping",
+	"Ready",
+	"Entering",
+	"Exiting",
+	"Lingering"
+}; 
+
 static void list_tasks(void)
 {
@@ -82,10 +93,20 @@
 	}
 
+	if (result == 0) {
+		printf("No task with given pid!\n");
+		exit(1);
+	}
+
 	int i;
-	printf("    ID    State   Prio    [k]Cycles\n");
+	printf("    ID    State  CPU   Prio    [k]Cycles\n");
 	for (i = 0; i < result; ++i) {
-		printf("%6llu %8d %6d %12llu\n", threads[i].tid, threads[i].state,
-				threads[i].priority, threads[i].cycles / 1000);
+		printf("%6llu %-8s %4u %6d %12llu\n", threads[i].tid, thread_states[threads[i].state],
+				threads[i].cpu, threads[i].priority, threads[i].cycles / 1000);
 	}
+}
+
+static void usage()
+{
+	printf("Usage: ps [-t pid]\n");
 }
 
@@ -100,4 +121,5 @@
 			if (argc != 1) {
 				printf("Bad argument count!\n");
+				usage();
 				exit(1);
 			}
@@ -106,4 +128,5 @@
 		} else {
 			printf("Unknown argument %s!\n", *argv);
+			usage();
 			exit(1);
 		}
