Index: uspace/lib/c/Makefile
===================================================================
--- uspace/lib/c/Makefile	(revision d8e3467358e76057c47d6b02a28d442a944676e6)
+++ uspace/lib/c/Makefile	(revision 9dae191e774f517d5430fc726e4aef5787b1fcd0)
@@ -96,9 +96,5 @@
 	generic/stacktrace.c \
 	generic/arg_parse.c \
-	generic/ps.c \
-	generic/cpuinfo.c \
-	generic/meminfo.c \
-	generic/load.c \
-	generic/uptime.c
+	generic/stats.c
 
 SOURCES = \
Index: uspace/lib/c/generic/cpuinfo.c
===================================================================
--- uspace/lib/c/generic/cpuinfo.c	(revision d8e3467358e76057c47d6b02a28d442a944676e6)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
- * Copyright (c) 2010 Stanislav Kozina
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <libc.h>
-#include <ps.h>
-
-/** Get infos about system CPUs.
- *
- * @param cpus		Pointer where info structures will be stored.
- * 			Use \ref sysinfo() to get cpu.count value.
- *
- * @return		EOK.
- *
- */
-int get_cpu_info(uspace_cpu_info_t *cpus)
-{
-	return __SYSCALL1(SYS_PS_GET_CPU_INFO, (sysarg_t) cpus);
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/load.c
===================================================================
--- uspace/lib/c/generic/load.c	(revision d8e3467358e76057c47d6b02a28d442a944676e6)
+++ 	(revision )
@@ -1,66 +1,0 @@
-/*
- * Copyright (c) 2010 Stanislav Kozina
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <load.h>
-#include <libc.h>
-#include <stdio.h>
-
-/** Get current system load
- *
- * @param load		Pointer where load will be stored.
- *
- * @return		EOK.
- *
- */
-int get_load(unsigned long *load)
-{
-	return __SYSCALL1(SYS_PS_GET_LOAD, (sysarg_t) load);
-}
-
-void print_load_fragment(unsigned long upper, int dec_length)
-{
-	int i;
-	/* Magic value from BSD */
-	unsigned long lower = 65536;
-	/* Print whole part */
-	printf("%u.", upper / lower);
-	unsigned long rest = (upper % lower) * 10;
-	for (i = 0; i < dec_length; ++i) {
-		printf("%d", rest / lower);
-		rest = (rest % lower) * 10;
-	}
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/meminfo.c
===================================================================
--- uspace/lib/c/generic/meminfo.c	(revision d8e3467358e76057c47d6b02a28d442a944676e6)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*
- * Copyright (c) 2010 Stanislav Kozina
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <libc.h>
-#include <ps.h>
-
-/** Get infos about system memory.
- *
- * @param cpus		Pointer where info structures will be stored.
- *
- * @return		EOK.
- *
- */
-int get_mem_info(uspace_mem_info_t *meminfo)
-{
-	return __SYSCALL1(SYS_PS_GET_MEM_INFO, (sysarg_t) meminfo);
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/ps.c
===================================================================
--- uspace/lib/c/generic/ps.c	(revision d8e3467358e76057c47d6b02a28d442a944676e6)
+++ 	(revision )
@@ -1,83 +1,0 @@
-/*
- * Copyright (c) 2010 Stanislav Kozina
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <task.h>
-#include <thread.h>
-#include <ps.h>
-#include <libc.h>
-
-/** Get the list of task ids.
- *
- * @param ids		Pointer to space where list of ids will be stored.
- * @param size		Total size of allocated space under ids.
- *
- * @return		Count of written task ids. If higher than size, there
- * 			was not enough space.
- *
- */
-size_t get_task_ids(task_id_t *ids, size_t size)
-{
-	return __SYSCALL2(SYS_PS_GET_TASKS, (sysarg_t) ids, (sysarg_t) size);
-}
-
-/** Get task info.
- *
- * @param id		Id of the task to get info about.
- * @param info		Pointer to out info struct.
- *
- * @return		0 on success.
- *
- */
-int get_task_info(task_id_t id, task_info_t *info)
-{
-	return __SYSCALL2(SYS_PS_GET_TASK_INFO, (sysarg_t) &id, (sysarg_t) info);
-}
-
-/** Get thread infos of the selected task.
- *
- * @param taskid 	Id of the selected task.
- * @param infos		Pointer to out array of thread_info_t structures.
- * @param size		Size of the infos array.
- *
- * @return		Count of written thread_infos. If higher than size, there
- * 			was not enough space.
- *
- */
-size_t get_task_threads(thread_info_t *infos, size_t size)
-{
-	return __SYSCALL2(SYS_PS_GET_THREADS, (sysarg_t) infos, (sysarg_t) size);
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/stats.c
===================================================================
--- uspace/lib/c/generic/stats.c	(revision 9dae191e774f517d5430fc726e4aef5787b1fcd0)
+++ uspace/lib/c/generic/stats.c	(revision 9dae191e774f517d5430fc726e4aef5787b1fcd0)
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2010 Stanislav Kozina
+ * Copyright (c) 2010 Martin Decky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#include <stats.h>
+#include <sysinfo.h>
+#include <assert.h>
+#include <errno.h>
+#include <stdio.h>
+#include <inttypes.h>
+
+#define SYSINFO_STATS_MAX_PATH  64
+
+stats_cpu_t *get_stats_cpus(size_t *count)
+{
+	size_t size = 0;
+	stats_cpu_t *stats_cpus =
+	    (stats_cpu_t *) sysinfo_get_data("system.cpus", &size);
+	
+	assert((size % sizeof(stats_cpu_t)) == 0);
+	
+	*count = size / sizeof(stats_cpu_t);
+	return stats_cpus;
+}
+
+stats_physmem_t *get_stats_physmem(void)
+{
+	size_t size = 0;
+	stats_physmem_t *stats_physmem =
+	    (stats_physmem_t *) sysinfo_get_data("system.physmem", &size);
+	
+	assert((size == sizeof(stats_physmem_t)) || (size == 0));
+	
+	return stats_physmem;
+}
+
+task_id_t *get_stats_tasks(size_t *count)
+{
+	size_t size = 0;
+	task_id_t *ids =
+	    (task_id_t *) sysinfo_get_data("system.tasks", &size);
+	
+	assert((size % sizeof(task_id_t)) == 0);
+	
+	*count = size / sizeof(task_id_t);
+	return ids;
+}
+
+stats_task_t *get_stats_task(task_id_t task_id)
+{
+	char name[SYSINFO_STATS_MAX_PATH];
+	snprintf(name, SYSINFO_STATS_MAX_PATH, "system.tasks.%" PRIu64, task_id);
+	
+	size_t size = 0;
+	stats_task_t *stats_task =
+	    (stats_task_t *) sysinfo_get_data(name, &size);
+	
+	assert((size == sizeof(stats_task_t)) || (size == 0));
+	
+	return stats_task;
+}
+
+load_t *get_stats_load(size_t *count)
+{
+	size_t size = 0;
+	load_t *load =
+	    (load_t *) sysinfo_get_data("system.load", &size);
+	
+	assert((size % sizeof(load_t)) == 0);
+	
+	*count = size / sizeof(load_t);
+	return load;
+}
+
+sysarg_t get_stats_uptime(void)
+{
+	sysarg_t uptime;
+	if (sysinfo_get_value("system.uptime", &uptime) != EOK)
+		uptime = 0;
+	
+	return uptime;
+}
+
+void print_load_fragment(load_t upper, unsigned int dec_length)
+{
+	/* Magic value from BSD */
+	load_t lower = 65536;
+	
+	/* Print the whole part */
+	printf("%u.", upper / lower);
+	
+	load_t rest = (upper % lower) * 10;
+	
+	unsigned int i;
+	for (i = 0; i < dec_length; i++) {
+		printf("%u", rest / lower);
+		rest = (rest % lower) * 10;
+	}
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/sysinfo.c
===================================================================
--- uspace/lib/c/generic/sysinfo.c	(revision d8e3467358e76057c47d6b02a28d442a944676e6)
+++ uspace/lib/c/generic/sysinfo.c	(revision 9dae191e774f517d5430fc726e4aef5787b1fcd0)
@@ -58,5 +58,5 @@
 }
 
-extern void *sysinfo_get_data(const char *path, size_t *size)
+void *sysinfo_get_data(const char *path, size_t *size)
 {
 	while (true) {
@@ -74,8 +74,8 @@
 			return data;
 		
+		free(data);
+		
 		if (ret != ENOMEM)
 			return NULL;
-		
-		free(data);
 	}
 }
Index: uspace/lib/c/generic/uptime.c
===================================================================
--- uspace/lib/c/generic/uptime.c	(revision d8e3467358e76057c47d6b02a28d442a944676e6)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*
- * Copyright (c) 2010 Stanislav Kozina
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <libc.h>
-#include <uptime.h>
-
-/** Get current system uptime
- *
- * @param load		Pointer where uptime will be stored.
- *
- * @return		EOK.
- *
- */
-int get_uptime(uint64_t *uptime)
-{
-	return __SYSCALL1(SYS_PS_GET_UPTIME, (sysarg_t) uptime);
-}
-
-/** @}
- */
Index: uspace/lib/c/include/load.h
===================================================================
--- uspace/lib/c/include/load.h	(revision d8e3467358e76057c47d6b02a28d442a944676e6)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- * Copyright (c) 2010 Stanislav Kozina
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */ 
-
-#ifndef LIBC_LOAD_H_
-#define LIBC_LOAD_H_
-
-#include <sys/types.h>
-#include <libarch/types.h>
-
-extern int get_load(unsigned long *load);
-extern void print_load_fragment(unsigned long upper, int dec_length);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/ps.h
===================================================================
--- uspace/lib/c/include/ps.h	(revision d8e3467358e76057c47d6b02a28d442a944676e6)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
- * Copyright (c) 2010 Stanislav Kozina
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */ 
-
-#ifndef LIBC_PS_H_
-#define LIBC_PS_H_
-
-#include <task.h>
-#include <kernel/ps/taskinfo.h>
-#include <kernel/ps/cpuinfo.h>
-#include <kernel/ps/meminfo.h>
-
-extern int get_cpu_info(uspace_cpu_info_t *cpus);
-extern int get_mem_info(uspace_mem_info_t *meminfo);
-extern size_t get_task_ids(task_id_t *ids, size_t size);
-extern int get_task_info(task_id_t id, task_info_t *info);
-extern size_t get_task_threads(thread_info_t *infos, size_t size);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/stats.h
===================================================================
--- uspace/lib/c/include/stats.h	(revision 9dae191e774f517d5430fc726e4aef5787b1fcd0)
+++ uspace/lib/c/include/stats.h	(revision 9dae191e774f517d5430fc726e4aef5787b1fcd0)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2010 Stanislav Kozina
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_STATS_H_
+#define LIBC_STATS_H_
+
+#include <task.h>
+#include <kernel/sysinfo/abi.h>
+
+extern stats_cpu_t *get_stats_cpus(size_t *);
+extern stats_physmem_t *get_stats_physmem(void);
+extern task_id_t *get_stats_tasks(size_t *);
+extern stats_task_t *get_stats_task(task_id_t);
+extern load_t *get_stats_load(size_t *);
+extern sysarg_t get_stats_uptime(void);
+
+extern void print_load_fragment(load_t, unsigned int);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/uptime.h
===================================================================
--- uspace/lib/c/include/uptime.h	(revision d8e3467358e76057c47d6b02a28d442a944676e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2010 Stanislav Kozina
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */ 
-
-#ifndef LIBC_UPTIME_H_
-#define LIBC_UPTIME_H_
-
-#include <sys/types.h>
-#include <libarch/types.h>
-
-extern int get_uptime(uint64_t *uptime);
-
-#endif
-
-/** @}
- */
