# Live360

{% hint style="info" %}
Live360 exclusively establishes direct connections with PostgreSQL instances, setting it apart as the sole module with this capability.&#x20;

The remaining analysis dashboards acquire data from the repository. \
\
Users of Datasentinel have the flexibility to enable or disable this specific feature on an individual basis.
{% endhint %}

## Current Sessions

You have the option to select either a specific database or all databases, allowing you to then filter for active sessions and display the associated queries.

<figure><img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2F0Jc212l9QijauRbqCpts%2FcurrentSessionsToolbar.png?alt=media&#x26;token=7914cf8e-31cc-4c55-b36b-4715a5f40b07" alt=""><figcaption></figcaption></figure>

From left to right, the above indicators are

* Number of active sessions
* Number of connected sessions
* Database activity graph : Are the sessions on CPU, Waiting, … ?
* Number of currently blocked sessions

By simply clicking on a session, you can delve into its details and gain a comprehensive understanding.

<figure><img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2FweU7t8ff6bvL7OTlPrhm%2FcurrentSessions.gif?alt=media&#x26;token=13d42b17-3358-4ee9-a1ba-a4041578b4e5" alt=""><figcaption><p>Current Sessions</p></figcaption></figure>

## Blocking Sessions

The interface displays both blocking and blocked sessions. You can access further session details by clicking on a specific session.

<figure><img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2FXvrHeJfpK6WjqwJVFhYx%2FblockingSessions.gif?alt=media&#x26;token=8a369543-8872-4375-beac-5865ebf129f4" alt=""><figcaption><p>Blocking Sessions</p></figcaption></figure>

{% hint style="info" %}
From the interface, you have the capability to terminate sessions directly.

For the ability to terminate a session, the user currently accessing the interface needs to hold the **read write** or **admin** privilege, and the [monitoring user](https://docs.datasentinel.io/manual/getting-started/postgresql-clusters/monitoring-user) within the PostgreSQL cluster must be granted the role **pg\_signal\_backend**
{% endhint %}

## Relation Statistics Explorer

Opt for your desired database, select the schema, then choose the relation type between

* Table
* Index
* Materialized view
* Foreign table
* View
* Extended Statistics
* Extension
* Function / Proc
* Sequence
* TOAT table

Example of displayed elements for a table

* Columns statistics
* Partitions
* Indexes
* Constraints
* Options
* Extended statistics
* TOAST

<figure><img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2FcaE1H6eFiHMKiLhl9X8w%2Fexplorer.gif?alt=media&#x26;token=72d89317-8830-4da7-ac3c-c07b1165f5ba" alt=""><figcaption><p>Relation Explorer</p></figcaption></figure>

{% hint style="info" %}
For accessing certain internal statistics (such as `pg_statistic_ext` and `pg_stats`), the PostgreSQL user used by Datasentinel must possess specific rights and privileges
{% endhint %}

```sql
// Grant example
GRANT SELECT ON ALL TABLES IN SCHEMA pg_catalog TO datasentinel;
```

## Execution Plans

Select your database and generate an execution plan from any query.

You can choose the **ANALYZE** option to execute the query in order to have its overall and step by step execution time statistics.

{% hint style="info" %}
**ANALYZE** option is only available for **SELECT** statements.

When choosing **ANALYZE**, specify a timeout to set the maximum allowed execution time of the query
{% endhint %}

The execution plan viewer makes it easy and quick to understand each step.

<figure><img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2FHlyqg0FsPyhX4QdvRQOC%2FexecutionPlans.gif?alt=media&#x26;token=6c73384f-9a89-4b92-8061-77cd282f1d94" alt=""><figcaption><p>Execution Plan</p></figcaption></figure>

*The output can be text or json*

## In-Progress Operations

Follow the progress of current operations

<table><thead><tr><th width="233">PostgreSQL Version</th><th>Operation</th></tr></thead><tbody><tr><td>ALL</td><td>VACUUM</td></tr><tr><td>>= 12</td><td>CREATE INDEX</td></tr><tr><td></td><td>CLUSTER</td></tr><tr><td></td><td>VACUUM FULL</td></tr><tr><td>>=13</td><td>ANALYZE</td></tr><tr><td>>=14</td><td>COPY</td></tr></tbody></table>

<figure><img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2FLVKJAdvnWvbogFONwOji%2Fprogress_reporting.gif?alt=media&#x26;token=93affadb-b287-4df2-b120-416b881d6b0f" alt=""><figcaption><p>Progress Reporting</p></figcaption></figure>

## Disk Usage

Disk usage lets you explore the space consumed by relations.

You have the option to either observe the space usage for individual databases or for all of them.

Result can be grouped based on:

* relations
* schemas
* tablespaces

<figure><img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2FgfrvS04Mw9jDVojlfSjj%2FdiskUsage.gif?alt=media&#x26;token=47487825-e943-4069-8e86-96c3582030e3" alt=""><figcaption><p>Disk Usage</p></figcaption></figure>

## Cache Usage

Cache usage lets you explore the space consumed by relations in memory (shared\_buffers)

{% hint style="info" %}
For utilizing this functionality, it's necessary to install the [pg\_buffercache](https://docs.datasentinel.io/manual/getting-started/postgresql-clusters/extensions/pg_buffercache) extension across all databases within your instance.
{% endhint %}

You have the option to either observe the space usage for individual databases or for all of them.

<figure><img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2Fkc54VY4en531DKRDJvqC%2FcacheUsage.gif?alt=media&#x26;token=1783e43b-c981-43fc-8c49-fb3193d64c90" alt=""><figcaption><p>Cache Usage</p></figcaption></figure>
