MyCheck - Temp,mem and more monitoring tool, intrested?
Forum » Forum / My Book World Edition (blue rings) » MyCheck - Temp,mem and more monitoring tool, intrested?
Started by: wiztwizt
On: 1211191737|%e %b %Y, %H:%M %Z|agohover
Number of posts: 63
rss icon RSS: New posts
Summary:
A little tool that includes a shellscript and a .php page
MyCheck - Temp,mem and more monitoring tool, anyone intrested?
wiztwizt 1211191737|%e %b %Y, %H:%M %Z|agohover

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.

Requirements:
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)

mycheck.png

Download:
MyCheck 0.1b3
(old version at http://wizt.infa.fi/mycheck/)

Update versions:
0.1b2 -> 0.1b3

Howto:

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

and
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.

last edited on 1212344243|%e %b %Y, %H:%M %Z|agohover by wizt + show more
Re: MyCheck - Temp,mem and more monitoring tool, anyone intrested?
humecazswohumecazswo 1211199046|%e %b %Y, %H:%M %Z|agohover

I'm interested! With cpu usage or load average monitoring thats the tool i've been waiting for.. CPU usage is pretty low, i assume?

Re: MyCheck - Temp,mem and more monitoring tool, anyone intrested?
wiztwizt 1211210722|%e %b %Y, %H:%M %Z|agohover

I will add average CPU loads, and then probably post a first public version. The CPU usage should be relatively small, it runs 5-6 commands(maby more as the "program" get bigger) every 15min (or whatever you want) and then stores it in a log file, the php file is probably the one that takes up some CPU usage but that is really small too, so I don't think CPU usage will be a problem . As you might have figured out yourself if you have the spindown application activated this will most likely make the drive spin up again. I will try to make a version tomorrow that you and other people can try.

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
starkstark 1211235207|%e %b %Y, %H:%M %Z|agohover

interested!


2 X MBWE 500gb
LED Display

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by starkstark, 1211235207|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
wiztwizt 1211294163|%e %b %Y, %H:%M %Z|agohover

I've added a link and some intructions how to install MyCheck 0.1 beta 2 (I've changed the version numbering so don't worry about the picture above, this is the latest version that I've written)

last edited on 1211302494|%e %b %Y, %H:%M %Z|agohover by wizt + show more
unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by wiztwizt, 1211294163|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
PineapplePineapple 1211316466|%e %b %Y, %H:%M %Z|agohover

Great app!!! I'll for sure try it later.

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
humecazswohumecazswo 1211526213|%e %b %Y, %H:%M %Z|agohover

I Tried it but i cant get any data on http:/my-book-ip/mycheck.. Only the empty charts.. :
is there a way to manually start the mycheck.sh? I tried "sh mycheck.sh" and "bash mycheck.sh" = i get "cannot execute binary file"..

Which crontab is the right one to modify? I found 2 crontabs, "/etc/crontabs/root" and "/opt/etc/crontab".
I added "0,15,30,45 * * * * /root/scripts/mycheck.sh" to both just to be sur, restarted cron but still no logfile in /var/log…

any ideas?

edit:
in the instructions, you wrote:
0,15,30,45 * * * * /<DESTINATION_TO_THE_SCRIPT>/check_temp.sh
But isn't that supposed to be ..blahblah/mycheck.sh instead of check_temp.sh?

last edited on 1211527361|%e %b %Y, %H:%M %Z|agohover by humecazswo + show more
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
wiztwizt 1211533199|%e %b %Y, %H:%M %Z|agohover

Yes you are right it should be mycheck.sh NOT check_temp.sh and about the crontabs, I wrote above that you should edit /etc/crontabs/root :) and about the .sh file try to run ./mycheck.sh (you have to be in the folder in witch you have the file!) and if there is any error then try to "chmod 755 mycheck.sh" and then "chown root:root mycheck.sh" and try again, also remember that you have to be root when you do this! If the script runs like it should BUT the table in the .php page does not show anything then first check /var/log/mycheck.log with (nano /var/log/mycheck.log) if there is data in this file, then there is a problem in my .php file and I will correct it, if not then there is a problem that I don't really know about :) but please try the thing I wrote and then get back to me an tell me what was wrong. Thanks!

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by wiztwizt, 1211533199|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
humecazswohumecazswo 1211544760|%e %b %Y, %H:%M %Z|agohover

I'm getting confused.. there shouldn't be anything weird with this.. i tried this:

[root@MyBookWorld scripts]# ./mycheck.sh 
-bash: ./mycheck.sh: cannot execute binary file
[root@MyBookWorld scripts]# ls -l
-rwxr-xr-x 1 root root 423 May 18 23:33 mycheck.sh
[root@MyBookWorld scripts]# chmod +x mycheck.sh 
[root@MyBookWorld scripts]# ./mycheck.sh 
-bash: ./mycheck.sh: cannot execute binary file

hope u can help me out.. thanks..

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
wiztwizt 1211553808|%e %b %Y, %H:%M %Z|agohover

did you actually read what I wrote to you before :D try:

chmod 755 mycheck.sh
chown root:root mycheck.sh
./mycheck.sh

if that does not work, then chmod to 777 and try again…
I hope that this works for you, else I have to check into this… :)

last edited on 1211553849|%e %b %Y, %H:%M %Z|agohover by wizt + show more
unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by wiztwizt, 1211553808|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
albertroalbertro 1211756259|%e %b %Y, %H:%M %Z|agohover

is impossible run mycheck.sh

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
humecazswohumecazswo 1211785155|%e %b %Y, %H:%M %Z|agohover

as you can see from my previous post's "ls -l" i have chmodded it 755 and its owned by root:root.. :)

this time i tried chmod 777 also, results:

[root@MyBookWorld scripts]# chmod 755 mycheck.sh 
[root@MyBookWorld scripts]# chown root:root mycheck.sh 
[root@MyBookWorld scripts]# ./mycheck.sh 
-bash: ./mycheck.sh: cannot execute binary file
[root@MyBookWorld scripts]# chmod 777 mycheck.sh 
[root@MyBookWorld scripts]# ./mycheck.sh 
-bash: ./mycheck.sh: cannot execute binary file
[root@MyBookWorld scripts]#
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
frederikkfrederikk 1211786036|%e %b %Y, %H:%M %Z|agohover

Can you post the results of a cat on your script ?

"cat ./mycheck.sh"

Ciao
Fred

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
humecazswohumecazswo 1211790535|%e %b %Y, %H:%M %Z|agohover

okay.

Solved it. I modified the 1st line of mycheck.sh. Here's the mycheck.sh that works for me:

#!/bin/bash
#
#MYCHECK.SH PATH = /usr/sbin/
#MYCHECK.LOG = /var/log/
#
timenow=`date +%x\ %X`
memfree=`cat /proc/meminfo | grep MemFree:`
temp=`/usr/sbin/smartctl -d ata -A /dev/sda | grep Temperature | cut -d ' ' -f37`
upusers=`uptime`
totalon=`/usr/sbin/smartctl -d ata -A /dev/sda | grep Power_On | cut -d ' ' -f44`
echo $timenow '|' $memfree '|' $temp '|' $upusers '|' $totalon >>/var/log/mycheck.log

There was an extra space(bar) on the beginning of the first line and it pointed to /bin/sh. I did an "echo $SHELL" that told me my shell was /bin/bash. Anyway, now it works for me, thanks everyone..!

-humecazswo

last edited on 1211793134|%e %b %Y, %H:%M %Z|agohover by humecazswo + show more
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
wiztwizt 1211797354|%e %b %Y, %H:%M %Z|agohover

Really nice that you got it working..I will try to create a new version as soon as possible so that you don't have to copy so much stuff and edit files.. tell me if there is any other problem! And also tell me what you want to be added to the page and script and I'll do it as fast as possible!

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by wiztwizt, 1211797354|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
humecazswohumecazswo 1211797931|%e %b %Y, %H:%M %Z|agohover

Time for bug-busting:

index.php seems to work fine with uptime<1hr. My uptime now is 11d+ as shown below (mycheck.log)

05/26/08 12:30:01 | MemFree: 1040 kB | 45 | 12:30:02 up 10 days, 23:58, 0 users, load average: 0.01, 0.06, 0.07 | 397
05/26/08 12:45:01 | MemFree: 1088 kB | 45 | 12:45:01 up 11 days, 13 min, 0 users, load average: 0.00, 0.05, 0.05 | 397
05/26/08 13:00:01 | MemFree: 920 kB | 45 | 13:00:02 up 11 days, 28 min, 0 users, load average: 0.05, 0.10, 0.05 | 397

wich makes the output look like

Time                Free Memory    Temp.    Uptime            Tot. Uptime    Users Online        Load average
05/26/08 13:00:01    920kb            45c        11 daysh min    397 h        28                0.05 0.10 0.05
05/26/08 12:45:01    1088kb            45c        11 daysh min    397 h        13                0.00 0.05 0.05
05/26/08 12:30:01    1040kb            45c        10 daysh min    397 h        23:58            0.01 0.06 0.07

