#!/usr/bin/python3 # -*- coding: utf-8 -*- #   import psutil import subprocess def shcmd(cmd): print('\n$', *cmd) try: proc = subprocess.run(cmd, stdout=subprocess.PIPE) print(proc.stdout.decode('utf-8')) except FileNotFoundError: print('not found') return def report(): print('\n', '-'*64, '\nspecifications of the computer\n') print('CPU cores:', psutil.cpu_count(logical=False)) print('memory:', psutil.virtual_memory().total) shcmd(['date', '+%Y/%m/%d %H:%M:%S']) shcmd(['hostname']) shcmd(['whoami']) shcmd(['cat', '/proc/cpuinfo']) shcmd(['cat', '/proc/meminfo']) shcmd(['lsb_release', '-a']) shcmd(['uname', '-a']) shcmd(['sh', '-c', 'lspci | grep -i vga']) shcmd(['nvidia-smi']) shcmd(['nvcc', '-V']) shcmd(['grep', '-A', '2', 'CUDNN_MAJOR', '/usr/local/cuda/include/cudnn_version.h']) if __name__ == '__main__': report()