Fix link error on linux.
Fix crash when the monitor is off.
Add config of `num_threads` for civetweb