Username: Password:

Author Topic: Gunbot Monitor - Oversee all GUNBOTs in one screen  (Read 223699 times)

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Gunbot Monitor - Oversee all GUNBOTs in one screen
« on: May 24, 2017, 10:57:02 AM »
gmon - A command line application to monitor your Gunbot




Basics

🚨 gmon 1.x will only work with Gunbot v9! 🚨

- gmon works best on Unix based systems (Linux and OSX)
- gmon requires Gunbot v9, Node.js 6 or higher and npm
- gmon uses up to 100MB memory
- you should not use gmon if your server has less than 230MB available free memory
- you need a wide window / screen
- gmon and it's creator are not responsible/liable for wrong numbers or wrong calculations
- use at own risk



Installation - Linux, OSX, Windows

You need to install Gunbot-Monitor on the same machine as Gunbot.

This is a Node.js command line app available through the npm registry.

Before installing, download and install Node.js.
Node.js 6.11.2 or higher is required.

Installation is done using the "npm install -g" command:

Code: [Select]
npm install -g gunbot-monitor


Update

Use npm to update:

Code: [Select]
npm uninstall -g gunbot-monitor && npm install -g gunbot-monitor


Usage

To start gmon, go to the folder your Gunbot is installed (`cd /path/to/gunbot`) and run this command:

Code: [Select]
gmon [options]

Options

Code: [Select]
    -h, --help                               Output usage information
    -v, --version                            Output the version number
    -p, --path <path>                        Path to the GUNBOT folder. Separate multiple paths with ":" (like: -p /path1:/path2). [Default: current folder]
    -N, --path-name <name>                   Optional name for each path to the GUNBOT folder(s). Separate multiple path names with ":" (like: -N Kraken_Bot:Proxy_Mega_Bot). [Default: No path name]
    -c, --compact [groupSize]                Do not draw row lines. Optional set the number of rows after which a line is drawn. [Default: 0]
    -s, --small                              Reduce columns for small screens
    -d, --digits <digits>                    Amount of digits for all numbers. Min = 0, max = 10. [Default: 4]
    -r, --refresh <seconds>                  Seconds between table refresh. Min = 1, max = 600. [Default: 60]
    -m, --markets <markets>                  Filter of markets to show. Separate multiple markets with ":" (like: -m poloniex:kraken) [Default: all]
    -P, --profit                             Use to activate the parsing of the profit. NOT WORKING CORRECTLY!
    -H, --hide-inactive <hours>              Hides trading pairs which last log entry is older than given hours. Min = 1, max = 854400. [Default: 720]
    -C, --connections-check-delay <seconds>  Seconds between netstats checks. Higher numbers result in more inaccurate statistics but reduce cpu usage. Min = 1, max = 600. [Default: 1]


Path option "-p"

To run gmon outside of your Gunbot folder, use the `-p` option to specify the path where Gunbot is installed:

Code: [Select]
gmon -p /path/to/gunbot
If you have multiple Gunbots running, you can use the `-p` option to specify all paths to your Gunbots:

Code: [Select]
gmon -p /path/to/AAA_bot:/path/to/BBB_bot

Path name option "-N"

When using `-p` option you can set names for your different Gunbots:

Code: [Select]
gmon -N Kraken-Bot-tssl:Bittrex-emo

Compact mode "-c"

With this option, gmon will not draw row lines to separate the rows:

Code: [Select]
gmon -c
Optional set the number of rows after which a line should be drawn to have a little visual guide:

Code: [Select]
gmon -c 4

Small mode "-s"

With this option, gmon will not draw the columns *OO?*, *# Coins*, *1 6 h d +* to support smaller screens:

Code: [Select]
gmon -s

Digits option "-d"

When using `-d` option you can set the number of displayed digits. Set to a lower number on small screens:

Code: [Select]
gmon -d 3

Refresh option "-r"

This option allows you to set the time in seconds how long gmon waits until it checks all values again.

⚡️ Please check your server when setting `-r` to low numbers! ⚡️ Faster updates mean more work for your server.

Code: [Select]
gmon -r 90

Market filter "-m"

With option `-m` you are able to define specific markets you want to see in the output:

Code: [Select]
gmon -m kraken:bitfinex # This will only show pairs on those exchanges

Profit option "-P"

Now working at the moment.


Hide inactive pairs "-H"

gmon will show all trading pairs inside a folder, as long as there is a `state.json` file. If you disable a pair you can set this option `-H` to hide inactive trading pairs when there last update is older than the set number.

Code: [Select]
gmon -H 2

Connections check delay "-C"

Set the time interval in seconds how often the number of open connections to the exchanges should be checked. Higher numbers result in more inaccurate statistics but reduce cpu usage.

Code: [Select]
gmon -C 10


How to read gmon's output

