How To get OS/kernel version in Vertica catalog tables

Create an external table:
dbadmin=> create external table os_version (ver varchar(255)) as copy from '/etc/issue'; -- add node name to copy if you want it from any specific node . or any node
dbadmin@node_1:~$ cat /etc/issue
Ubuntu 18.04.2 LTS \n \l
dbadmin=> select * from os_version;


Ubuntu 18.04.2 LTS n l
(1 row)


  • Options
    Bryan_HBryan_H Vertica Employee Administrator

    The above works on Debian/Ubuntu. For CentOS/RHEL, it's copy from '/etc/redhat-release'
    For kernel build, try copy from '/proc/version'

  • Options
    ChuckBChuckB Vertica Employee Employee

    It's already in the system tables.

    select kernel_release, kernel_version from dc_startups;
    kernel_release | kernel_version
    3.10.0-327.36.1.el7.x86_64 | #1 SMP Sun Sep 18 13:04:29 UTC 2016

    I would caution that a file like /etc/redhat-release is just a text file that can be contrived to say pretty much anything, and is therefore not as useful as the kernel release from /proc... and the kernel release from /proc is already captured in dc_startups.

Sign In or Register to comment.