vzlist --json: skip collecting numcpu info on old kernel
Non-RHEL6 kernels do not have /proc/vz/fairsched (or --cpus,
for that matter) so we can't collect this information, so let's just skip it.
Before this patch, vzlist output was:
# vzlist --json > /dev/null
Unable to open /proc/vz/fairsched/1193/cpu.nr_cpus: No such file or directory
Unable to open /proc/vz/fairsched/1199/cpu.nr_cpus: No such file or directory
Reported-by: Aleksandar Ivanisevic <aleksandar@ivanisevic.de>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed