Skip to content


Subversion checkout URL

You can clone with
Download ZIP
sysql - use sql queries against output of linux commands
Python Shell
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


sysql - use sql queries against output of linux commands


Display help and list of available commands:


Display output of ps command:

sysql ps

Query output of lsblk command:

sysql -q "SELECT device,uuid,filesystem FROM lsblk" lsblk 

Query output of several commands:

sysql -q "SELECT, ps.command, ps.elapsed_time, FROM ps JOIN lsof ON = WHERE name LIKE '%LISTEN%'" ps -e --- lsof -Pni4

Here is why I wrote it:

  • No need to remember command syntax to format command output - just select necessary fields in SQL query

  • No need to know sed, awk, head, join and other linux commands to manipulate with output - it's all SQLite

  • Table data is stored with meaningful column name and type (int, text, float, datetime etc)

  • All power of SQL can be used to query output (JOIN, WHERE, GROUP BY etc.)

  • To support new command, output parser must be developed only once and then can be shared with community to make life easier

  • All supported commands are kept in one place as set of python files, so it is easy to find out how to customize existing parsers or create new ones

Something went wrong with that request. Please try again.