sasha2002 Blog's

Just another blog from admin's

How To Set CPU Scaling Governor to Max Performance (scaling_governor) —

# cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

To set the scaling_governor to “performance” mode for each CPU, run:

# echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

# echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

# echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

# echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor

To verify configuration, run:

# cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governorperformance
performance
performance
performance

To view and compare current frequency to the min and max scaling, run:

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

3300000

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

1200000

# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq

3210156


Hyper-V can’t start, “‘General access denied error’ (0x80070005)” error message —

‘VMName’: IDE/ATAPI Account does not have sufficient privilege to open attachment
‘E:\VMs\VMName\Disk0.vhd. Error: ‘General access denied error’ (0x80070005). (Virtual
Machine ID 5FC5C385-BD98-451F-B3F3-1E50E06EE663)

Administrator@cmd #
icacls “C:\hyper-v\Virtual Hard Disks\SomeName.vhdx” /grant “NT VIRTUAL MACHINE\6F8DF426-6AA6-42E6-96F1-7591CF9BBD3F”:(F)

https://support.microsoft.com/en-us/help/2249906/hyper-v-virtual-machine-may-not-start-and-you-receive-a-general-access


Install NodeJS and PostgreSQL —

NodeJS :
V8

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

V10

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

PostgreSQL :
Create the file /etc/apt/sources.list.d/pgdg.list, and add a line for the repository
deb http://apt.postgresql.org/pub/repos/apt/ YOUR_UBUNTU_VERSION_HERE-pgdg main
Import the repository signing key, and update the package lists

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
sudo apt-key add -
sudo apt-get update

su – postgres
>
CREATE USER $LOGIN_HERE$ WITH password ‘$PASSWORD_HERE$’;
ALTER ROLE $LOGIN_HERE$ WITH SUPERUSER CREATEDB LOGIN;
CREATE DATABASE $DATABASE_HERE$ WITH OWNER $LOGIN_HERE$;