aj-snapshot: How to suppress info/error messages

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
hjhmusic
Established Member
Posts: 18
Joined: Mon Nov 07, 2016 3:24 am
Been thanked: 1 time

aj-snapshot: How to suppress info/error messages

Post by hjhmusic »

I've just started using aj-snapshot to connect Rack automatically to the JACK hardware outputs.

Here's the problem -- it needs to run in a terminal window, so a lot of information messages get posted. Connection and disconnection messages are not too bad (kind of useful to see them, and they can be suppressed by the `-q` commandline switch anyway).

But... if I stop the JACK server, then it does this, once per second:

Code: Select all

JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
All five lines, over and over again. Which is... somewhat redundant. (I know JACK is down -- I shut it down.)

I've tried to suppress these messages by:

1. `aj-snapshot -d (file) >/dev/null` -- stdout > null, no effect.
2. `aj-snapshot -d (file) 2>/dev/null` -- stderr > null, no effect.

I really don't need these messages to be printed. Is there any way to make them stop, short of modifying the source code?

Thanks,
hjh
tramp
Established Member
Posts: 2347
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 466 times

Re: aj-snapshot: How to suppress info/error messages

Post by tramp »

hjhmusic wrote: Sat Sep 26, 2020 6:10 am But... if I stop the JACK server, then it does this, once per second:
Hence the messages. aj-snapshot tries to connect to jackd and jackd replied with those messages.
hjhmusic wrote: Sat Sep 26, 2020 6:10 am JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started

Those messages didn't come from aj-snapshot. They comes from jackd.
jackd tell that the server is not running when aj-snapshot tries to open a client and it tries it once per second as long it open successfully.
To suppress this messages you must stop aj-snapshot.
On the road again.
hjhmusic
Established Member
Posts: 18
Joined: Mon Nov 07, 2016 3:24 am
Been thanked: 1 time

Re: aj-snapshot: How to suppress info/error messages

Post by hjhmusic »

> Those messages didn't come from aj-snapshot. They comes from jackd.

Sorry to be late to answer.

When I stop the JACK server, the jackd process also quits. (I'm not using d-bus.)

Code: Select all

// when JACK is running
xxx@yyy:~$ ps x | grep jackd
 7665 ?        SLsl   0:09 /usr/bin/jackd -dalsa -r44100 -p1024 -n2 -D -Chw:PCH -Phw:PCH
 9448 pts/0    S+     0:00 grep --color=auto jackd

// when JACK is stopped
xxx@yyy:~$ ps x | grep jackd
 9457 pts/0    S+     0:00 grep --color=auto jackd
So the messages can't be coming from jackd because jackd is down at that time.

Anyway, it doesn't matter, the only real user impact is a pink tab color in the terminal when JACK is off.

hjh
tramp
Established Member
Posts: 2347
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 466 times

Re: aj-snapshot: How to suppress info/error messages

Post by tramp »

hjhmusic wrote: Sun Nov 22, 2020 6:27 am So the messages can't be coming from jackd because jackd is down at that time.
As I said, aj-snapshot tries to connect to the jack daemon, in a loop. Then, the jack daemon wake up and checks if the jack server is running. Then jack daemon return those messages and go back to sleep.
So, those messages comes from he jack daemon. True, it is forced by aj-snapshot, because it ask for that. Only way to suppress those messages is stop the loop aj-snapshot is running.
On the road again.
Post Reply