V2: Make the path to sched_debug path dynamic
Stalld works by reading the /proc/sched_debug file as the main source of information. However, since the 5.13 kernel, the /proc/sched_debug file moved to /sys/kernel/debug/sched/debug due to cleanup in the scheduling debug code.
Instead of trying to read the kernel version. Stalld tries to find sched debug in the known possible locations during the startup, and the first to be found is used. If no file is found, the daemon dies with a suggestive message.
Moreover, to avoid problems of users trying to run stalld as non-root. Fail with a suggestive message.
Edited by Daniel Bristot de Oliveira