Monitoring my B3

How are you using your Bubba Two or Excito B3? Got pictures? Share here!
Post Reply
redw0001
Posts: 96
Joined: 07 Sep 2009, 14:03

Monitoring my B3

Post by redw0001 » 27 Jan 2015, 06:21

I was poking around on the web like you do the other day and thinking about how I track what's going on with my B3s. It had occurred to me for a while that without ssh into the B3 I don't get a lot of information out on what's used, what's happening etc.

I found this... http://ezservermonitor.com/

Seems B3 returns 0 in cores enquiry however, the author made a mod and now it works. Dead easy to install, very lightweight and to my eyes quite appealing design. I'm using the web version.

I've added Squeezeserver and my wireless printer(not strictly B3 related, now working great with my B3.

Gerti
Posts: 11
Joined: 15 Feb 2014, 06:20

Re: Monitoring my B3

Post by Gerti » 27 Jan 2015, 17:12

Hi!

It does not show me any information about CPU and Load.
Does your modified version shows these information?
If yes, can you provide modified version?

Best
Gerti

redw0001
Posts: 96
Joined: 07 Sep 2009, 14:03

Re: Monitoring my B3

Post by redw0001 » 27 Jan 2015, 18:01

when I installed it last week I had no CPU load numbers, no network numbers an no information in the section that shows the # of cores.

There is a version on GitHub that sorts out the network numbers. I'll send you the other files that the author modified to get CPU load numbers. I'll also post my service entry changes.

i'll also ask the author when he'll release the updates.

redw0001
Posts: 96
Joined: 07 Sep 2009, 14:03

Re: Monitoring my B3

Post by redw0001 » 28 Jan 2015, 18:13

Hopefully the author will add the following items except the esm.config.json addition to the GitHub version if not already done. As best I can tell these are all the changes made for it to work.

To monitor Squeeze server on B3....
Add following to esm.config.json
{
"name": "Squeeze Server",
"host": "localhost",
"port": 9000
},

My cpu.php (note this is not all of it. Starts after line starting... if ($cpuinfo
{
$processors = preg_split('/\s?\n\s?\n/', trim($cpuinfo));

foreach ($processors as $processor)
{
$details = preg_split('/\n/', $processor, -1, PREG_SPLIT_NO_EMPTY);

foreach ($details as $detail)
{
list($key, $value) = preg_split('/\s*:\s*/', trim($detail));

switch (strtolower($key))
{
case 'model name':
case 'cpu model':
case 'cpu':
case 'processor':
$model = $value;
break;

case 'cpu mhz':
case 'clock':
$frequency = $value.' MHz';
break;

case 'cache size':
case 'l2 cache':
$cache = $value;
break;

case 'bogomips':
$bogomips = $value;
break;
}
}
}
}

my load_average.php
<?php
require 'Utils/Misc.class.php';

if (!($load_tmp = shell_exec('cat /proc/loadavg | awk \'{print $1","$2","$3}\'')))
{
$load = array(0, 0, 0);
}
else
{
// Number of cores
$cores = Misc::getCpuCoresNumber();

$load_exp = explode(',', $load_tmp);

$load = array_map(
function ($value, $cores) {
$v = (int)($value * 100 / $cores);
if ($v > 100)
$v = 100;
return $v;
},
$load_exp,
array_fill(0, 3, $cores)
);
}


$datas = $load;

echo json_encode($datas);

Part of my Misc.class.php (The part that handles number of cores)
* Returns CPU cores number
*/
public static function getCpuCoresNumber()
{
if (!($num_cores = shell_exec('/bin/grep -c ^processor /proc/cpuinfo')))
{
if (!($num_cores = trim(shell_exec('/usr/bin/nproc'))))
{
$num_cores = 1;
}
}
if ((int)$num_cores <= 0)
$num_cores = 1;

return (int)$num_cores;
}

Puma
Posts: 219
Joined: 29 Sep 2008, 06:30

Re: Monitoring my B3

Post by Puma » 29 Jan 2015, 08:07

Why not use linux dash master?
Simple to install just copy in the web folder.
Is fast and accurate.

http://gamblisfx.com/how-to-install-lin ... ebian-7-5/

Puma
Linux is like a wigwam - no windows, no gates, apache inside!

redw0001
Posts: 96
Joined: 07 Sep 2009, 14:03

Re: Monitoring my B3

Post by redw0001 » 29 Jan 2015, 09:10

Short answer, was on RPi Google+ list when someone mentioned EZServermonitor.Just downloaded it and copied to my web directory. I'd not heard of linux-dash until you mentioned it.

Downloaded Linux-dash and installed. It reports 0% CPU util when my B3 was busy. I'm guessing it's a similar problem to EZServerMonitor, but is only a guess. Because Linux-dash uses a rolling graph for CPU and memory use it appears to use more CPU than EZServermonitor that is single shot (by default).

I guess it is personal preference. Currently happy with EZServermonitor, enough for what I want currently.

Puma
Posts: 219
Joined: 29 Sep 2008, 06:30

Re: Monitoring my B3

Post by Puma » 29 Jan 2015, 10:10

True but I like to see the processes that are running and what memory and cpu is consumed.

Puma
Linux is like a wigwam - no windows, no gates, apache inside!

Gerti
Posts: 11
Joined: 15 Feb 2014, 06:20

Re: Monitoring my B3

Post by Gerti » 29 Jan 2015, 13:59

Hi!

Nice tool either.
Is there any tool to monitor the SMART Parameters of the installed harddisk?
I already installed the smartmon tools, but would like to see it via my browser instead of a shell.

Best
Michael

Ubi
Posts: 1547
Joined: 17 Jul 2007, 09:01

Re: Monitoring my B3

Post by Ubi » 30 Jan 2015, 01:14

both these last two questions are answered by using munin instead. Doesnt look nearly as nice as ezservermonitor but has a much wider range of monitoring tools.

Gerti
Posts: 11
Joined: 15 Feb 2014, 06:20

Re: Monitoring my B3

Post by Gerti » 31 Jan 2015, 15:33

Hi!

Installed munin by apt-get install munin munin-node, but how can I access the tools now?
I'm not that familiar with Linux, but didn't find anything within the web-Folder of the B3

Best
Michael

redw0001
Posts: 96
Joined: 07 Sep 2009, 14:03

Re: Monitoring my B3

Post by redw0001 » 08 Feb 2015, 04:08

For anyone else looking at monitoring I found this blog entry. Very readable, i was initially surprised at the number but realised I should not be. Some look really interesting, however decided to stick with a limited number and try to focus on web based to meet my (limited) needs.

https://blog.serverdensity.com/80-linux ... ools-know/

Post Reply