How are you logging in as my-host?
If it's with su, I found that /run/user/$UID isn't created and XDG_RUNTIME_DIR isn't updated.
user ~ $ echo $XDG_RUNTIME_DIR $UID
user ~ $ su my-host
my-host ~ $ echo $XDG_RUNTIME_DIR $UID
/run/user/1000 1001 <-- Mismatch here!
my-host ~ $ systemctl --user status
Failed to ...
I just ran into this in the very same EC2 AMI when trying to install a package from source. Like you, I had also updated my pip from the default that comes with the python36 package, although only the per-user module, not with sudo.
I fixed this by simply reverting to the default version.
python3 -m pip install pip==9.0.3
I was installing alembic==1.4.2 (...
I don't know what statistics you want exactly but here are some commands you can use:
top is an interactive command, it's very similar to the task manager in windows but as a cli program, it lists processes with their CPU% and MEM% usage in real time along with other useful statistics.
for RAM usage you can use
for disk space usage
You might have to script something. To get these values, you can use these commands:
cat /proc/loadavg # System load.
df -h # Free disk space on / (also in %).
free -h # Free memory. You have to calculate the % yourself
grep Swap /proc/meminfo # Shows swap information.
As always with linux, there are plenty of ways doing it and this gives the requested ...