Hi, I had some free time this weekend and I tought I would contribute some to the MBWE hacking community.
I don't know if anyone is interested in this so I will ask you first. The "program" is a .sh script that runs in crontab
and updates every 15min(or whatever you want) and logs your temperature, free memory, uptime and some other stuff.
After that there is a .php file that goes thru' the logfile and creates a page that shows the info. I know that there already
are mem and temp monitoring tools, but there is no combination. I will continue to update this software if anyone is interested.
MyBook World (currently configured for Ist edition with a single hard drive, but that can be changed)
PHP (NO need for GD, the graphs are made with CSS)
0.1b2 -> 0.1b3
1. Download the .tar and extract it ("wget http://wizt.infa.fi/mycheck/mycheck-0.1b3.tar")
2. Move the mycheck.sh to a directory where you have your scripts:
chmod the file so it can be run,
chmod 755 mycheck.sh
chown root:root mycheck.sh
3. IF you want to edit where the log file should be stored read on else continue reading 4.:
--— Edit the "/var/log/mycheck.log" part of following line in mycheck.sh to the place where you want the log to be stored
--— echo $timenow '|' $memfree '|' $temp '|' $upusers '|' $totalon »/var/log/mycheck.log
--— You will also have to edit the index.php to fetch the .log file from the correct place (edit line 72 in index.php for this)
4. edit /etc/crontabs/root (with nano or any other editor) and add the following line to the end:
# Run MyCheck every 15 min 0,15,30,45 * * * * >>/<DESTINATION_TO_THE_SCRIPT>/mycheck.sh
5. Move the rest of the files, and the folder to /usr/www/lib/ (so that the path to the .php file becomes /usr/www/lib/mycheck)
6. Reboot your MyBook OR restart cron:
/etc/init.d/crond.sh stop /etc/init.d/crond.sh start
Well I hope that this will work, tell me if it doesn't, I have just tested the last version with a test log file, and not on my MyBook but it should work well!
You will have to wait 15min before the first reading is done. If it does not, wait another 15-20min and if no readings show up after this then there is most
likely something wrong.