I have two servers, one with 2xXeon E5-2450v2 and one with 2xXeon E5-2420, both have windows server 2019 installed. A weird issue I've noticed is both servers show 0% cpu usage in both task manager and resource monitor until I run a stress test. Afterwards, the cpu usage shows normally. Is there a solution to this problem?
The issue must've been caused by HPE's firmware, I changed power settings to OS controlled and the proper CPU usage shows up now
I'd say there's no problem with the 0% CPU Usage. One of the responsibilities of the OS is to optimize the use of resources (like CPU), therefore it will try to keep CPU use as low as possible and use the minimum needed to complete the required task.
You assumed 0% would mean the processor is not working at all, but the inaccuracy of the value shown as CPU Usage in Resource Monitor can be misleading. Check this image:
Notice that the sum of the average CPU for each process is bigger than that 4% we see. Knowing that, let's say the sum of average CPU would be 0.89, as a result we'd see 0% CPU Usage.
Please verify the Average CPU instead of CPU Usage next time you see this behaviour and check if I'm wrong. Since your CPU is way faster then the one in the desktop this print was taken and the CPU Usage is shown in percentage, it would not be difficult to have a value lower than 1 during idle time of your server, therefore showing the weird 0% CPU Usage.