From: Sebastien GODARD Date: Sun, 12 Nov 2017 09:14:20 +0000 (+0100) Subject: sar/sadc: Increase devices upper limits X-Git-Tag: v11.7.1~56 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5b5d6dbbb01cfac3310c755d175de806d82adc4;p=sysstat sar/sadc: Increase devices upper limits We found that previous upper limits values were too low sometimes (e.g. 512 for the maximum number of network interfaces). So increase them. (Upper limits exist to make sure we don't allocate unreasonably high amount of memory to save devices statistics, in particular when we read data from a -possibly- corrupted datafile). Signed-off-by: Sebastien GODARD --- diff --git a/sa.h b/sa.h index 82d19cc..971462b 100644 --- a/sa.h +++ b/sa.h @@ -242,19 +242,19 @@ * items for each activity when we read a (possibly tainted) * sa data file. */ -#define MAX_NR_SERIAL_LINES 512 -#define MAX_NR_DISKS 8192 -#define MAX_NR_IFACES 512 -#define MAX_NR_FANS 128 -#define MAX_NR_TEMP_SENSORS 128 -#define MAX_NR_IN_SENSORS 128 -#define MAX_NR_USB 1024 -#define MAX_NR_FS 8192 -#define MAX_NR_FCHOSTS 8192 +#define MAX_NR_SERIAL_LINES 65536 +#define MAX_NR_DISKS (65536 * 4096) +#define MAX_NR_IFACES 65536 +#define MAX_NR_FANS 4096 +#define MAX_NR_TEMP_SENSORS 4096 +#define MAX_NR_IN_SENSORS 4096 +#define MAX_NR_USB 65536 +#define MAX_NR_FS (65536 * 4096) +#define MAX_NR_FCHOSTS 65536 /* NR_MAX is the upper limit used for unknown activities */ -#define NR_MAX 65536 -#define NR2_MAX 128 +#define NR_MAX (65536 * 4096) +#define NR2_MAX 1024 /* Maximum number of args that can be passed to sadc */ #define MAX_ARGV_NR 32