Username: Password:

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cryptico

Pages: [1]
1
Beginners & Help / Re: Cryptowally's gunbot linux console, Part I
« on: June 01, 2017, 02:57:57 PM »
Hi, nice job Cryptowally! looks fantastic...

I want to have that monitor working on my VPS, but i have this problem:
Quote
The following problem occured:
-----------------------------
line 35 of file 'multitail.conf' is too long!
Terminated

2
This is very nice - my hat's off to you.  I decided to give this a try, even though I have my own servers, equipment and typically do everything by hand, and I'm a big fan of GNU screen, so didn't know what could be better than it.  Besides, why would I pay for something in the cloud for something I have "for free" at home?

However, I'm always looking to learn new things, and I've seen people talking about "pm2" and wondered what it was all about.  Plus, even though what I have at home is "free", $10/mo isn't too bad given what I make with gunbot, and there is the convenience factor of better 24x7 uptime.  Then again, on one server at home, I'm able to run 50 pairs and the box is still only at 5% CPU (against three exchanges)... so we'll have to see and compare later about the costs... but that's a different story.

So I went through the installation instructions and they were perfect.  I'm extremely impressed by your startup script.  Easy to use, easy to understand, and fast response.  Good job.

I now understand better what pm2 does - it obviates the need for screen.  While I see the benefits that has... I also see that I lose some control that screen gives me. For one, I no longer see the console output I had, and I see to lose the direct interaction with the STDIN/STDOUT (but I may just be missing that - or maybe that's what "glog" does....)

Once I realized how incredibly valuable your startup scripts were, I had to add in my multitail pieces.... since pm2 takes care of the "tee" and "screen" parts! (written up in this post: https://gunthy.org/index.php?topic=261.msg1164#msg1164)

So, if you install multitail:
Code: [Select]
root@gunny:/opt/gunbot# sudo apt install multitail
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  multitail
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 121 kB of archives.
After this operation, 322 kB of additional disk space will be used.
Get:1 http://mirrors.digitalocean.com/ubuntu xenial/universe amd64 multitail amd64 6.4.2-1build1 [121 kB]
Fetched 121 kB in 0s (1,258 kB/s)
Selecting previously unselected package multitail.
(Reading database ... 62956 files and directories currently installed.)
Preparing to unpack .../multitail_6.4.2-1build1_amd64.deb ...
Unpacking multitail (6.4.2-1build1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up multitail (6.4.2-1build1) ...

Create a file called "multitail.conf" in the /opt/gunbot directory:
Code: [Select]
#include:/etc/multitail.conf
#check_mail:0
colorscheme:gunbot
cs_re:red,magenta:< prBuy
cs_re:red,white:<= prBuy
cs_re:red,white:>= prSell
cs_re:red,yellow:> prSell
cs_re:red,yellow:Sell order placed
cs_re:red,yellow:.*ORDER INFORMATION.*
cs_re:red,yellow:.*profit.*
cs_re:white:.*MinPriceToSell.*
cs_re:white:.*MaxPriceToBuy.*
cs_re:white:.*MaxPriceToSell.*
cs_re:white:.*MinPriceToBuy.*
cs_re:yellow:^Direction:\s+\d+
cs_re:white,blue:Activating hot reconfig...
cs_re:white,red:INVALID LICENSE
cs_re:white,red:Rate limit exceeded
cs_re:white,red:Not enough BTC
cs_re:red:iInvalid nonce\!*
cs_re:red:ESOCKETTIMEDOUT\!*
cs_re:red:returned error\!*
cs_re:red:Error\!*
cs_re:red:.*failed.*
cs_re:red:.*no altcoins.*
cs_re:red:statusCode (.*)
cs_re:magenta:.*buy.*
cs_re:cyan:Open orders
cs_re:cyan:.*sell.*
cs_re:red:falls\syes
cs_re:green:grows\syes
cs_re:green:falls\sno
cs_re:yellow:Has order:.*
cs_re:yellow:.*have altcoins.*
cs_re:white:\:\:.*

Create a file called "stat.sh" in same directory:
Code: [Select]
#!/bin/sh
multitail -Z red,black,inverse --config multitail.conf -CS gunbot -x "%m %u@%h %f (%t) [%l]" -b 4 -s 2 -m 0 -n 100 \
   --mark-interval 200 \
        -Ev "before to buy" \
        -Ev "Cannot sell" \
        -Ev "price to buy" \
        -Ev "MaxPriceToBuy" \
        -Ev "Last price <=" \
        -Ev "Last price >=" \
        -Ev "Last price >" \
        -Ev "Last price >" \
        -Ev "price  grows \(" \
        -Ev "price  falls \(" \
        -Ev "^need " \
        -Ev "^Callback:" \
        -Ev "no altcoins" \
        -Ev "Altcoin Balance" \
        -Ev "\+\+\+"\
        -Ev "\[\]"\
        -Ev "-------" \
        -Ev "is too high" \
        -Ev "price is too low" \
        -Ev "price too high" \
        -Ev "waiting to sell" \
        -Ev "Creating market client" \
        -Ev "Loading config" \
        -Ev "Not supergun:" \
        -Ev "Supergun: " \
        -Ev "avCoins" \
        -Ev "CANCEL sell orders" \
        -Ev "CANCEL buy orders" \
        -Ev "SEll on start" \
        -Ev "^$" \
        -Ev "^\s+\d+\.\d+$" \
        -Ev "No order" \
        -Ev ":::" \
        -Ev "Error\!\!\! statusCode 422" \
        -Ev "Will repeat" \
        -Ev "cycle" \
        -Ev "No basePrice" \
        -Ev "need_" \
        -Ev "Response:" \
        -Ev "Bot responsed" \
        -Ev "next delay" \
        -Ev "^\*" \
        -Ev "\*\*" \
        /root/.pm2/logs/*-out*.log

Make the file executable:
Code: [Select]
root@gunny:/opt/gunbot# chmod +x ./stat.sh

and run the stats page...

Code: [Select]
./stat.sh

Then you can get a single page viewer of all the log files ... BUT FILTERED AND COLORED so you can watch them, but only the interesting parts.  I can't see them very easily right now because evidently I have an invalid license... :) so the screenshot isn't very useful.  Also, I'm composing this on my laptop right now, so the monitor isn't very large, so each window is a bit smaller than normal.  Typically you'd see a few more lines of each bot instance.



If there's a multitail-like console built-in to pm2, and I missed it, let me know.  If you read the link to my post above, I go into great detail about why I put together my multitail console and the ideas I have for the next one.

All in all, I have to say - great work!


Also, FYI - I started 16 pairs on a 2GB memory / 40GB / SFO2 Ubuntu 16.04.2 x64 unit and CPU is pegged at 100% - just wanted to pass that along to others.



Hi, nice job bro! looks fantastic...

I want to have that monitor working on my VPS, but i have this problem:
Quote
The following problem occured:
-----------------------------
line 35 of file 'multitail.conf' is too long!
Terminated

3
General Discussion / Re: GUNBOT v3.1 - Release name: "x3"
« on: April 21, 2017, 07:57:40 PM »
I am interesting in the windows version too.... ;D

Pages: [1]