Monthly Archives: April 2023

Determine the Number of Cores on a VM

Since RedHat/Ubuntu/Debian’s /proc/cpuinfo has a separate entry for each CPU core, you can use this command to count them:cat /proc/cpuinfo | grep processor | wc -l Or do it with the following Python script:—-!/usr/bin/env python3 import osimport psutil l1, l2, l3 = … Continue reading

Posted in Linux | Comments Off on Determine the Number of Cores on a VM

Convert UTF-8 to UTF-16

To convert a UTF-8 encoded file to UTF-16, you can use iconv on the command line: iconv -f utf-8 -t utf-16 oldfile > newfile

Posted in Linux | Comments Off on Convert UTF-8 to UTF-16