Giter VIP home page Giter VIP logo

Comments (10)

seriyps avatar seriyps commented on June 15, 2024 2

@alexbers it will show both connections from clients to proxy and from proxy to telegram servers. Also, it will show other connections on the system. So, it might be bit better to use ss -nt state established '( sport = 443 )' | wc -l (here 443 is proxy port; if proxy uses different port, replace 443 with yours

from mtprotoproxy.

alexbers avatar alexbers commented on June 15, 2024 1

yes, you can use netstat -tn command, like netstat -tn | wc -l

from mtprotoproxy.

alexbers avatar alexbers commented on June 15, 2024

The proxy prints those stats every 10 minutes. They look like this

Stats for 05.06.2018 22:06:11
tg: 29 connects (0 current), 0.04 MB
tg2: 1268 connects (0 current), 0.02 MB

If you're using docker, the docker-compose logs command can be used to see the number of active connections

from mtprotoproxy.

Allineer avatar Allineer commented on June 15, 2024

@alexbers, how about more "parseable" statistics format?
For example, JSON or CSV or key=value via http(s) request or CLI command or rewriteable file like openvpn-status.log?

users=tg,tg2
tg.connects=29
tg.curr_connects=0
tg.octets=0.04
tg.msgs=111
tg2.connects=1268
tg2.curr_connects=0
tg2.octets=0.02
tg2.msgs=222
tg;29;0;0.04;111
tg2:1268;0;0.02;222

Thanks!

from mtprotoproxy.

seriyps avatar seriyps commented on June 15, 2024

@Allineer you can have statistics in Prometheus format if you check prometheus branch

from mtprotoproxy.

Allineer avatar Allineer commented on June 15, 2024

@seriyps Спасибо!

from mtprotoproxy.

ParaNULL avatar ParaNULL commented on June 15, 2024

docker-compose logs doesn't echo the same output as before! it doesn't show the connection stats and numbers!

from mtprotoproxy.

alexbers avatar alexbers commented on June 15, 2024

do you use prometheus branch? could you send the output of docker-compose logs command (please, replace your server ip with 0.0.0.0)?

from mtprotoproxy.

masoudelete avatar masoudelete commented on June 15, 2024

@alexbers @seriyps Is there a way to see the number of connections when I'm running the proxy with Python command? I ran 6 instances with tmux on a 6cpu server

from mtprotoproxy.

alexbers avatar alexbers commented on June 15, 2024

The Prometheus support have been merged to master

from mtprotoproxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.