The Connection Monitor lists the calls which the product recently made to a database or a platform, and draws how much of the recent past was spent waiting on them. A statement of Invantive UniversalSQL may cost one call or hundreds, and it is the calls which are waited on. There is one row per call, or one row per request when the list is grouped. The window shows the same measurement and has the same graph, list, filters and export as the one of [[Invantive Query Tool/Connection Monitor|Invantive Query Tool]] for Microsoft Windows. This page describes how to use it here and where it differs. ## Opening It The dot at the right-hand end of the status bar carries the measurement in a colour: green while nothing much runs, via yellow and orange to red and black while the connections are busy. Resting on it says how long the connections were waited on in the last seconds and how many calls are still running. Clicking it opens this window, or brings it forward when it is already open. ## The Graph The graph shows the share of each moment spent inside a call, oldest at the left and the present at the right. A share above one means that calls overlapped, which is why the scale runs past a hundred per cent and carries lines at the boundaries where the colour changes. The colours are those of the dot, so the dot is the right-hand edge of the graph. The scale grows in steps of 500 % while the columns need it and drops back when they have left the period shown. The part of a column which the session never asked for, because the platform fetched it for what is expected next, is drawn over the column in blue; the legend "Fetched Ahead" names the colour. Resting on a column gives its moment in UTC and its share. "Minutes Shown" sets how far back the graph reaches, from 1 to 60 minutes, 5 by default. The value is remembered. The list below the graph always covers the last hour. Dragging across the graph picks a period and leaves only the calls which were running then in the list. A click without a drag clears the period, and so does a change of "Minutes Shown", since the same place in the graph then stands for another moment. ## The List The list holds the calls of the last hour, newest first. A column heading sorts it, and the sort is kept while the list refreshes. - "Started (UTC)": the moment the call began, in UTC. - "Duration (ms)": how long it took; for a call which is still running, how long it has lasted so far. - "R/W": R for a call which read and W for one which wrote. - "Rows", "Round Trips", "Bytes Sent" and "Bytes Received": what the call moved. A figure which a call did not report is left blank and not shown as zero. - "From Cache": ticked where the answer came from a cache. - "Data Container", "Partition" and "Message Code": where the call went and, when it failed, the code of the failure. - "Origin": why the call was made: "User" for a call somebody asked for, "Metadata" for the structure of an object, "Fetched Ahead" for a call nobody asked for. - "GUI Action": the part of the application which asked, as far as it named itself. - "Request": what was addressed, the statement for a database and the web address for a platform. An operation which names itself, such as `Fetch`, is shown with the object behind it. A call which failed is shown in red and a call which is still running is shown dimmed. "Auto Refresh" keeps the list up to date twice a second; switching it off holds the list still, while the graph goes on. The status line under the list gives the number of calls held, the moment of the oldest, the share of the last seconds spent waiting, and how much of that was fetched ahead. ## Filtering Three filters narrow the list and combine with each other and with a period picked in the graph: - "Search" leaves only the calls whose statement, address, data container, partition or asking part of the application contains the text. A statement is searched as the list shows it, with every line end read as a space. - "Only with Error" leaves only the calls which failed. - "Exclude Cached" leaves out the calls answered from a cache, which is how the traffic really sent to a platform is read. ## Grouping by Request "Group by Request" shows one row per request instead of one per call, with the number of calls, the failures among them, the time waited and the rows, round trips and bytes added up over everything listed. A request which was asked for by more than one part of the application, or sent to more than one data container, says "(various)". A statement which costs hundreds of calls is read as one row this way. Double-clicking a request shows the calls behind it again, by putting the statement in "Search". ## The Menu of a Row The context menu of a row offers: - "Copy Cell": the value of the cell, on the clipboard; for a request the statement in full and not as the column cut it. - "Copy": the selected rows as columns separated by tabs. - "Details...": everything recorded about the call on one page. A window opens for every call, so two calls can be compared. - "Show Progress": the picture which the [[Invantive Query Tool Multi-Platform/Progress|Progress]] pane drew of the statement the call belongs to. The query tab which drew it and the pane are brought to the front. The entry is available only while a query tab holds the picture, and a query tab keeps the pictures of its last ten statements; for a statement which started while the button "Progress" of the pane was off, there is none. ## Exporting "Export..." writes the list as it is filtered, one row per call or per request, as a comma separated file, a Microsoft Excel workbook, a JSON document or a file with one JSON object per line. The comma separated file and the workbook carry the headings of the window, in the language of the product. The JSON files carry names which are the same in every language and in every release, and a figure which was never measured stays `null` there. The moment of a call is written to the millisecond, with its date. ## Differences with Windows - The window runs on the same thread as the rest of the product, and stops while the product is blocked. The window of Invantive Query Tool for Microsoft Windows has a thread of its own and goes on counting and drawing then. - The dot does not blink in its own window while the product does not answer, and the window which Query Tool for Microsoft Windows draws for it over other windows is not available. - The menu has no entry "UniversalSQL Statement...". - "Copy" writes the origin of a call as well, which the Windows product leaves out. - A file with JSON is written without a byte order mark.