Retrieve CPU and Memory Information on FreeBSD

Server running slow and how to check CPU/Processor and RAM/Memory info on FreeBSD? There are couple of ways to retrieve the information, by dmesg or sysctl.

Check CPU/Processor Speed on FreeBSD

Get CPU info by sysctl;

Get CPU info by dmesg boot message;

Check Total Memory/RAM on FreeBSD

Get Memory/RAM information from dmesg boot message;