#!/bin/sh
set -eu

# Check if the virtual-guest profile is the recommended for a VM
tuned-adm recommend | grep virtual-guest

# Check if the virtual-guest profile is active by default in a VM
tuned-adm active | grep virtual-guest

# Check if the profile was correctly applied
tuned-adm verify

# Change profile
tuned-adm profile postgresql
tuned-adm active | grep postgresql

# Check if the profile was correctly applied
tuned-adm verify

# Change profile again
tuned-adm profile hpc-compute
tuned-adm active | grep hpc-compute

# Check if the profile was correctly applied
tuned-adm verify
