[PATCH v2 09/25] modify display_sys_stats() to hide cpus' number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



function display_sys_stats will display the cpus' total number at initiation
when crash is executed or when command sys is called. With this patch, only
the total number of online cpus will be displayed.

The has 4 cpus and cpu#2 is offline. The original display is like below:
<cut>
      KERNEL: ../kdump/vmlinux
    DUMPFILE: ../kdump/vmcore  [PARTIAL DUMP]
        CPUS: 4
        DATE: Tue Sep 23 14:54:26 2014
      UPTIME: 00:02:45
...
<cut>

With this patch, the output is like below:
<cut>
      KERNEL: ../kdump/vmlinux
    DUMPFILE: ../kdump/vmcore  [PARTIAL DUMP]
        CPUS: 3
        DATE: Tue Sep 23 14:54:26 2014
      UPTIME: 00:02:45
...
<cut>

Signed-off-by: Qiao Nuohan <qiaonuohan@xxxxxxxxxxxxxx>
---
 kernel.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel.c b/kernel.c
index f5f98ca..8f34a3e 100755
--- a/kernel.c
+++ b/kernel.c
@@ -4796,8 +4796,7 @@ display_sys_stats(void)
 				pc->kvmdump_mapfile);
 	}
 	
-	fprintf(fp, "        CPUS: %d\n",
-		machine_type("PPC64") ? get_cpus_to_display() : kt->cpus);
+	fprintf(fp, "        CPUS: %d\n", get_cpus_to_display());
 	if (ACTIVE())
 		get_xtime(&kt->date);
         fprintf(fp, "        DATE: %s\n", 
-- 
1.8.5.3

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux