Last active
April 22, 2022 09:47
-
-
Save agmmnn/1b034b66b090086480416f4323ffe095 to your computer and use it in GitHub Desktop.
Google Colab Machine Hardware Info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "Colab Machine Hardware Info", | |
"provenance": [], | |
"collapsed_sections": [], | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
}, | |
"accelerator": "GPU" | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/agmmnn/1b034b66b090086480416f4323ffe095/colab-machine-hardware-info.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"print('# CPU:')\n", | |
"# !lscpu\n", | |
"!cat /proc/cpuinfo | egrep -m 1 \"^model name\"\n", | |
"!cat /proc/cpuinfo | egrep -m 1 \"^cpu MHz\"\n", | |
"!cat /proc/cpuinfo | egrep -m 1 \"^cpu cores\"\n", | |
"!cat /proc/cpuinfo | egrep -m 1 \"^cache size\"\n", | |
"\n", | |
"print('\\n# OS:')\n", | |
"!cat /etc/*-release | egrep \"^DISTRIB_ID\"\n", | |
"!cat /etc/*-release | egrep \"^DISTRIB_RELEASE\"\n", | |
"!cat /etc/*-release | egrep \"^DISTRIB_CODENAME\"\n", | |
"!cat /etc/*-release | egrep \"^DISTRIB_DESCRIPTION\"\n", | |
"!cat /etc/*-release | egrep \"^VERSION\"\n", | |
"\n", | |
"print('\\n# Kernel:')\n", | |
"# !cat /proc/version\n", | |
"!uname -a\n", | |
"\n", | |
"print('\\n# RAM:')\n", | |
"!free -h --si | awk '/Mem:/{print $2}'\n", | |
"!cat /proc/meminfo | egrep \"^MemTotal\"\n", | |
"!cat /proc/meminfo | egrep \"^MemFree\"\n", | |
"!cat /proc/meminfo | egrep \"^MemAvailable\"\n", | |
"\n", | |
"print('\\n# GPU:')\n", | |
"!nvidia-smi -L\n", | |
"!nvidia-smi\n", | |
"\n", | |
"print('\\n# NVIDIA Cuda Compiler Driver:')\n", | |
"!nvcc --version\n", | |
"\n", | |
"print('\\n# Storage:')\n", | |
"# !df -h / | awk '{print $4}'\n", | |
"!df -h" | |
], | |
"metadata": { | |
"id": "Kt8h_lsKZA0H", | |
"outputId": "dddfa1f6-e957-413b-ca82-d4455297a50f", | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
} | |
}, | |
"execution_count": 1, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"# CPU:\n", | |
"model name\t: Intel(R) Xeon(R) CPU @ 2.00GHz\n", | |
"cpu MHz\t\t: 2000.156\n", | |
"cpu cores\t: 1\n", | |
"cache size\t: 39424 KB\n", | |
"\n", | |
"# OS:\n", | |
"DISTRIB_ID=Ubuntu\n", | |
"DISTRIB_RELEASE=18.04\n", | |
"DISTRIB_CODENAME=bionic\n", | |
"DISTRIB_DESCRIPTION=\"Ubuntu 18.04.5 LTS\"\n", | |
"VERSION=\"18.04.5 LTS (Bionic Beaver)\"\n", | |
"VERSION_ID=\"18.04\"\n", | |
"VERSION_CODENAME=bionic\n", | |
"\n", | |
"# Kernel:\n", | |
"Linux bb126877e84a 5.4.144+ #1 SMP Tue Dec 7 09:58:10 PST 2021 x86_64 x86_64 x86_64 GNU/Linux\n", | |
"\n", | |
"# RAM:\n", | |
"13G\n", | |
"MemTotal: 13302912 kB\n", | |
"MemFree: 10697940 kB\n", | |
"MemAvailable: 12462048 kB\n", | |
"\n", | |
"# GPU:\n", | |
"GPU 0: Tesla T4 (UUID: GPU-388114a9-9165-5c6e-e5db-c90475e242e2)\n", | |
"Thu Apr 21 19:06:36 2022 \n", | |
"+-----------------------------------------------------------------------------+\n", | |
"| NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version: 11.2 |\n", | |
"|-------------------------------+----------------------+----------------------+\n", | |
"| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |\n", | |
"| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n", | |
"| | | MIG M. |\n", | |
"|===============================+======================+======================|\n", | |
"| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n", | |
"| N/A 36C P8 9W / 70W | 0MiB / 15109MiB | 0% Default |\n", | |
"| | | N/A |\n", | |
"+-------------------------------+----------------------+----------------------+\n", | |
" \n", | |
"+-----------------------------------------------------------------------------+\n", | |
"| Processes: |\n", | |
"| GPU GI CI PID Type Process name GPU Memory |\n", | |
"| ID ID Usage |\n", | |
"|=============================================================================|\n", | |
"| No running processes found |\n", | |
"+-----------------------------------------------------------------------------+\n", | |
"\n", | |
"# NVIDIA Cuda Compiler Driver:\n", | |
"nvcc: NVIDIA (R) Cuda compiler driver\n", | |
"Copyright (c) 2005-2020 NVIDIA Corporation\n", | |
"Built on Mon_Oct_12_20:09:46_PDT_2020\n", | |
"Cuda compilation tools, release 11.1, V11.1.105\n", | |
"Build cuda_11.1.TC455_06.29190527_0\n", | |
"\n", | |
"# Storage:\n", | |
"Filesystem Size Used Avail Use% Mounted on\n", | |
"overlay 79G 40G 39G 52% /\n", | |
"tmpfs 64M 0 64M 0% /dev\n", | |
"shm 5.7G 0 5.7G 0% /dev/shm\n", | |
"/dev/root 2.0G 1.2G 817M 59% /sbin/docker-init\n", | |
"tmpfs 6.4G 40K 6.4G 1% /var/colab\n", | |
"/dev/sda1 86G 45G 42G 52% /opt/bin/.nvidia\n", | |
"tmpfs 6.4G 0 6.4G 0% /proc/acpi\n", | |
"tmpfs 6.4G 0 6.4G 0% /proc/scsi\n", | |
"tmpfs 6.4G 0 6.4G 0% /sys/firmware\n" | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment