R
R
rechmp2014-03-14 12:14:58
linux
rechmp, 2014-03-14 12:14:58

How to filter program output in console?

There is a program - stratum proxy, which runs in the terminal on the ubuntu server.
At the beginning, it throws a bunch of configuration information into the terminal, and then users connected to the proxy periodically appear.
It would be desirable that after starting the program in the console there were only users and nothing else.
I understand that you need to use grep here, but I never managed to succeed.
The output of the program is something like the following.

2014-03-14 11:04:19,127 INFO proxy mining_proxy.main # Stratum proxy version: 1.3.0
2014-03-14 11:04:19,127 INFO proxy mining_proxy.main # Trying to connect to Stratum
2014-03-14 11:04:19,128 INFO proxy mining_proxy.main # Setting PoW algo: scrypt
2014-03-14 11:04:19,189 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2014-03-14 11:04:19,189 INFO proxy mining_proxy.on_connect # Connected to Stratum 
2014-03-14 11:04:19,189 INFO proxy mining_proxy.on_connect # Authorizing custom user
2014-03-14 11:04:19,190 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs
2014-03-14 11:04:19,253 INFO proxy mining_proxy.main # -----------------------------------------------------------------------
2014-03-14 11:04:19,253 INFO proxy mining_proxy.main # PROXY IS LISTENING ON ALL IPs ON PORT 
2014-03-14 11:04:19,253 INFO proxy mining_proxy.main # -----------------------------------------------------------------------
2014-03-14 11:04:19,254 INFO proxy client_service.handle_event # Setting new difficulty: 128
2014-03-14 11:04:19,254 INFO proxy client_service.handle_event # New job 9b for prevhash a634fa14, clean_jobs=True
2014-03-14 11:04:19,573 INFO proxy getwork_listener.render_POST # Worker '5' subscribed for LP
2014-03-14 11:04:19,703 INFO proxy getwork_listener.render_POST # Worker '58' subscribed for LP
2014-03-14 11:04:19,718 INFO proxy getwork_listener.render_POST # Worker '1' subscribed for LP
2014-03-14 11:04:19,755 INFO proxy getwork_listener.render_POST # Worker '16' subscribed for LP

Thanks for the help.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Snow Dimon, 2014-03-14
@rechmp

Offhand: team | grep worker | awk '{print($6" "$7)}'

A
amadis, 2014-03-14
@amadis

better like this:
command 2>&1 | grep worker | awk '{print($6' "$7)}'
redirects stderr to stdout and then filters...

D
Denis, 2014-03-14
@uscr

Show the lines to be filtered.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question