Apparently the index.php needs to be fixed, i'm übern00b with php so I won't even try..
thanks again!
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
wiztwizt 1211807204|%e %b %Y, %H:%M %Z|agohover

Check if this fix helps you out!
Index HOTFIX (also posted in the first post of this thread)

last edited on 1211807322|%e %b %Y, %H:%M %Z|agohover by wizt + show more
unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by wiztwizt, 1211807204|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
humecazswohumecazswo 1211809991|%e %b %Y, %H:%M %Z|agohover

Didn't help.. all i see is empty bars in /mycheck..

will be back for more..

p.s. Taidatkin olla suomesta, ainakin servusta päätellen, palaan myöhemmin astialle, nyt on päivä pulkassa niin leikkimiset saa jäädä..

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
wiztwizt 1211813281|%e %b %Y, %H:%M %Z|agohover

I've uploaded a new version of the file.. it's in the same place so try to redownload and try it again…I found out that I forgot to check one thing so :)
And yes I'm from Finland, but we should probably keep it to english in the forum :D I'm a swedish speaking finn also so my finish is not that great, I understand it but I rather speak english in places like this :)

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by wiztwizt, 1211813281|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
humecazswohumecazswo 1211871775|%e %b %Y, %H:%M %Z|agohover

Downloaded the updated fix, still nothing in the charts&bars..

any ideas?

Here's a clip from my lighthttpd-log:

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Warning:  file(mycheck.log) [<a 
href='function.file'>function.file</a>]: failed to open stream: No such file or directory in 
/usr/www/lib/mycheck/index.php on line 103
PHP Notice:  Undefined variable: max_readings_to_show in /usr/www/lib/mycheck/index.php on line 104
PHP Warning:  array_slice() expects parameter 1 to be array, boolean given in /usr/www/lib/mycheck/index.php on 
line 104

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  2 in 
/usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 148
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 155
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 163

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  2 in 
/usr/www/lib/mycheck/index.php on line 155
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 159

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  2 in 
/usr/www/lib/mycheck/index.php on line 155
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 159

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  2 in 
/usr/www/lib/mycheck/index.php on line 155
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 159

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  2 in 
/usr/www/lib/mycheck/index.php on line 155
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 159

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  2 in 
/usr/www/lib/mycheck/index.php on line 155
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 159

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  2 in 
/usr/www/lib/mycheck/index.php on line 155
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 159

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  2 in 
/usr/www/lib/mycheck/index.php on line 155
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 159

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  2 in 
/usr/www/lib/mycheck/index.php on line 155
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 159

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  2 in 
/usr/www/lib/mycheck/index.php on line 155
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 159

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  2 in 
/usr/www/lib/mycheck/index.php on line 155
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 159

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  2 in 
/usr/www/lib/mycheck/index.php on line 155
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 159

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  2 in 
/usr/www/lib/mycheck/index.php on line 155
PHP Notice:  Undefined offset:  2 in /usr/www/lib/mycheck/index.php on line 159

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  1 in 
/usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:   
2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: 1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 176
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 183
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 190

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  1 in 
/usr/www/lib/mycheck/index.php on line 183
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 186

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  1 in 
/usr/www/lib/mycheck/index.php on line 183
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 186

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  1 in 
/usr/www/lib/mycheck/index.php on line 183
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 186

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  1 in 
/usr/www/lib/mycheck/index.php on line 183
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 186

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  1 in 
/usr/www/lib/mycheck/index.php on line 183
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 186

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  1 in 
/usr/www/lib/mycheck/index.php on line 183
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 186

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  1 in 
/usr/www/lib/mycheck/index.php on line 183
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 186

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  1 in 
/usr/www/lib/mycheck/index.php on line 183
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 186

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  1 in 
/usr/www/lib/mycheck/index.php on line 183
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 186

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  1 in 
/usr/www/lib/mycheck/index.php on line 183
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 186

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  1 in 
/usr/www/lib/mycheck/index.php on line 183
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 186

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  1 in 
/usr/www/lib/mycheck/index.php on line 183
PHP Notice:  Undefined offset:  1 in /usr/www/lib/mycheck/index.php on line 186

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 204
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 204

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 205
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 205

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 206
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 206

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 204
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 204

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 205
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 205

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 206
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 206

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 204
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 204

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 205
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 205

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 206
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 206

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 204
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 204

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 205
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 205

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 206
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 206

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 204
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 204

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 205
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 205

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 206
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 206

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 204
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 204

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 205
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 205

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 206
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 206

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 204
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 204

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 205
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 205