ColumnDescription
**Name**Market name and trading pair name
**Str**Buy and sell strategy
**LL**Last Log - seconds since the last log update of this trading pair 
**OO?**Open Order? - says "yes" if there is an open order on the market
-
**# Coins**Amount of coins of the quote currency
**in BTC**Value of the quote currency in BTC (or other base currency)
**Diff since buy**Indicator how much the value of the holding quote currency has changed in BTC (or other base currency)
-
**Buy/Bought**If numbers are white: Price which needs to be reached till the bot will buy quote currency (if **# Coins** == 0)
If numbers are yellow: Price the bot paid to buy the quote currency"
**Sell**Price which needs to be reached till the bot will sell the holding quote currency (if **# Coins** > 0)
**Last Price**Current market price for the quote currency
**Price diff**Difference between Last Price and the Buy/Bought if waiting to buy
or difference between Last Price and the Sell if waiting to sell.
If something is not correct (the log does not contain all needed prices) it shows an error hint
-
**# Buys**Number of total buys - How often did the bot buy this quote currency and time since the last buy
**1 6 h d +**Number of buys in the last 1 hour / 6 hours / 12 hours / 24 hours / more than 24 hours.
**# Sells**Number of total sells - How often did the bot sell this quote currency and time since the last sell
**1 6 h d +**Number of sells in the last 1 hour / 6 hours / 12 hours / 24 hours / more than 24 hours



Windows issues

Do yourself a favor and use a console emulator like cmder.



Wishlist

https://github.com/BeerK0in/gunbot-monitor/issues/15



Thanks

Thanks to your feedback so for and thanks to
https://github.com/toSvenson
https://github.com/jbogatay
for contributing!



Support & Tips

You like gmon and it helps you earning money?

- Report bugs in this forum thread or via the Telegram group t.me/beercrypto.
- Support gmon and send a tip to BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT


BK
« Last Edit: April 27, 2018, 07:16:41 PM by beer-k0in »
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT

Offline Alex_13

  • Rookie
  • *
  • Posts: 7
    • View Profile
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #1 on: May 24, 2017, 05:08:57 PM »
Wonderful idea! But it doesn't run on Windows now)) I'm working in Linux, but bot runs on Win machine.
All the best!

btcjuice

  • Guest
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #2 on: May 25, 2017, 10:09:38 PM »
This is amazing dude, have been using it for 2 days now and couldn't imagine GB without it. Great job!

Few improvements i would suggest:
- on the "diff since buy" column add a total at the bottom also.
- I dont know why but the pink arrows and the blue arrows show just squares to me. the yellow arrows are ok though!
- put profit column green? :) Today was a bad day... just saw reds on the  "diff since buy" so a little green would cheer us up? :)
- On "last error" the idea is "If a 422 only shows up once in a while is ok, but if it blocks a pair that is bad" so can we also see (what time was the error before the last?) understandable? Or X errors in the last Y minutes? Just basically something that would help on identifying if it was a one-off error or a persistent one.


Love the interface and its great as it is, the above are just reaaly some minor improvement sugestions, dont take them the bad way :D

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #3 on: May 25, 2017, 11:29:50 PM »
But it doesn't run on Windows now

I think I found the issue with Windows. Will look into it tomorrow.



This is amazing dude, have been using it for 2 days now and couldn't imagine GB without it. Great job!

Glad you like it.

Few improvements i would suggest:
- on the "diff since buy" column add a total at the bottom also.
- I dont know why but the pink arrows and the blue arrows show just squares to me. the yellow arrows are ok though!
- put profit column green? :) Today was a bad day... just saw reds on the  "diff since buy" so a little green would cheer us up? :)
- On "last error" the idea is "If a 422 only shows up once in a while is ok, but if it blocks a pair that is bad" so can we also see (what time was the error before the last?) understandable? Or X errors in the last Y minutes? Just basically something that would help on identifying if it was a one-off error or a persistent one.

Thank you for the feedback. I put it "on the list" :)

Arrows: What OS are you running GUNBOT on? Debian? Ubuntu? CentOS?

BK
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT

Offline Snapper_Head

  • Rookie
  • *
  • Posts: 4
    • View Profile
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #4 on: May 26, 2017, 07:19:27 AM »
Thanks for your program.  It is great that so many people are contributing and sharing their work to make gunbot better.

I ran into trouble getting this to work but solved it by updating nodjs to version 6

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs

Offline dj_crypto

  • Rookie
  • *
  • Posts: 6
    • View Profile
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #5 on: May 26, 2017, 08:36:36 AM »
Hey mate,

I also have a few windows servers I am running pairs on. Any plans on getting this amazing monitor working with a windows server?

Have a good day, and again, great work :)

dj

Offline finlay1888

  • Rookie
  • *
  • Posts: 6
    • View Profile
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #6 on: May 26, 2017, 10:03:28 AM »
This is great work and solved my initial monitoring challenges with GunBot.

Top work!  Do you have a LTC wallet I can send something to?


