Issue Details (XML | Word | Printable)

Key: CORE-2354
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Alexander Peshkov
Reporter: Saulius Vabalas
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.
Firebird Core

"fb_lock_print -ia" output is not flushed to a file between iterations

Created: 06/Mar/09 10:38 AM   Updated: 19/Jan/16 04:46 AM
Component/s: None
Affects Version/s: 2.1.1
Fix Version/s: 2.5 Beta 1, 2.1.3, 2.0.6

Environment: CS Linux 2.1RC1 & 1.55

QA Status: No test

 Description  « Hide
FB CS 1.5 or 2.1.RC1 on Linux. Can not redirect "fb_lock_print -ia 10 9999" output to a file. For some reason standard
redirection does not work, all output is going only into console. Is there any trick to do that, some special switch or it's a "random feature" of this

Update: Problem is output does not get flushed to a file between iterations.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Peshkov added a comment - 06/Mar/09 11:05 AM
Works for me.

fbs bin # ./fb_lock_print -ia 1 5 >a
fbs bin # cat a
19:00:28 acquire/s acqwait/s %acqwait acqrtry/s rtrysuc/s
19:00:29 0 0 0 0 0
19:00:30 0 0 0 0 0
19:00:31 0 0 0 0 0
19:00:32 0 0 0 0 0
19:00:33 0 0 0 0 0

Average: 0 0 0 0 0

And must say there is no special output processing - just fprintf(stdout, .....)

Saulius Vabalas added a comment - 06/Mar/09 11:46 AM
Apparently file is flushed only when fb_lock_print finishes execution. If it gets killed - output file is empty. In my case (see params 10 9999) output file stays at 0 size all the time. What I need is to run "fb_lock_print -ia 10 9999" to a file to collect statistics and at the same time wanna tail that file from different session to review historical results. Can output file be flushed between iterations like "iostat" does?

Dmitry Yemanov added a comment - 09/Mar/09 04:41 AM
Pavel, I'm not sure this ticket must be closed, as there's an extra feedback provided by the reporter after Alex's resolution. I'm assigning it to Alex to decide whether it should be re-opened for fixing or not.

Alexander Peshkov added a comment - 10/Mar/09 06:30 AM
Agreed, for this particular utility requirement to flash buffer is correct.