2008-05-27 12:10:11: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 206
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 206

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 204
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 204

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 205
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 205

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 206
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 206

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 204
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 204

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 205
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 205

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 206
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 206

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 204
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 204

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 205
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 205

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 206
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 206

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 204
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 204

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 205
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 205

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 206
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 206

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 204
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 204

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 205
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 205

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 206
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 206

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 204
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 204

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 205
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 205

2008-05-27 12:10:12: (mod_fastcgi.c.2175) FastCGI-stderr: PHP Notice:  Undefined offset:  7 in 
/usr/www/lib/mycheck/index.php on line 206
PHP Notice:  Undefined offset:  7 in /usr/www/lib/mycheck/index.php on line 206
last edited on 1211880763|%e %b %Y, %H:%M %Z|agohover by humecazswo + show more
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
ishbellnasishbellnas 1214181243|%e %b %Y, %H:%M %Z|agohover

This is a php issue. the warning message does not hurt, but can be preesed as
in the file /opt/etc/php.ini
change
error_reporting = E_ALL

to

error_reporting = E_ALL & ~E_NOTICE

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
starkstark 1211824755|%e %b %Y, %H:%M %Z|agohover

I`v got it running. The scale dosen work well. will try to fixing it. :)


2 X MBWE 500gb
LED Display

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by starkstark, 1211824755|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
starkstark 1211827753|%e %b %Y, %H:%M %Z|agohover

If you fix the hight to 200 then the auto scale becomes unnesessary,


2 X MBWE 500gb
LED Display

last edited on 1218566305|%e %b %Y, %H:%M %Z|agohover by stark + show more
unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by starkstark, 1211827753|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
albertroalbertro 1211842878|%e %b %Y, %H:%M %Z|agohover

Hi, I have a problem, my mycheck.sh is:
#/bin/sh
#
#MYCHECK.SH PATH = /usr/sbin/
#MYCHECK.LOG = /usr/www/lib/mycheck
#
timenow=‘date +%x\ %X`
memfree=`cat /proc/meminfo | grep MemFree:`
temp=`/usr/sbin/smartctl -d ata -A /dev/sda | grep Temperature | cut -d ’ ' -f37‘
upusers=`uptime`
totalon=`/usr/sbin/smartctl -d ata -A /dev/sda | grep Power_On | cut -d ’ ' -f44‘
echo $timenow ’|' $memfree '|' $temp '|' $upusers '|' $totalon

But generate mycheck.log\r , no mycheck.log, Why?

[root@MyBookWorld mycheck]# dir
bugs.txt changlog.txt css images index.php js mycheck.log\r

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
humecazswohumecazswo 1211875088|%e %b %Y, %H:%M %Z|agohover

The last line should be

echo $timenow '|' $memfree '|' $temp '|' $upusers '|' $totalon >>/var/log/mycheck.log

If you run "./mycheck.sh" what happens?
If you get "cannot execute binary file" try changing the first line from

#/bin/sh
to
#!/bin/bash

last edited on 1211875629|%e %b %Y, %H:%M %Z|agohover by humecazswo + show more
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
albertroalbertro 1211878123|%e %b %Y, %H:%M %Z|agohover

Impossible, if I change mychek.sh:

#!/bin/bash
#
#MYCHECK.SH PATH = /usr/sbin/
#MYCHECK.LOG = /usr/www/lib/mycheck
#
timenow=‘date +%x\ %X`
memfree=`cat /proc/meminfo | grep MemFree:`
temp=`/usr/sbin/smartctl -d ata -A /dev/sda | grep Temperature | cut -d ’ ' -f37‘
upusers=`uptime`
totalon=`/usr/sbin/smartctl -d ata -A /dev/sda | grep Power_On | cut -d ’ ' -f44‘
echo $timenow ’|' $memfree '|' $temp '|' $upusers '|' $totalon »/usr/www/lib/mycheck/mycheck.log

If i execute ./mycheck.sh:

[root@MyBookWorld init.d]# ./mycheck.sh
bash: ./mycheck.sh: /bin/bash^M: bad interpreter: No such file or directory

I change the address of mycheck.log (/var/log to /usr/www/lib/mycheck)
and change the address of mycheck.log in index.php

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
humecazswohumecazswo 1211880527|%e %b %Y, %H:%M %Z|agohover

I got the same ^M -error.. that's because this file is probably not originally written in linux.. When I opened mycheck.sh with nano it told me converted from DOS mode or something..

Try this:

1. mv mycheck.sh mycheck_old.sh

2. nano mycheck.sh (this opens a new, empty copy of the file)

3. copy+paste the contents from your previous post to the new mycheck.sh

4. chmod +x mycheck.sh

5. ./mycheck.sh

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
albertroalbertro 1211884752|%e %b %Y, %H:%M %Z|agohover

thanks, this is the problem

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
albertroalbertro 1211892008|%e %b %Y, %H:%M %Z|agohover

Have a new problem, mycheck.sh isn´t automatically updated. In /etc/crontabs/root there are:

  1. standard crontab format for busybox cron daemon.
  2. fields may be lists
  3. min hour day month wd command
  4. * * * * * dosomething
  1. save the date every day at midnight

0 0 * * * date +%m%d%H%M%Y.%S > /var/lib/now
#run MyCheck every 15 min
0,15,30,45****/etc/init.d/mycheck.sh

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
humecazswohumecazswo 1211894465|%e %b %Y, %H:%M %Z|agohover

put spaces between the * 's

that should do it..

then
"/etc/init.d/crond.sh stop"
"/etc/init.d/crond.sh start"

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
wiztwizt 1211896832|%e %b %Y, %H:%M %Z|agohover

Great that so many ppl got interested..I will try to fix all the bugs that you have taken up above. As written in the bugs.txt I will make the graphs auto scalable..also if you want to contribute your changes that would be great..but like in starks edit, please update the .css file instead of the .php site, but maby you've done that already…soon my school ends and then I've got more time to look at it..I will try to make a edit this week and post beta3

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by wiztwizt, 1211896832|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
starkstark 1211992421|%e %b %Y, %H:%M %Z|agohover

hey, i've changed it moar http://artofdestruction.org/mybookworld/mychecktest.rar

What about databases? like the my book sends the log or somthing to an external database?


2 X MBWE 500gb
LED Display

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by starkstark, 1211992421|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
starkstark 1212002071|%e %b %Y, %H:%M %Z|agohover

I adde more to it :) hope sombody got an opinion about it, god or bad :)


2 X MBWE 500gb
LED Display

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by starkstark, 1212002071|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
wiztwizt 1212047351|%e %b %Y, %H:%M %Z|agohover

Well a database is pretty much useless, it takes up memory on the MBWE and then I don't really see so many advantages, there is one thing that I have thought of, and that is to split up the logs, so that there will never be more then 1weeks worth of logs in one file or something like that. Then there would not be a speed issue either, when you reach the point of having a whole year worth of logs in one file (that is a big file). Or is the MBWE already running any database software ? If that is the case, then we could do it. The point of this software is that the user does NOT have to install so many things, the PHP itself is already a lot to install for a novice user, and if I would have used GD then there would have been even more things to do, so no, there is not any plans for that :S sorry. But thanks fro the update, I will check it out!

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by wiztwizt, 1212047351|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
starkstark 1212094791|%e %b %Y, %H:%M %Z|agohover

what i ment was that the script on mybook, send info to an external database, Mybook —> internets —> webpage. then the webpage get the info and create an graf. so you dont expose the device to the net. maybe it's an dumb idea. The info your script gathers is prity useful, for me. And i like it! what aboute running a netstat -n (like in martin hinners web IF) and create somthing like this? netstat-n.PNG


2 X MBWE 500gb
LED Display

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by starkstark, 1212094791|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
wiztwizt 1212335597|%e %b %Y, %H:%M %Z|agohover

Yup, the netstat sounds nice…I have tested some stuff and I think that I've got it working now…I will upload a new version as soon as I've done sone more testing…As it look now this page might me able to show quite a bit of information…hopefully I've got a new version in a couple of hours! About the database thing…still I don't think it's a good idea, the soul perpose of the site is that it should be easy to set up, you got the .php page and the script and that's it..no need for installing other software then PHP and no other configurations :) maby in the future, but a DB is not planned now…

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by wiztwizt, 1212335597|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
starkstark 1212341783|%e %b %Y, %H:%M %Z|agohover

i have tryed a little bit my self, but i sux in php.. the database was just an idea :) looking fordware to see your script :)


2 X MBWE 500gb
LED Display

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by starkstark, 1212341783|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
wiztwizt 1212342984|%e %b %Y, %H:%M %Z|agohover

New version is UP 0.1b3 (there is also a update for the 0.1b2 to the new one)

Changelog update:
0.1b3 (Public):
+Added Process list/Kerner messages/Disk usage/Net.conf/Net.stat/Part.Info
+Added the feature to show/hide the table with information
+Tweaked some of the code

The "bug" that made the .sh script not usabe before you have removed the first "strange" characters has also been fixed!

This version has been tested but not a 100% so be aware of that there probably are issues that has NOT been fixed yet! This is a
beta version!

last edited on 1212343767|%e %b %Y, %H:%M %Z|agohover by wizt + show more
unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by wiztwizt, 1212342984|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
starkstark 1212343484|%e %b %Y, %H:%M %Z|agohover

http://www.wizt.infa.fi/mycheck/mycheck-0.1b2-TO-0.1b3.tar


2 X MBWE 500gb
LED Display

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by starkstark, 1212343484|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
starkstark 1212352492|%e %b %Y, %H:%M %Z|agohover

hope you dont minde. i didnt get the show/hide thingi right..

http://artofdestruction.org/mybookworld/indexx.zip


2 X MBWE 500gb
LED Display

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by starkstark, 1212352492|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
humecazswohumecazswo 1212400261|%e %b %Y, %H:%M %Z|agohover

This version worked for me, thanks!!

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
wiztwizt 1212400321|%e %b %Y, %H:%M %Z|agohover

Hehe, ok. So you have centered the page :) I can make the page a little nicer in the next version.
And please use CSS instead of editing html… Now it's up to you to say what new features you want.
I will fix some of the bugs, like autoscaling and so on, but there must be some features you want.
The one thing I can say right now is that I will NOT make a "enter command" feature. So that you can enter a command
and then it shows the output. Why? MASSIVE security leak! I can show you how to make one (it's pritty simple) but I will not
implement it on the page, if you don't have your page really tightly secured, login via https and so on, I do not recommend doing it.
But please tell me if there is any features that you want, and I'll try my best to make it happen! Next version will probably be
release this week Sunday!

last edited on 1212400348|%e %b %Y, %H:%M %Z|agohover by wizt + show more
unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by wiztwizt, 1212400321|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
starkstark 1212504120|%e %b %Y, %H:%M %Z|agohover

im not god to explain. But yes i centred the heading, temp mem load graf and the hide/show link. ofc i cold add it to the CSS but i didnt think you would like it, so i just did it quick and drity. For now the only thing i come up whit is LED thing (Link in hacks & howto) and a litle bit more fancy style. but when it all was centred, i think it's ok. :) I got some funny thing going on, but i havent got it to work. but when i do ill add it to your script. :)


2 X MBWE 500gb
LED Display

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by starkstark, 1212504120|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
humecazswohumecazswo 1212577419|%e %b %Y, %H:%M %Z|agohover

Some kind of auto scaling would be nice for temp/mem/cpuload bars.. And also a limit for the logfile. I'll probably make a cron task to delete the logfile weekly, or something.. If you have a better suggestion, i'd like to hear it.. Would it be easy to make also an auto-refresh -setting in index.php every 15min?

-humecazswo

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
wiztwizt 1212583631|%e %b %Y, %H:%M %Z|agohover

Thanks! All of your requests will be done and implemented. The next release will be on sunday this week!

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by wiztwizt, 1212583631|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
starkstark 1212616012|%e %b %Y, %H:%M %Z|agohover

How mutch work is the auto scale? Is`nt the log file deleted after some time? And when you add auto refresh, Do you have du write it in seconds?