Offline Anon

  • Rookie
  • *
  • Posts: 9
    • View Profile
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #7 on: May 26, 2017, 11:21:24 AM »
i can't make it work... i get only logo >>gunbot-monitor<< and refresh interval 20s and it stays like it forever...

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #8 on: May 26, 2017, 03:44:55 PM »
I've updated the monitor.

Run
Code: [Select]
npm install -g gunbot-monitor to update it on your server.



Few improvements i would suggest

Added hopefully all of it. Can you check the arrows again please?



Wonderful idea! But it doesn't run on Windows now)) I'm working in Linux, but bot runs on Win machine.
I also have a few windows servers I am running pairs on. Any plans on getting this amazing monitor working with a windows server?
i can't make it work... i get only logo >>gunbot-monitor<< and refresh interval 20s and it stays like it forever...

Should work on Windows and OSes other than Linux and OSX now.



Do you have a LTC wallet I can send something to?

I do. LTC wallet: LNwLXuf9Ry47n3GiFc4cGTBXLLX1Cov6Ha
Thank you! 8)

BK
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT

Offline deund

  • Rookie
  • *
  • Posts: 2
    • View Profile
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #9 on: May 26, 2017, 05:24:12 PM »
hi ;

Gunbot monitor is big great

thanks you develloper :-)

1 question
is possible to execute GM in log in html ---> example    $ gmon html
in my browser view GM with 20sec refresh.......

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #10 on: May 26, 2017, 05:41:03 PM »
is possible to execute GM in log in html ---> example    $ gmon html
in my browser view GM with 20sec refresh.......

Right now out of the box: No, all the output is formatted for the console and not written into a file.

I could build a sweet webapp to view and control the bot. But that would took time from my other projects and I would have to charge money for it.
So if there is a big demand and more than 20 people would pay, lets say 0.05 BTC for it, then we can go into the web. :)

BK
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT

Offline Anon

  • Rookie
  • *
  • Posts: 9
    • View Profile
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #11 on: May 26, 2017, 06:29:14 PM »
i can't make it work... i get only logo >>gunbot-monitor<< and refresh interval 20s and it stays like it forever...

Should work on Windows and OSes other than Linux and OSX now.


i'm using ubuntu 16.04
nodejs v7.10.0
still same thing even after update...

btcjuice

  • Guest
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #12 on: May 26, 2017, 07:08:48 PM »
i'm using ubuntu 16.04

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #13 on: May 26, 2017, 07:18:20 PM »
i'm using ubuntu 16.04
nodejs v7.10.0
still same thing even after update...

Can you go to the folder your GUNBOT is installed and run those commands and post the results here?

Code: [Select]
npm ls -g pm2 gunbot-monitor
Code: [Select]
free -m
Code: [Select]
ls -la *-log.txt
BK
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #14 on: May 26, 2017, 07:24:52 PM »
i'm using ubuntu 16.04

Could be the Terminal software you are using to connect to your server. What is the OS on your local machine and how (which program) do you connect to your server?

BK
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT

btcjuice

  • Guest
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #15 on: May 26, 2017, 07:40:07 PM »
Windows 10 with putty 0.66

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #16 on: May 26, 2017, 11:00:25 PM »
Windows 10 with putty 0.66

Looks like putty uses a non UTF-8 font by default. Maybe this helps you to switch to a more modern font: https://superuser.com/questions/393834/how-to-configure-putty-to-display-these-characters

BK
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT

Reibinga

  • Guest
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #17 on: May 27, 2017, 11:40:54 PM »
Is there a reason as to why some prices in the last price column for pairs are blank and others are not?

https://gyazo.com/d664c58af15772b5855447030ade4ce5

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #18 on: May 28, 2017, 06:51:00 AM »
Is there a reason as to why some prices in the last price column for pairs are blank and others are not?

https://gyazo.com/d664c58af15772b5855447030ade4ce5

General answer: if the GUNBOT does not log something, the Monitor can not show it.

In your case a line like this is missing in the logs:
LP 1.7650000,<=,prBuy 1.7715878  secMargin 0.0000708635135333334  grows yes

This is not confirmed by Gunthar, but I think it is when the GUNBOT is in a bad state after an error on Poloniex. See this post in the Bugs thread.
https://gunthy.org/index.php?topic=270.msg1570#msg1570

I also noticed, the bots will not trade if 'last price' is empty, so I restart them (and wait ~10s between each restart):
Code: [Select]
pm2 restart BTC_XXXI'm not sure if restarting is the correct way to address this, but it works for me.

BK
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT

Offline Svenson

  • Rookie
  • *
  • Posts: 1
    • View Profile
Re: Gunbot Monitor - Oversee all GUNBOTs in one screen
« Reply #19 on: May 28, 2017, 07:56:12 AM »
Windows 10 with putty 0.66

Looks like putty uses a non UTF-8 font by default. Maybe this helps you to switch to a more modern font: https://superuser.com/questions/393834/how-to-configure-putty-to-display-these-characters

BK

The pull request I've issues a few days ago was meant to make the arrows work with default putty. :)