skip to Main Content

Is it possible to get the OS Cassandra is installed on using CQL?

For example in PostgreSQL you can run the query select version(); which will return:

PostgreSQL 11.12 (Debian 11.12-0+deb10u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit

Essentially, it returns the version of PostgreSQL and the OS type installed on.

2

Answers


  1. Unfortunately, it isn’t possible to do this in Cassandra through CQL.

    It isn’t particularly relevant since some deployments are serverless like K8ssandra.io where Cassandra is deployed in Kubernetes.

    There are also some architectures where the coordinators are Stargate.io nodes which are not Cassandra nodes in the cluster. Astra DB is an example of this where it’s serverless and truly cloud-native. Cheers!

    Login or Signup to reply.
  2. Are you using Cassandra 4.0? If so, you should be able to query the os.name key from the system_views.system_properties table:

    > SELECT * FROm system_properties WHERE name='os.name';
    
     name    | value
    ---------+----------
     os.name | Mac OS X
    
    (1 rows)
    

    Although, as Erick pointed out the info isn’t terribly useful. You could be running in an Alpine Linux container on an Ubuntu host, but Cassandra would only have visibility to Alpine.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search