After i did a reboot, the httpd wont start on port 80 :(


2 X MBWE 500gb
LED Display

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by starkstark, 1212616012|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
kevkukevku 1212354293|%e %b %Y, %H:%M %Z|agohover

you know you can upload files up to 10 MB to this site


30-day pro trial.
2x WD Caviar SE WD5000AAJS RAID0 MBWEII
don't click

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by kevkukevku, 1212354293|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
starkstark 1212355912|%e %b %Y, %H:%M %Z|agohover

oh. i didnt. how? sorry for all links. i thoght it wasnt possible. :)


2 X MBWE 500gb
LED Display

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by starkstark, 1212355912|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
kevkukevku 1212356627|%e %b %Y, %H:%M %Z|agohover

files button at the end of the page, but you should link it anyway for ppl to find it.


30-day pro trial.
2x WD Caviar SE WD5000AAJS RAID0 MBWEII
don't click

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by kevkukevku, 1212356627|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
wiztwizt 1212946194|%e %b %Y, %H:%M %Z|agohover

Hi!
I've done some work, there is now auto-scaling for the memory and temperature graphs, there is also a auto-refresh. The crontab has also been updated so that the log will delete itself after one . If the linux distro had logrotate it would have been great, but I don't want ppl, to have to install any more programs to get this working! I will try to get a good auto-scaling for the load graph too and then I'll upload that version, it might be that it will be released tomorrow as I don't have so much time today..sorry..

To Stark:
hmm…that problem with your httpd not starting has nothing to do with my program..they don't modify anything really…they just log and run a .php site.. so the problem must be elsewhere. for your other questings..autoscaling for the mem and temp are pretty easy.. i checked the highest value of the mem/temp and then I did like this height = (85/Highest_read)*Current_read (where Current_read are the goes from "column" 1-13 for all the readings)… auto refresh should work with

<META HTTP-EQUIV="REFRESH" CONTENT="905">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

First line autor efreshes the page every 905 seconds (that is 9min and 5sec)
the seconds line is made so that the browser does not cache the page (so that it does not show the same page again when the auto refresh is done)

But you can check all this when I release the new version!

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by wiztwizt, 1212946194|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
starkstark 1213124040|%e %b %Y, %H:%M %Z|agohover

I know it aint the problem. but i got it to work. the autoscale was just logical. :)

I will try the newes version now.

Edit: wasnt any..


2 X MBWE 500gb
LED Display

last edited on 1213124301|%e %b %Y, %H:%M %Z|agohover by stark + show more
unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by starkstark, 1213124040|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
fraterfrater 1213129627|%e %b %Y, %H:%M %Z|agohover

To the author:

1st line in mycheck.sh is: !/bin/sh
This should be: #!/bin/sh

It's a directive which tells it which program to use to interpret the script.

  1. ./mycheck.sh

./mycheck.sh: line 1: !/bin/sh: No such file or directory

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
TeinturManTeinturMan 1213309116|%e %b %Y, %H:%M %Z|agohover

Hi , i succeeded in installing Mycheck : This is a Must -have tool ! …

Only a few notes :
i am using the "Web server" tutorial for Web and php install
I have chosen to put all files in /shares/internal/PUBLIC/WWW/Welcome/Monitor
==> I access my infos with the following url : https://<Mybook>/Monitor/index.php

Regarding the Mycheck procedure :
I used the following command to extract the tar file (newwbies may not know how to do this…)

tar -xf mycheck-0.1b3.tar

In the crontab, i had to remove the "»" characters :
i have replaced

0,15,30,45 * * * * >>/<DESTINATION_TO_THE_SCRIPT>/mycheck.sh

by

0,15,30,45 * * * * /shares/internal/PUBLIC/WWW/Welcome/Monitor/mycheck.sh

And finally , i have added a "#" at the beginning of the mycheck.sh file.

==> My book had a temperature of 50-51 degrees.

I have put 4 little bits under it , in order that my Mybook is now 1cm over the table and the air can go under it easily.
MybookCooled

==> Now it has a temperature of 45 degrees… :-)

Thanks again wizt,
If you could update your tutorial with these notes, it may ease Newbies to install your great tool.

last edited on 1213356765|%e %b %Y, %H:%M %Z|agohover by TeinturMan + show more
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
JpgOrganizerJpgOrganizer 1213521570|%e %b %Y, %H:%M %Z|agohover

Thanks wizt for sharing your tool.

Now this thread gets hard to read. I would recommend a wiki page for MyCheck where the last version is described and using this thread (alternatively the "per page discussion" of the wiki page) for discussions around MyCheck.
The first post of this thread could be the starting point of the wiki page. Then it is easier for everyone to add more informations.

What do you think?

JpgOrganizer


MBWE II (blue rings), 2x 500 GB in Raid 1 mode
Firmware 01.01.18
Hacks: SSH, spindown
Applications: optware, dokuwiki, nightly backup script

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
fraterfrater 1213526985|%e %b %Y, %H:%M %Z|agohover

You need to have PHP installed and patched the webservers config to use it.
I did it with ipkg
I'm assuming that's already working….

First setup cron like I described here:
http://mybookworld.wikidot.com/forum/t-67436/cron-setup

cd /opt
wget http://wizt.infa.fi/mycheck/mycheck-0.1b3.tar
tar -xvf mycheck-0.1b3.tar
ln -s /opt/mycheck/ /usr/www/lib/mycheck
ln -s /usr/www/lib/mycheck/mycheck.sh /etc/cron.min/mycheck

vi /etc/cron.min/mycheck.sh
change !/bin/sh into #!/bin/sh

Additionally you can update hdparm (needs optware when you install it this way)

ipkg install hdparm
ldconfig
mv /sbin/hdparm /sbin/hdparm.org
ln -s /opt/sbin/hdparm /sbin/hdparm

