[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Cheshire Cat Computing :: View topic - how did you manage crontab entry for over 100 devices
Cheshire Cat Computing
https://steveshipway.org/forum/

how did you manage crontab entry for over 100 devices
https://steveshipway.org/forum/viewtopic.php?f=2&t=4093
Page 1 of 1

Author:  arno_st [ Tue Dec 15, 2009 11:54 pm ]
Post subject:  how did you manage crontab entry for over 100 devices

Hello,
I'm running to some trouble to run mrtg every minutes, I have over 120 devices (40switchs and 80routers), but it's look like it's taking to long to let me run it every minutes.

i try to split the device in 4 files (2 routers, 2 switch) that are called in 4 crontab entry, but not yet the solution.
each entry is like on the 4 files:
/usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/cfg/routers/lugano1.ch.pbk.cfg


So how did you manage to make you mrtg run ?

thanks for your input.

arno

Author:  stevesh [ Wed Dec 16, 2009 8:01 am ]
Post subject:  Re: how did you manage crontab entry for over 100 devices

Use the master.cfg method.

1) Create one .cfg file for each device.
2) Create a master.cfg file which contains an Include: line to include each other file (note, this assumes that all files have the same global settings)
3) Use Forks: to make sure you have enough concurrency; increase and decrease the setting until the polling cycle takes about 4mins to complete, or you run out of memory or CPU (UNIX only)
4) Call MRTG once from your crontabs on the master.cfg file only. You could alternatively use MRTG daemon mode on this file to do away with crontabs altogether.

This saves you from having to have either a huge crontab (and resulting memory/CPU spike every 5mins) or a huge script calling sequential MRTG instances (and resulting running out of time in your polling window)

Author:  arno_st [ Thu Dec 17, 2009 10:59 pm ]
Post subject:  Re: how did you manage crontab entry for over 100 devices

Ok I try to general .cfg file with many include, and the first line is:
Fork: 10

funny because at the beginning of the task (when I call mrtg) I can see the 10 childs, and doing a debug I can see the fork for 10 mrtg, but then I can see only 1 process of mrtg in the task list !?!?

root 28737 12421 0 10:59:32 pts/3 0:00 grep mrtg
root 22633 12077 0 10:38:35 pts/2 0:29 /usr/local/bin/perl -w ./mrtg --debug=base,fork,snmpo mrtg-all.cfg

Author:  stevesh [ Fri Dec 18, 2009 2:27 pm ]
Post subject:  Re: how did you manage crontab entry for over 100 devices

It only forks when it is required.

100 devices, with 10 interfaces each, with 10 forks, means each thread has 3 seconds to complete a single poll. As a simple SNMP poll will often take <1sec you may well find out that there are periods with only one thread active. Also, the thread names can be changed by MRTG. So, as long as the RRD files are updating, dont worry...

Page 1 of 1 All times are UTC + 12 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/