diff --git a/include/glibtop/cpu.h b/include/glibtop/cpu.h index 1d673e91..1566b291 100644 --- a/include/glibtop/cpu.h +++ b/include/glibtop/cpu.h @@ -54,7 +54,7 @@ G_BEGIN_DECLS Yes we are :) Nobody should really be using more than 32 processors. */ -#define GLIBTOP_NCPU 32 +#define GLIBTOP_NCPU 1024 typedef struct _glibtop_cpu glibtop_cpu; diff --git a/sysdeps/linux/cpu.c b/sysdeps/linux/cpu.c index bedeab59..f2cbb4ed 100644 --- a/sysdeps/linux/cpu.c +++ b/sysdeps/linux/cpu.c @@ -66,11 +66,12 @@ _glibtop_init_cpu_s (glibtop *server) /* Provides information about cpu usage. */ #define FILENAME "/proc/stat" +#define STAT_BUFSIZ 81920 void glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf) { - char buffer [BUFSIZ], *p; + char buffer [STAT_BUFSIZ], *p; int i; memset (buf, 0, sizeof (glibtop_cpu)); diff --git a/sysdeps/linux/open.c b/sysdeps/linux/open.c index b39b99ee..61c3d588 100644 --- a/sysdeps/linux/open.c +++ b/sysdeps/linux/open.c @@ -61,13 +61,14 @@ static void set_linux_version(glibtop *server) /* Opens pipe to gtop server. Returns 0 on success and -1 on error. */ #define FILENAME "/proc/stat" +#define STAT_BUFSIZ 81920 void glibtop_open_s (glibtop *server, const char *program_name, const unsigned long features, const unsigned flags) { - char buffer [BUFSIZ], *p = buffer; + char buffer [STAT_BUFSIZ], *p = buffer; server->name = program_name;