]> granicus.if.org Git - sysstat/commitdiff
sar/sadc: Increase devices upper limits
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 12 Nov 2017 09:14:20 +0000 (10:14 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 12 Nov 2017 09:14:20 +0000 (10:14 +0100)
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 <sysstat@users.noreply.github.com>
sa.h

diff --git a/sa.h b/sa.h
index 82d19cc1a5df8bbfd720cb5a070cff37727d75c2..971462bb0c15ed812dedd2475849cda570153749 100644 (file)
--- a/sa.h
+++ b/sa.h
  * 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