How can I count the number of open connections in sqlite database?

I would like to count the number of open connections in sqlite database. Is there any way to do this?

+5
source share
2 answers

According to these messages on the mailing list there is no way to check the number of open connections through code or database. API is missing.

According to this post , if you are running on a POSIX system, you can use the command lsofto count how many processes the database has opened.

Windows, Process Explorer :

  • Process Explorer "" → DLL...
  • sqlite "" ( "Enter" ).
  • . "" Process Explorer.
  • , ""
+10

, lsof,

lsof dbName.sql

OpenerName 6158 User   39u   REG    1,2    20480 20397113 dbName.sql
+4

All Articles