Commit 02d3e0ef authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files

Update README.md

parent 2d0594cd
......@@ -31,7 +31,7 @@ Access the database with the *psql* client:
> psql -U www-data -h database.hostname.it cadb
### Show the tables
#### Show the tables
```
cadb=# \dt
......@@ -50,3 +50,35 @@ cadb=# \dt
```
#### Describe the service table
```
cadb=# \d service;
Table "public.service"
Column | Type | Collation | Nullable | Default
----------+-----------------------------+-----------+----------+-------------------------------------
id | integer | | not null | nextval('service_id_seq'::regclass)
started | timestamp without time zone | | not null |
expected | timestamp without time zone | | not null |
state | service_state | | |
conf_id | integer | | |
```
#### See what services are in the ACTIVE state and where
```
cadb=# select started,expected,state,srvnam,addr,port from service,srvconf where state='ACTIVE' and service.conf_id=srvconf.conf_id;
started | expected | state | srvnam | addr | port
----------------------------+----------------------------+--------+----------+-----------------+------
2021-09-13 13:35:17.06742 | 2021-09-13 14:03:49.614938 | ACTIVE | pwma-dev | 192.168.205.106 | 9292
2021-09-13 13:35:17.653089 | 2021-09-13 14:03:51.347456 | ACTIVE | puma-01 | 192.168.205.149 | 9292
2021-09-13 13:35:16.584578 | 2021-09-13 14:03:50.332485 | ACTIVE | puma-02 | 192.168.205.157 | 9292
2021-09-13 13:35:17.54277 | 2021-09-13 14:03:49.998209 | ACTIVE | puma-03 | 192.168.205.158 | 9292
2021-09-13 13:35:18.331211 | 2021-09-13 14:03:53.061611 | ACTIVE | puma-04 | 192.168.205.159 | 9292
2021-09-13 13:35:18.383527 | 2021-09-13 14:03:55.726781 | ACTIVE | puma-05 | 192.168.205.166 | 9292
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment