I thought it might be educational to post Simms' crontab and perhaps detail the way the thread handling code works in case anyone is interested. In addition, this shows some of the various maintenance tasks that each of the Simms subcores performs, such as periodic time synchronization and status/load checkin to Cemetech.
The Crontab (example from simms0):
Code:
Note that [root password] and [security hash] have been removed for obvious reasons. Also perhaps of interest, the contents of checkin.php:
Code:
and also of tonguetime.php:
Code:
The Crontab (example from simms0):
Code:
# m h dom mon dow command
*/5 * * * * wget -t 1 -O verifyresult.log http://www.cemetech.net/scripts/netverify.php?status=`php var/scripts/checkin.php`\&name=Simms0\&md5=[security hash] >>/var/errorz.txt && rm verifyresult.log
0 * * * * php /var/scripts/tonguetime.php
0 0 * * * echo '[root password]' | sudo -S ntpdate -u north-america.pool.ntp.org
*/5 * * * * php -f /var/scripts/simms1/core.php -- -manager >&- <&- >/dev/null &
Note that [root password] and [security hash] have been removed for obvious reasons. Also perhaps of interest, the contents of checkin.php:
Code:
<?php echo urlencode(shell_exec('uptime')); ?>
and also of tonguetime.php:
Code:
<?php
$h = date('g');
for($x=1;$x<=$h;$x++)
{
shell_exec("eject");
shell_exec("eject -t");
}
?>