log all bash-command line commands and upload them centrally
[monitor.git] / histlog / upload.cron.php
1 <?php
2 if (isset($_REQUEST['node_id'])) {
3     # setup the same random times for each distinct node_id by seeding rand()
4     $node_id = intval($_REQUEST['node_id']);
5     srand($node_id);
6 }
7 $m = rand(0,59);
8 $h = rand(0,23);
9 echo "# random time on first day of week upload bash logs to monitor\n";
10 echo "$m $h * * 0,3,5 root /usr/bin/collect_snoopylog.sh\n";
11 ?>