1

E.g. for crontab. I don't want to parse it. I want to run a sql query vs (as a minimum) a jdbc-compliant connection (automagically provided provided by Linux, that returns exactly that).

But I mean - not just for crontab. The more the merrier. devices, services. I understand some of this is ultimately backed by files on the filesystem, but I don't care, I would like a relational abstraction on top, for free, now :-).

I find string parsing files for info is tedious and I would prefer good old sql to get the info I need.

Does anything even related to this exist already?

Otherwise, is this a bad idea? If yes, why?

3 Answers3

2

Have a look at osquery which provides an SQL interface to many system areas, including crontab. It is cross-platform and free.

From the osquery website:

osquery allows you to easily ask questions about your Linux, Windows, and macOS infrastructure. Whether your goal is intrusion detection, infrastructure reliability, or compliance, osquery gives you the ability to empower and inform a broad set of organizations within your company.

0

The closest interface I can think of for this would be through the SMTP protocol.

I can't think of any way to securely implement an interface that could be queried using SQL.

There are programs that can store log records in a a database. It you are looking to query log data, look for log analysis tools.

BillThor
  • 11,345
  • 2
  • 28
  • 25
0

This is a bad idea - it would seem to me to actually border on non-sensical, as the information held by Linux is, for the most part, not amenable to a relational database representation.

You talk about finding string parsing of files difficult - but its unclear what you mean here. Certainly most artifacts in Linux can be accessed as files, however there are front-end tools to work with and manipulate these.

Tangenially related - WinFS - seems to have been an attempt to make a database filesystem by Microsoft, which appears to have never come to fruition. the Wikipedia entry is an interesting read, but even should this exist it would not be a full interface to an OS, rather an interface to a filesystem.

I was unable to find any projects which do it under Linux, but I posit it would theoretically be possible to create a Linux shell which (possibly in combination with FUSE). I did find a project names GLSCube - which would have seen something analogous [ for the handling of files ] - although not SQL based - but it appears to have been stillborn.

davidgo
  • 73,366