(Edit: I found out later that the optware hdparm doesn't return the serial like the old one did. It is therefore better to leave the original hdparm in /sbin. Anyway, after looking into it again….. it doesn't even use hdparm…(mmm….??) I think I was confused with smartmontools…)
It's been posted that the old smartctl might return invalid temperature values….
Install the latest smartctl and point the script to that one….. Better hardcode it as the path can change within a cronjob as I've seen on other platforms..)

ipkg update
ipkg install smartmontools
ldconfig
vi /opt/mycheck/mycheck.sh
replace /usr/sbin/smartctl with /opt/sbin/smartctl

Mycheck should be running now…. http://192.168.10.210/mycheck (replace the IP to the IP of your worldbook)

last edited on 1214843151|%e %b %Y, %H:%M %Z|agohover by frater + show more
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
TeinturManTeinturMan 1215127787|%e %b %Y, %H:%M %Z|agohover

Hi,
I have created a Wiki Page for Mycheck with a new tar file containing bug corrections and Auto Scale feature.

http://mybookworld.wikidot.com/mycheck-temp-mem-cpu-monitoring

Regards,

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
starkstark 1213796230|%e %b %Y, %H:%M %Z|agohover

Helo! I've made an php line that's mailing me an warning if the temp is higher than a value i've wan't it to be.
Colud post an how to or atleest post the script. if somone are intrested.


2 X MBWE 500gb
LED Display

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by starkstark, 1213796230|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
so_rightso_right 1225617544|%e %b %Y, %H:%M %Z|agohover

This is an excellent tool :-)

I'm running the smart_spindown script, and I've found that by placing the script (mycheck.sh) and the logs on a ramdrive, the cron jobs no longer spin up the disk every 15 minutes.

It would also be cool if Mycheck could show some spin up/down statistics as well.

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
goternemegoterneme 1225627231|%e %b %Y, %H:%M %Z|agohover

Im running my Mybook on 35-36 Degress 24/7, its quiet like a mouse ;)
I could figure out how to use the smart spindown correctly yet but the time will come ;)

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
aab44aab44 1227227161|%e %b %Y, %H:%M %Z|agohover

Hi,

I installed MyCheck v1.0 as instructed = http://mybookworld.wikidot.com/mycheck-temp-mem-cpu-monitoring

But I got "403 - Forbidden" when I try= https://nas/Mycheck/index.php

mycheck.sh is working fine and mycheck.log is created.

/var/log/mycheck.log :
11/20/08 14:15:03 | MemFree: 1676 kB | 59 | 14:15:04 up 1:23, 0 users, load average: 1.85, 2.56, 1.97 | 3026
11/20/08 14:30:02 | MemFree: 1084 kB | 58 | 14:30:03 up 1:38, 0 users, load average: 0.04, 0.22, 0.81 | 3026

Mybook Manager 1.2.1 ( https://nas:3210/ ) is working fine.

I've put 4 little bits under my Mybook to reduce temp but still high.

Your help is highly appreciated to solving my problem

Regrds,

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by aab44aab44, 1227227161|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
TeinturManTeinturMan 1227256897|%e %b %Y, %H:%M %Z|agohover

hi, have you enabled PHP ? on your 443 web site?
go to
Mybook_Manager / Manage Features / WebServer / PHP Support

Check IF php is enabled.

Re: MyCheck - Temp,mem and more monitoring tool, intrested?
wiztwizt 1232209773|%e %b %Y, %H:%M %Z|agohover

Thanks alot for all the stuff you have been doing while I was away! I been having soem personal issues and moved a couple of times and stuff like that… and becouse of the moving I have misplaced my power cable to my my book :( so I will try to find a new cable for it now, and make this software even better! Thanks again for making the tutorial, that was REALLY great, I hope this software has helped you monitor your drives and hopefully none of them have crashe becouse of it :D! I will try to find a powercord as fast as possible and make some updates to this software! Thanks!

unfold Re: MyCheck - Temp,mem and more monitoring tool, intrested? by wiztwizt, 1232209773|%e %b %Y, %H:%M %Z|agohover
Re: MyCheck - Temp,mem and more monitoring tool, intrested?
anpe008anpe008 1242593003|%e %b %Y, %H:%M %Z|agohover

Does that work with the white version of the MBWE?

I did what the tutorial said in the new white version but I receive the following error if I want to connect to the php:
"404 Not Found File not found."

Any help is appreciated.

last edited on 1242600306|%e %b %Y, %H:%M %Z|agohover by anpe008 + show more
New post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License