De Wiki Clusterlab.com.br
Ir para navegação
Ir para pesquisar
SQLite
Create BASE
sqlite3 base.sb "create table IF NOT EXISTS hosts(endereco varchar(15) , nome varchar(60) primary key,TTL integer, tipo varchar(30))"
Select examples
SELECT DISTINCT
HOSTNAME,
REMOTE_ADDRESS,
REMOTE_PORT,
PROCESS_NAME
FROM
arquitetura
WHERE
STATE == 'ESTABLISHED'
AND
LOCAL_PORT NOT IN (
SELECT DISTINCT
LOCAL_PORT
FROM
arquitetura
WHERE
STATE == 'LISTENING'
AND
LOCAL_ADDRESS <> '127.0.0.1'
)
AND
LOCAL_ADDRESS <> '127.0.0.1'
ORDER BY
'REMOTE_PORT'