Re: [firebird-python] Problem with tracing and FDB
Hi, Yes, this works. Thank you :) On Thu, Oct 24, 2013 at 8:19 PM, Pavel Cisar wrote: > ** > > > Hi, > > Dne 24.10.2013 17:21, Harriv napsal(a): > > > > > 2. Data arrives immediately - after I have stopped tracing with tracex. > > > > If I run this configuration with fbtracemgr: > > > > > > enabled true > > log_statement_finish true > > print_plan true > > include_filter %%SELECT%% > > exclude_filter %%RDB$%% > > time_threshold 0 > > max_sql_length 2048 > > > > > > Output is printed immediately. > > Well, I see where the problem is now. There are two methods how to > retrieve output from services via isc_service_query API call: > > a) using isc_info_svc_line request that reads single line per call. > b) using isc_info_svc_to_eof request that fills the buffer provided by > client. It doesn't return until buffer is full or EOF is reached. > > Because services typically provide output with a lot of lines, FDB uses > the second method as it transfers data from server to client > significantly faster. Service.readline() method works on top of this > buffer, so you'll get it's content as individual lines. However, FDB > uses 64K buffer, so you'll not get any output until engine provides 64K > of text for you. > > If you want to get service output by first query method, you have to > query for it yourself. There is fdb.Service._QS() helper method for that. > > Example loop that fetches service output by line: > > while 1: > try: > line = svc._QS(fdb.ibase.isc_info_svc_line) > except fdb.OperationalError: > # It is routine for actions such as RESTORE to raise an > # exception at the end of their output. We ignore any such > # exception and assume that it was expected, which is somewhat > # risky. For example, suppose the network connection is broken > # while the client is receiving the action's output... > break > if not line: # we reached the end of output > break > print line > > > best regards > Pavel Cisar > IBPhoenix > > >
Re: [firebird-python] Problem with tracing and FDB
Hi, Dne 24.10.2013 17:21, Harriv napsal(a): > > 2. Data arrives immediately - after I have stopped tracing with tracex. > > If I run this configuration with fbtracemgr: > > > enabled true > log_statement_finish true > print_plan true > include_filter %%SELECT%% > exclude_filter %%RDB$%% > time_threshold 0 > max_sql_length 2048 > > > Output is printed immediately. Well, I see where the problem is now. There are two methods how to retrieve output from services via isc_service_query API call: a) using isc_info_svc_line request that reads single line per call. b) using isc_info_svc_to_eof request that fills the buffer provided by client. It doesn't return until buffer is full or EOF is reached. Because services typically provide output with a lot of lines, FDB uses the second method as it transfers data from server to client significantly faster. Service.readline() method works on top of this buffer, so you'll get it's content as individual lines. However, FDB uses 64K buffer, so you'll not get any output until engine provides 64K of text for you. If you want to get service output by first query method, you have to query for it yourself. There is fdb.Service._QS() helper method for that. Example loop that fetches service output by line: while 1: try: line = svc._QS(fdb.ibase.isc_info_svc_line) except fdb.OperationalError: # It is routine for actions such as RESTORE to raise an # exception at the end of their output. We ignore any such # exception and assume that it was expected, which is somewhat # risky. For example, suppose the network connection is broken # while the client is receiving the action's output... break if not line: # we reached the end of output break print line best regards Pavel Cisar IBPhoenix
Re: [firebird-python] Problem with tracing and FDB
1. Ok, got it :) 2. Data arrives immediately - after I have stopped tracing with tracex. If I run this configuration with fbtracemgr: enabled true log_statement_finish true print_plan true include_filter %%SELECT%% exclude_filter %%RDB$%% time_threshold 0 max_sql_length 2048 Output is printed immediately. On Thu, Oct 24, 2013 at 3:28 PM, Pavel Cisar wrote: > > > Dne 24.10.2013 13:03, Harriv napsal(a): > > > > > > Indentation is lost in that code, but if I read that correctly, it works > > exactly the same as now. No data arrives until trace is stopped? > > 1. Indentation was lost only if you don't use good e-mail client. For > example it was preserved in my Thunderbird (plain text view). > > 2. Data arrive immediatelly once there are any at server. If you don't > see any returned although you generated events at server that should be > reported, then you have bad trace configuration, i.e. check your config > spec with fbtracemgr, if it also doesn't report anything, then your > config is wrong ( without db spec at least as wildcard is > probably the culprit). If fbtracemgr returns trace output but your code > doesn't, then problem is in your code. I've used FDB for trace many > times without any problem, so there shouldn't be any issue with FDB or > Firebird. > > best regards > Pavel Cisar > IBPhoenix > > > > > Yahoo! Groups Links > > > >
Re: [firebird-python] Problem with tracing and FDB
Dne 24.10.2013 13:03, Harriv napsal(a): > > > Indentation is lost in that code, but if I read that correctly, it works > exactly the same as now. No data arrives until trace is stopped? 1. Indentation was lost only if you don't use good e-mail client. For example it was preserved in my Thunderbird (plain text view). 2. Data arrive immediatelly once there are any at server. If you don't see any returned although you generated events at server that should be reported, then you have bad trace configuration, i.e. check your config spec with fbtracemgr, if it also doesn't report anything, then your config is wrong ( without db spec at least as wildcard is probably the culprit). If fbtracemgr returns trace output but your code doesn't, then problem is in your code. I've used FDB for trace many times without any problem, so there shouldn't be any issue with FDB or Firebird. best regards Pavel Cisar IBPhoenix Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-python/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-python/join (Yahoo! ID required) <*> To change settings via email: firebird-python-dig...@yahoogroups.com firebird-python-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-python-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://info.yahoo.com/legal/us/yahoo/utos/terms/
Re: [firebird-python] Problem with tracing and FDB
Indentation is lost in that code, but if I read that correctly, it works exactly the same as now. No data arrives until trace is stopped? On Thu, Oct 24, 2013 at 1:18 PM, Pavel Cisar wrote: > ** > > > > > Dne 24.10.2013 11:46, Harriv napsal(a): > > > > > > > I don't need main thread to be responsive, I want to read the data as > > soon as possible. It's possible to control the tracing from command line > > or another application, or I can use multiprocessing module to help. > > > > How to do that? How to get data before trace has stopped? > > > > It's probably possible to pipe the output of fbtracemgr to Python > > program, but I'm still interested how to do it with plain Python program. > > You were on right track with svc.readline(), as it returns with data if > there are any trace data at server. If it do not returns, then there are > no data which means that no events happen in database that match your > trace config. If you're sure it should report something, then check your > trace config as problem is most likely there. > > If you want to read everything that trace session returns immediately as > it's available, use simple loop over service (service object acts > similarly like file object here), for example: > > svc = fdb.sevices.connect(...) > for line in svc: > print line > > However, it never stops looping until trace session is canceled by other > means. > > Here is sample script that traces all SELECT statements in given > database and shows information when select finishes: > > import fdb > import argparse > import os > > def main(): > > parser = argparse.ArgumentParser(description="Tool to analyze index > usage.") > > parser.add_argument('database', > help="Full path to database.") > parser.add_argument('-o','--host', > help="Server host.") > parser.add_argument('-u','--user', > default=os.environ.get('ISC_USER', 'sysdba'), > help="User name") > parser.add_argument('-p','--password', > default=os.environ.get('ISC_PASSWORD', None), > help="User password") > > args = parser.parse_args() > > # We need password > if not args.password: > print "A password is required to use the Services Manager." > print > parser.print_help() > return > > trace_config = """ > enabled true > log_statement_finish true > print_plan true > include_filter %%SELECT%% > exclude_filter %%RDB$%% > time_threshold 0 > max_sql_length 2048 > > """ > try: > if args.host: > svc_host = args.host + ':service_mgr' > else: > svc_host = 'service_mgr' > svc = > fdb.services.connect(host=svc_host,user=args.user,password=args.password) > > trace_id = svc.trace_start(config=trace_config % args.database) > trace_start = datetime.datetime.now() > print "Trace session %i started." % trace_id > except Exception as e: > print e > exit > > print "Use tracex.py to stop this trace session." > > try: > for line in svc: > print line > except Exception as e: > print 'Trace ended with exception:\n%s\n' % str(e) > else: > print "Trace session stopped" > > svc.close() > > if __name__ == '__main__': > main() > > To control trace services you can use next script (tracex.py mentioned > in previous one): > > import fdb > import argparse > import os > > def main(): > > parser = argparse.ArgumentParser(description="Tool to manage trace > sessions") > > parser.add_argument('-o','--host', > help="Server host.") > parser.add_argument('-u','--user', > default=os.environ.get('ISC_USER', 'sysdba'), > help="User name") > parser.add_argument('-p','--password', > default=os.environ.get('ISC_PASSWORD', None), > help="User password") > parser.add_argument('-l','--list', action='store_true', > help="List trace sessions.") > parser.add_argument('-s','--suspend', type=int, metavar='SESSION_ID', > help="Pause trace # session.") > parser.add_argument('-r','--resume', type=int, metavar='SESSION_ID', > help="resume trace # session.") > parser.add_argument('-c','--cancel', type=int, metavar='SESSION_ID', > help="cancel trace # session.") > > args = parser.parse_args() > > if not args.password: > print "A password is required to use the Services Manager." > print > parser.print_help() > return > > if args.host: > svc_host = args.host + ':service_mgr' > else: > svc_host = 'service_mgr' > svc = > fdb.services.connect(host=svc_host,user=args.user,password=args.password) > > if args.list: > sessions = svc.trace_list() > if len(sessions.keys()) == 0: > print "No trace sessions." > else: > for sid, data in sessions.items(): > print "Trace session %i" % sid > if data.has_key('name'): > print " name:", data['name'] > print " date:", data['date'].strftime('%Y-%m-%d %H:%M:%S') > print " user:", data['user'] > print " flags:", ', '.join(data['flags']) > elif args.suspend: > try: > print svc.trace_suspend(args.suspend) > except Exception as e: > print "ERROR:" > print e.args > elif args.resume: > try: > print svc.trace_resume(args.resume) > except Exception as e: > print "ERROR:" > print e.args > elif args.cancel: > try: > print svc.trace_stop(args.cancel) > except Exception as e:
Re: [firebird-python] Problem with tracing and FDB
Dne 24.10.2013 11:46, Harriv napsal(a): > > > I don't need main thread to be responsive, I want to read the data as > soon as possible. It's possible to control the tracing from command line > or another application, or I can use multiprocessing module to help. > > How to do that? How to get data before trace has stopped? > > It's probably possible to pipe the output of fbtracemgr to Python > program, but I'm still interested how to do it with plain Python program. You were on right track with svc.readline(), as it returns with data if there are any trace data at server. If it do not returns, then there are no data which means that no events happen in database that match your trace config. If you're sure it should report something, then check your trace config as problem is most likely there. If you want to read everything that trace session returns immediately as it's available, use simple loop over service (service object acts similarly like file object here), for example: svc = fdb.sevices.connect(...) for line in svc: print line However, it never stops looping until trace session is canceled by other means. Here is sample script that traces all SELECT statements in given database and shows information when select finishes: import fdb import argparse import os def main(): parser = argparse.ArgumentParser(description="Tool to analyze index usage.") parser.add_argument('database', help="Full path to database.") parser.add_argument('-o','--host', help="Server host.") parser.add_argument('-u','--user', default=os.environ.get('ISC_USER', 'sysdba'), help="User name") parser.add_argument('-p','--password', default=os.environ.get('ISC_PASSWORD', None), help="User password") args = parser.parse_args() # We need password if not args.password: print "A password is required to use the Services Manager." print parser.print_help() return trace_config = """ enabled true log_statement_finish true print_plan true include_filter %%SELECT%% exclude_filter %%RDB$%% time_threshold 0 max_sql_length 2048 """ try: if args.host: svc_host = args.host + ':service_mgr' else: svc_host = 'service_mgr' svc = fdb.services.connect(host=svc_host,user=args.user,password=args.password) trace_id = svc.trace_start(config=trace_config % args.database) trace_start = datetime.datetime.now() print "Trace session %i started." % trace_id except Exception as e: print e exit print "Use tracex.py to stop this trace session." try: for line in svc: print line except Exception as e: print 'Trace ended with exception:\n%s\n' % str(e) else: print "Trace session stopped" svc.close() if __name__ == '__main__': main() To control trace services you can use next script (tracex.py mentioned in previous one): import fdb import argparse import os def main(): parser = argparse.ArgumentParser(description="Tool to manage trace sessions") parser.add_argument('-o','--host', help="Server host.") parser.add_argument('-u','--user', default=os.environ.get('ISC_USER', 'sysdba'), help="User name") parser.add_argument('-p','--password', default=os.environ.get('ISC_PASSWORD', None), help="User password") parser.add_argument('-l','--list', action='store_true', help="List trace sessions.") parser.add_argument('-s','--suspend', type=int, metavar='SESSION_ID', help="Pause trace # session.") parser.add_argument('-r','--resume', type=int, metavar='SESSION_ID', help="resume trace # session.") parser.add_argument('-c','--cancel', type=int, metavar='SESSION_ID', help="cancel trace # session.") args = parser.parse_args() if not args.password: print "A password is required to use the Services Manager." print parser.print_help() return if args.host: svc_host = args.host + ':service_mgr' else: svc_host = 'service_mgr' svc = fdb.services.connect(host=svc_host,user=args.user,password=args.password) if args.list: sessions = svc.trace_list() if len(sessions.keys()) == 0: print "No trace sessions." else: for sid, data in sessions.items(): print "Trace session %i" % sid if data.has_key('name'): print " name:", data['name'] print " date:", data['date'].strftime
Re: [firebird-python] Problem with tracing and FDB
I don't need main thread to be responsive, I want to read the data as soon as possible. It's possible to control the tracing from command line or another application, or I can use multiprocessing module to help. How to do that? How to get data before trace has stopped? It's probably possible to pipe the output of fbtracemgr to Python program, but I'm still interested how to do it with plain Python program. On Thu, Oct 24, 2013 at 12:39 PM, Pavel Cisar wrote: > > > Dne 24.10.2013 10:40, Harriv napsal(a): > > > > > > How fbtracemgr.exe and FB TraceManager from Upscene handle displaying > > the trace log in real time? > > It's no magic, they simply read data from service as you do, and display > it as it arrives. They do it in background thread, so main process is > always responsive and can end the trace session on your request (which > will also stop the background thread that was could be sleeping, waiting > in API call to engine). You can do the same in Python using FDB, but > it's much more code and more complicated than two-process solution > without threads. > > best regards > Pavel Cisar > IBPhoenix > > > > > > Yahoo! Groups Links > > > >
Re: [firebird-python] Problem with tracing and FDB
Dne 24.10.2013 10:40, Harriv napsal(a): > > > How fbtracemgr.exe and FB TraceManager from Upscene handle displaying > the trace log in real time? It's no magic, they simply read data from service as you do, and display it as it arrives. They do it in background thread, so main process is always responsive and can end the trace session on your request (which will also stop the background thread that was could be sleeping, waiting in API call to engine). You can do the same in Python using FDB, but it's much more code and more complicated than two-process solution without threads. best regards Pavel Cisar IBPhoenix Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-python/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-python/join (Yahoo! ID required) <*> To change settings via email: firebird-python-dig...@yahoogroups.com firebird-python-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-python-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://info.yahoo.com/legal/us/yahoo/utos/terms/
Re: [firebird-python] Problem with tracing and FDB
How fbtracemgr.exe and FB TraceManager from Upscene handle displaying the trace log in real time? This is one of the use cases in documentation: 1. *On-demand interactive trace of some (or all) activity in some (or all) databases* An application (which could be the *fbtracemgr* utility) starts a user trace session, reads its output and shows traced events to the user in real time on the screen. The user can suspend and resume the trace and, finally, stop it. Constantly stopping and starting tracing doesn't sound feasible? On Thu, Oct 24, 2013 at 11:35 AM, Pavel Cisar wrote: > ** > > > Hi, > > Dne 24.10.2013 10:09, Harriv napsal(a): > > > > > > > I got forward: > > > > If I STOP the trace session started from FDB with fbtracemgr.exe, > > svc.readline() will return all(?) trace data stored in some buffer. So > > what I really am looking for is how get "interactive" mode? > > Well, it seem that you have misunderstood how trace in Firbeird works > then :) There so no "interactive" mode. Once trace session is started, > Firebird engine accumulates trace report strings in internal buffer (if > there are any according to your trace config) until it's full (then no > more trace data is accumulated until client empties it enough for new > data via isc_service_query call). Client calls isc_service_query API > call that BLOCKs, i.e. returns only when there is any content in > engine's output buffer and trace session is active. So if there is > nothing to return, client is "frozen". > > So handling trace sessions typically require two processes or threads, > one that starts the session, reads output in loop and does something > with it (prints out, store to file, whatever) and second one to end the > session. You can also terminate the trace session in "reading" > process/thread, for example using timer or other way to interrupt it and > tell it to stop fetching trace output, but that will react *only* when > it's outside of isc_service_query call, hence two processes is more > "interactive" or better "resposive". > > > best regards > Pavel Cisar > IBPhoenix > > >
Re: [firebird-python] Problem with tracing and FDB
Hi, Dne 24.10.2013 10:09, Harriv napsal(a): > > > I got forward: > > If I STOP the trace session started from FDB with fbtracemgr.exe, > svc.readline() will return all(?) trace data stored in some buffer. So > what I really am looking for is how get "interactive" mode? Well, it seem that you have misunderstood how trace in Firbeird works then :) There so no "interactive" mode. Once trace session is started, Firebird engine accumulates trace report strings in internal buffer (if there are any according to your trace config) until it's full (then no more trace data is accumulated until client empties it enough for new data via isc_service_query call). Client calls isc_service_query API call that BLOCKs, i.e. returns only when there is any content in engine's output buffer and trace session is active. So if there is nothing to return, client is "frozen". So handling trace sessions typically require two processes or threads, one that starts the session, reads output in loop and does something with it (prints out, store to file, whatever) and second one to end the session. You can also terminate the trace session in "reading" process/thread, for example using timer or other way to interrupt it and tell it to stop fetching trace output, but that will react *only* when it's outside of isc_service_query call, hence two processes is more "interactive" or better "resposive". best regards Pavel Cisar IBPhoenix
Re: [firebird-python] Problem with tracing and FDB
Dne 24.10.2013 10:01, Philippe Makowski napsal(a): > Le 24/10/13 09:45, Harriv a écrit : >> Trace_list shows sessions as expected. >> >> I tried with fbtracemgr.exe and same config. It seems to work. >> > > sorry no idea, perhaps a bug in fdb > Pavel ? I don't think so, as I use trace with FDB without problems. Although I didn't use the name param of svc_start. But as readline never returns it means that isc_service_query doesn't returns from engine with result. So I expect that engine simply doesn't have anything to report. BTW, if service is properly started (verifiable via fbtracemgr) and is blocked in reading data (doesn't matter if it's readline, readlines or via iteration - it all uses single method __read_buffer and hence isc_service_query API call at the very bottom), it should be possible to "unblock it" if trace would be externaly terminated (I use my own small FDB scipt for trace service management as fbtracemgr is too quirky for my taste, but fbtracemgr will do), no need to kill python. BTW, that's the only way to end trace if you'll use loop in your FDB script to fetch trace data. best regards Pavel Cisar IBPhoenix Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-python/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-python/join (Yahoo! ID required) <*> To change settings via email: firebird-python-dig...@yahoogroups.com firebird-python-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-python-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://info.yahoo.com/legal/us/yahoo/utos/terms/
Re: [firebird-python] Problem with tracing and FDB
Hi, That's strange. Could you try it: a) WITHOUT the name. i.e. trace_id= svc.trace_start(trace_config) b) WITH explicit database name specification in config, For example trace_config= """ enabled true log_connections true log_transactions true log_statement_finish true time_threshold 0 """ or trace_config= """ enabled true log_connections true log_transactions true log_statement_finish true time_threshold 0 """ best regards Pavel Cisar IBPhoenix Dne 23.10.2013 11:41, Harriv napsal(a): > > > Hi, > > I tried to get trace log from Python application, but haven't yet > succeeded. I'm using Python 2.7, Firebird 2.5.2 and FDB 1.4. This is > what I tried: > > > |>>> import fdb svc= fdb.services.connect(password='masterkey', host='localhost') trace_config= """ > enabled true > log_connections true > log_transactions true > log_statement_finish true > time_threshold 0 > > """ trace_id= svc.trace_start(trace_config, 'test_trace_2') svc.readline() > > | > > Program stops there, svc.readline never returns and I have to kil Python > shell. Am I missing something or where do I go wrong? > > I also made this StackOverflow question: > http://stackoverflow.com/questions/19521998/how-to-use-firebird-audit-and-trace-services-with-python > > > >
Re: [firebird-python] Problem with tracing and FDB
I got forward: If I STOP the trace session started from FDB with fbtracemgr.exe, svc.readline() will return all(?) trace data stored in some buffer. So what I really am looking for is how get "interactive" mode? On Thu, Oct 24, 2013 at 11:01 AM, Philippe Makowski wrote: > Le 24/10/13 09:45, Harriv a écrit : > > Trace_list shows sessions as expected. > > > > I tried with fbtracemgr.exe and same config. It seems to work. > > > > sorry no idea, perhaps a bug in fdb > Pavel ? > > > but please report in the tracker > http://tracker.firebirdsql.org/browse/PYFB > > > > > > > Yahoo! Groups Links > > > >
Re: [firebird-python] Problem with tracing and FDB
Le 24/10/13 09:45, Harriv a écrit : > Trace_list shows sessions as expected. > > I tried with fbtracemgr.exe and same config. It seems to work. > sorry no idea, perhaps a bug in fdb Pavel ? but please report in the tracker http://tracker.firebirdsql.org/browse/PYFB Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-python/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-python/join (Yahoo! ID required) <*> To change settings via email: firebird-python-dig...@yahoogroups.com firebird-python-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-python-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://info.yahoo.com/legal/us/yahoo/utos/terms/
Re: [firebird-python] Problem with tracing and FDB
Trace_list shows sessions as expected. I tried with fbtracemgr.exe and same config. It seems to work. On Thu, Oct 24, 2013 at 10:36 AM, Philippe Makowski wrote: > ** > > > Le 23/10/13 11:41, Harriv a écrit : > > > Hi, > > > > I tried to get trace log from Python application, but haven't yet > > succeeded. I'm using Python 2.7, Firebird 2.5.2 and FDB 1.4. This is > what I > > tried: > > > import fdb>>> svc = fdb.services.connect(password='masterkey', > host='localhost')>>> trace_config = """ > > enabled true > > log_connections true > > log_transactions true > > log_statement_finish true > > time_threshold 0 > > > > """>>> trace_id = svc.trace_start(trace_config, > > 'test_trace_2')>>> svc.readline() > > > > Program stops there, svc.readline never returns and I have to kil Python > > shell. Am I missing something or where do I go wrong? > > > seems not, but can you check if trace started, and if you have something > in trace_list(), and if same config and trace work for your system > outside Python code > > >
Re: [firebird-python] Problem with tracing and FDB
Le 23/10/13 11:41, Harriv a écrit : > Hi, > > I tried to get trace log from Python application, but haven't yet > succeeded. I'm using Python 2.7, Firebird 2.5.2 and FDB 1.4. This is what I > tried: > import fdb>>> svc = fdb.services.connect(password='masterkey', host='localhost')>>> trace_config = """ > enabled true > log_connections true > log_transactions true > log_statement_finish true > time_threshold 0 > > """>>> trace_id = svc.trace_start(trace_config, > 'test_trace_2')>>> svc.readline() > > Program stops there, svc.readline never returns and I have to kil Python > shell. Am I missing something or where do I go wrong? > seems not, but can you check if trace started, and if you have something in trace_list(), and if same config and trace work for your system outside Python code