mirror of
https://github.com/crash-utility/crash
synced 2024-12-13 20:54:32 +00:00
Adjustment to the "offline" patch-set to make the initial system
banner, the "sys" command, and the X86_64 "mach" command, to only show the "OFFLINE" cpu count if there are actually offline cpus. (anderson@redhat.com)
This commit is contained in:
parent
d5b362edf7
commit
00cfb79c04
11
kernel.c
11
kernel.c
@ -4798,9 +4798,14 @@ display_sys_stats(void)
|
||||
|
||||
if (machine_type("PPC64"))
|
||||
fprintf(fp, " CPUS: %d\n", get_cpus_to_display());
|
||||
else
|
||||
fprintf(fp, " CPUS: %d [OFFLINE: %d]\n", kt->cpus,
|
||||
kt->cpus - get_cpus_to_display());
|
||||
else {
|
||||
fprintf(fp, " CPUS: %d", kt->cpus);
|
||||
if (kt->cpus - get_cpus_to_display())
|
||||
fprintf(fp, " [OFFLINE: %d]",
|
||||
kt->cpus - get_cpus_to_display());
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
if (ACTIVE())
|
||||
get_xtime(&kt->date);
|
||||
fprintf(fp, " DATE: %s\n",
|
||||
|
8
x86_64.c
8
x86_64.c
@ -5047,8 +5047,12 @@ x86_64_display_machine_stats(void)
|
||||
|
||||
fprintf(fp, " MACHINE TYPE: %s\n", uts->machine);
|
||||
fprintf(fp, " MEMORY SIZE: %s\n", get_memory_size(buf));
|
||||
fprintf(fp, " CPUS: %d [OFFLINE: %d]\n", kt->cpus,
|
||||
kt->cpus - get_cpus_to_display());
|
||||
fprintf(fp, " CPUS: %d", kt->cpus);
|
||||
if (kt->cpus - get_cpus_to_display())
|
||||
fprintf(fp, " [OFFLINE: %d]\n",
|
||||
kt->cpus - get_cpus_to_display());
|
||||
else
|
||||
fprintf(fp, "\n");
|
||||
if (!STREQ(kt->hypervisor, "(undetermined)") &&
|
||||
!STREQ(kt->hypervisor, "bare hardware"))
|
||||
fprintf(fp, " HYPERVISOR: %s\n", kt->hypervisor);
|
||||
|
Loading…
Reference in New Issue
Block a user