Bitcoin Forum
November 20, 2017, 04:37:21 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 ... 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 [118] 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 »
  Print  
Author Topic: Linux mining distro for the Raspberry PI - MinePeon  (Read 681256 times)
KyrosKrane
Sr. Member
****
Offline Offline

Activity: 275


View Profile WWW
February 06, 2014, 09:58:33 PM
 #2341

Thanks!  You seem to know your way around JavaScript (I am a bit dense at it).

The latest code in git and the 0.2.5 PR2 download just passes the raw timestamp to the graphs like this;-

Code:
            jQuery.each(tsv, function (i, line) {
                line = line.split(/\t/);
                // date = Date.parse(line[0] + ' UTC');
date = Date.parse(line[0]);
// var t = line[0].split(/[- :]/);
// var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
                GHAvg.push([
                //date,
line[0],
                parseFloat(line[1].replace(',', ''), 10) * 1000, ]);

Is seems to work on all browsers, any chance you can have a look and give your opinion what method is better?

Neil

P.S. Javascript is moronic when it comes to dates, there is no standard between browsers and it sucks Tongue .

Wasn't me that found it. Smiley But yeah, I do have a little (very little) experience with JS from a past job.

What jumps out at me about the code you posted is that you set the date variable, then don't use it -- you pass the line[0] element instead.  Is that intentional?

Tips and donations: 1KyrosREGDkNLp1rMd9wfVwfkXYHTd6j5U  |  BTC P2Pool node: p2pool.kyros.info:9332
1511152641
Hero Member
*
Offline Offline

Posts: 1511152641

View Profile Personal Message (Offline)

Ignore
1511152641
Reply with quote  #2

1511152641
Report to moderator
1511152641
Hero Member
*
Offline Offline

Posts: 1511152641

View Profile Personal Message (Offline)

Ignore
1511152641
Reply with quote  #2

1511152641
Report to moderator
1511152641
Hero Member
*
Offline Offline

Posts: 1511152641

View Profile Personal Message (Offline)

Ignore
1511152641
Reply with quote  #2

1511152641
Report to moderator
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
MineForeman.com
Legendary
*
Offline Offline

Activity: 896



View Profile WWW
February 07, 2014, 02:14:02 AM
 #2342

After last git pull, from some minutes ago, the graphics are now "not zoomed" and with date "Sat 17 Jan 1970" in my 3 RPI's with MinePeon Pi 0.2.5 pr2.

Hmm, can I get a screen shot of that ct1aic?  It is not something I have seen before and I will see if I can replicate it.

Neil

Bitcoin News http://mineforeman.com/ || MinePeon - Bitcoin mining on the Raspberry PI http://mineforeman.com/minepeon/ || MinePeon Wiki http://minepeon.com/ || MinePeon Forums http://minepeon.com/forums/
MineForeman.com
Legendary
*
Offline Offline

Activity: 896



View Profile WWW
February 07, 2014, 02:15:53 AM
 #2343

What jumps out at me about the code you posted is that you set the date variable, then don't use it -- you pass the line[0] element instead.  Is that intentional?


Very intentional, instead of me working out how to format the date correctly for all of the various browsers it uses Highcharts internal date library.

They seem to have it all worked out for us.

Neil

Bitcoin News http://mineforeman.com/ || MinePeon - Bitcoin mining on the Raspberry PI http://mineforeman.com/minepeon/ || MinePeon Wiki http://minepeon.com/ || MinePeon Forums http://minepeon.com/forums/
raystream
Newbie
*
Offline Offline

Activity: 8


View Profile
February 07, 2014, 06:51:25 AM
 #2344

Code:
105                 var t = line[0].split(/[- :]/);
106                 var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
107                 d = Date.parse(d);

beside inserting line 107 in /opt/minepeon/http/js/charts.js
i changed the following in this file to get the units of the charts correct:

Code:
41         yAxis: [{
 42                         min: 0,
 43             title: {
 44                 text: 'HashRate GH/s'
 45             },
 46         }, {
....
 60         series: [{
 61             name: 'GH/s Average',
 62                         color: '#FF0000',
 63                         type: 'spline',
 64                         lineWidth: 2,
 65                         zIndex: 10,
 66             yAxis: 0
 67         }, {
 68             name: 'GH/s Acutal',
 69                         color: '#E8ADAA',
 70                         type: 'spline',
 71                         lineWidth: 1,
 72                         zIndex: 0,
 73             yAxis: 0
 74         }, {
...
107                 d = Date.parse(d);
108                 GHAvg.push([ d, parseFloat(line[1].replace(',', ''), 10) / 1000, ]);
109                 GHActual.push([ d, parseFloat(line[2].replace(',', ''), 10) / 1000, ]);
110                 DeviceTemp.push([ d, parseFloat(line[3].replace(',', ''), 10), ]);

beside i am a really javascript noob but i think this will do it.

minepeon 2.4.6: 23 Block Erupters, 3 Antminer
raystream
Newbie
*
Offline Offline

Activity: 8


View Profile
February 07, 2014, 07:18:54 AM
 #2345

an i had to change the following to get the time into the right timezone.
it is not a good change more a quick and dirty hack.

/opt/minepeon/http/js/chart.js

Code:
106                 var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
107                 d = Date.parse(d)+3600000;
108                 GHAvg.push([ d, parseFloat(line[1].replace(',', ''), 10) / 1000, ]);
...
18         var d = new Date();
119         chart.xAxis[0].setExtremes(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate() - 1, d.getHours()+1, d.getMinutes()), Date.UTC(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours()+1, d.getMinutes()));
120         // javascript is stupid (or I am) why cant the above line be between Now() - 1 day and Now() ?????
121         chart.showResetZoom();

just added 3600000 milliseconds to the d variable and 1 for the hours int the setExtrems for adding another hour

minepeon 2.4.6: 23 Block Erupters, 3 Antminer
raystream
Newbie
*
Offline Offline

Activity: 8


View Profile
February 07, 2014, 08:12:18 AM
 #2346

i just did a git pull
and now i cannot get the graph back to work.
it shows all data but with a wrong timestamp.
the axys is from 23:59:59.0-8 to 00:00:00.792
an when hovering over a line point i get a date 01 Jan 1970

the system time is set (server time on the site is correct)

minepeon 2.4.6: 23 Block Erupters, 3 Antminer
ct1aic
Hero Member
*****
Offline Offline

Activity: 714


Are ฿itcoins Radioactive?


View Profile WWW
February 07, 2014, 10:17:23 AM
 #2347

After last git pull, from some minutes ago, the graphics are now "not zoomed" and with date "Sat 17 Jan 1970" in my 3 RPI's with MinePeon Pi 0.2.5 pr2.

Hmm, can I get a screen shot of that ct1aic?  It is not something I have seen before and I will see if I can replicate it.

Neil
Image (it's now the same with my 4 RPI's):


Rui Costa, PortugalBTC : 1ct1aicGoUVpZeovsw3cCcPJZJHV5JXtW
raystream
Newbie
*
Offline Offline

Activity: 8


View Profile
February 07, 2014, 11:30:31 AM
 #2348

now i have got it working again:

/opt/minepeon/http/summary.php
Code:
14         echo $row['datetime'] . "\t";
 15 //      echo strtotime($row['datetime']) . "\t";

/opt/minepeon/http/js/chart.js
Code:
11                 tooltip: {
 12                         enabled: true,
 13                         formatter: function() {
 14                                 return '<b>'+ this.series.name +'</b><br/>'+
 15                                 Highcharts.dateFormat('%a %d %b %Y %H:%M:%S', this.x) +'<br/>'+
 16                                 Highcharts.numberFormat(this.y,3,',','.');
 17                         }
 18                 },
...
 55         yAxis: [{
 56                         min: 0,
 57             title: {
 58                 text: 'HashRate GH/s'
 59             },
...
112         DeviceTemp = [];
113         try {
114             // split the data return into lines and parse them
115             tsv = tsv.split(/\n/g);
116             jQuery.each(tsv, function (i, line) {
117                 line = line.split(/\t/);
118                 //date = Date.parse(line[0] + ' UTC');
119                 //date = Date.parse(line[0]);
120                 var t = line[0].split(/[- :]/);
121                 var d = Date.UTC(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
122                 //d = Date.UTC(d);
123                 GHAvg.push([
124                 d,
125                 //date,
126                 //line[0],
127                 parseFloat(line[1].replace(',', ''), 10) / 1000, ]);
128                 GHActual.push([
129                 d,
130                 //date,
131                 //line[0],
132                 parseFloat(line[2].replace(',', ''), 10) / 1000, ]);
133                 DeviceTemp.push([
134                 d,
135                 //date,
136                 //line[0],
137                 parseFloat(line[3].replace(',', ''), 10), ]);
138             });
139         } catch (e) {}

minepeon 2.4.6: 23 Block Erupters, 3 Antminer
tripppn
Hero Member
*****
Offline Offline

Activity: 756


View Profile WWW
February 09, 2014, 04:05:02 AM
 #2349

I'm back to not being able to get piminer to work again with pr2.  

Here's what I put in to install:

First update minepeon with:

cd /opt/minepeon/
git pull

then:

cd ~/
rm -rf minepeon-plugin-PiMiner
git clone https://github.com/MineForeman/minepeon-plugin-PiMiner.git
cd minepeon-plugin-PiMiner
./install.sh

Everything looks normal but after the screen puts out the IP it gets stuck on "connecting to miner..."

I've installed it every way I can think of including "sudo pacman -Syu python i2c-tools" before updating minepeon.

Any thoughts?

If i push the up button it says "format error"  then back to connecting for all the other screens except the btc price one which does show the mt gox price which is of course useless these days

“You can't be a real country unless you have a beer and an airline - it helps if you have some kind of football team, or some nuclear weapons, but in the very least you need a beer.”
― Frank Zappa
MineForeman.com
Legendary
*
Offline Offline

Activity: 896



View Profile WWW
February 09, 2014, 06:51:40 AM
 #2350

Any thoughts?

If i push the up button it says "format error"  then back to connecting for all the other screens except the btc price one which does show the mt gox price which is of course useless these days

Mine seems to be working.

I do need to do some work to it though, as you say, MtGOX prices are next to useless these days.

Neil

Bitcoin News http://mineforeman.com/ || MinePeon - Bitcoin mining on the Raspberry PI http://mineforeman.com/minepeon/ || MinePeon Wiki http://minepeon.com/ || MinePeon Forums http://minepeon.com/forums/
tripppn
Hero Member
*****
Offline Offline

Activity: 756


View Profile WWW
February 09, 2014, 07:09:49 AM
 #2351

Any thoughts?

If i push the up button it says "format error"  then back to connecting for all the other screens except the btc price one which does show the mt gox price which is of course useless these days

Mine seems to be working.

I do need to do some work to it though, as you say, MtGOX prices are next to useless these days.

Neil

When you install it from a fresh img what is the exact sequence of commands you use in ssh?

“You can't be a real country unless you have a beer and an airline - it helps if you have some kind of football team, or some nuclear weapons, but in the very least you need a beer.”
― Frank Zappa
MineForeman.com
Legendary
*
Offline Offline

Activity: 896



View Profile WWW
February 10, 2014, 12:19:55 AM
 #2352

When you install it from a fresh img what is the exact sequence of commands you use in ssh?

I think I might have spotted the problem.  Arch now comes with Python 3.3 by default and you may not have the required 2.7 install.

I have updated the install script to install the dependencies, can you try it now (you will need to re-download the plugin as per instructions).

Neil


Bitcoin News http://mineforeman.com/ || MinePeon - Bitcoin mining on the Raspberry PI http://mineforeman.com/minepeon/ || MinePeon Wiki http://minepeon.com/ || MinePeon Forums http://minepeon.com/forums/
tripppn
Hero Member
*****
Offline Offline

Activity: 756


View Profile WWW
February 10, 2014, 01:09:40 AM
 #2353

When you install it from a fresh img what is the exact sequence of commands you use in ssh?

I think I might have spotted the problem.  Arch now comes with Python 3.3 by default and you may not have the required 2.7 install.

I have updated the install script to install the dependencies, can you try it now (you will need to re-download the plugin as per instructions).

Neil



Same thing.  Here's the command sequence I put in from a fresh img.

cd /opt/minepeon/

git pull

rm -rf minepeon-plugin-PiMiner

git clone https://github.com/MineForeman/minepeon-plugin-PiMiner.git

cd minepeon-plugin-PiMiner

./install.sh


“You can't be a real country unless you have a beer and an airline - it helps if you have some kind of football team, or some nuclear weapons, but in the very least you need a beer.”
― Frank Zappa
MineForeman.com
Legendary
*
Offline Offline

Activity: 896



View Profile WWW
February 10, 2014, 01:51:41 AM
 #2354

When you install it from a fresh img what is the exact sequence of commands you use in ssh?

I think I might have spotted the problem.  Arch now comes with Python 3.3 by default and you may not have the required 2.7 install.

I have updated the install script to install the dependencies, can you try it now (you will need to re-download the plugin as per instructions).

Neil



Same thing.  Here's the command sequence I put in from a fresh img.

cd /opt/minepeon/

git pull

rm -rf minepeon-plugin-PiMiner

git clone https://github.com/MineForeman/minepeon-plugin-PiMiner.git

cd minepeon-plugin-PiMiner

./install.sh



Can you do it all again and;-

sudo systemctl piminer status

And post it back?  I am looking at my none running right now.

Neil

Bitcoin News http://mineforeman.com/ || MinePeon - Bitcoin mining on the Raspberry PI http://mineforeman.com/minepeon/ || MinePeon Wiki http://minepeon.com/ || MinePeon Forums http://minepeon.com/forums/
tripppn
Hero Member
*****
Offline Offline

Activity: 756


View Profile WWW
February 10, 2014, 02:21:00 AM
 #2355

[minepeon@minepeon minepeon-plugin-PiMiner]$ sudo systemctl piminer status
Unknown operation 'piminer'.

“You can't be a real country unless you have a beer and an airline - it helps if you have some kind of football team, or some nuclear weapons, but in the very least you need a beer.”
― Frank Zappa
MineForeman.com
Legendary
*
Offline Offline

Activity: 896



View Profile WWW
February 10, 2014, 02:25:04 AM
 #2356

Derp;-

sudo systemctl status piminer

My bad sorry.

Neil

Bitcoin News http://mineforeman.com/ || MinePeon - Bitcoin mining on the Raspberry PI http://mineforeman.com/minepeon/ || MinePeon Wiki http://minepeon.com/ || MinePeon Forums http://minepeon.com/forums/
tripppn
Hero Member
*****
Offline Offline

Activity: 756


View Profile WWW
February 10, 2014, 02:33:56 AM
 #2357

Much more useful:

[minepeon@minepeon ~]$ sudo systemctl status piminer
[sudo] password for minepeon:
piminer.service - PiMiner
   Loaded: loaded (/usr/lib/systemd/system/piminer.service; enabled)
   Active: active (running) since Sun 2014-02-09 19:32:30 MST; 32s ago
 Main PID: 307 (python2.7)
   CGroup: /system.slice/piminer.service
           `-307 /usr/bin/python2.7 /opt/minepeon/plugin/PiMiner/PiMiner.py

Feb 09 19:32:30 minepeon systemd[1]: Starting PiMiner...
Feb 09 19:32:30 minepeon systemd[1]: Started PiMiner.
[minepeon@minepeon ~]$

“You can't be a real country unless you have a beer and an airline - it helps if you have some kind of football team, or some nuclear weapons, but in the very least you need a beer.”
― Frank Zappa
MineForeman.com
Legendary
*
Offline Offline

Activity: 896



View Profile WWW
February 10, 2014, 02:39:47 AM
 #2358

Hmm.... it says it is up and running,

Have you played with the contrast nob (the yellow thing on the PCB that takes a phillips screwdriver)?

Neil

Bitcoin News http://mineforeman.com/ || MinePeon - Bitcoin mining on the Raspberry PI http://mineforeman.com/minepeon/ || MinePeon Wiki http://minepeon.com/ || MinePeon Forums http://minepeon.com/forums/
tripppn
Hero Member
*****
Offline Offline

Activity: 756


View Profile WWW
February 10, 2014, 02:51:11 AM
 #2359

Hmm.... it says it is up and running,

Have you played with the contrast nob (the yellow thing on the PCB that takes a phillips screwdriver)?

Neil

Ya.  That's not it.  The screen does come on and spits out its IP and then just sits there saying connecting to miner...

It seems like it's not getting it's info from bfgminer

“You can't be a real country unless you have a beer and an airline - it helps if you have some kind of football team, or some nuclear weapons, but in the very least you need a beer.”
― Frank Zappa
tripppn
Hero Member
*****
Offline Offline

Activity: 756


View Profile WWW
February 10, 2014, 04:20:57 AM
 #2360

2 different RPis and 2 different screens... same thing. 

Would it matter if I did

sudo -i

before starting the whole install process???

“You can't be a real country unless you have a beer and an airline - it helps if you have some kind of football team, or some nuclear weapons, but in the very least you need a beer.”
― Frank Zappa
Pages: « 1 ... 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 [118] 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!