Below script is useful in getting CPU, memory and core, socket information of a database server from SQL prompt.

SCRIPT:

OUTPUT: