Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.4:Update
powerpc-utils.10293
Revert-lparstat-Show-available-physical-process...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File Revert-lparstat-Show-available-physical-processors-i.patch of Package powerpc-utils.10293
From 5e508839f2b928c83a163975ff6a7e4112926a3d Mon Sep 17 00:00:00 2001 From: Michal Suchanek <msuchanek@suse.de> Date: Mon, 17 Dec 2018 13:45:28 +0100 Subject: [PATCH] Revert "lparstat: Show available physical processors in the shared pool" This reverts commit d1576f88dcc7008bcd3448172caff1b928be1254. --- man/lparstat.8 | 3 -- src/lparstat.c | 75 ++++---------------------------------------------- src/lparstat.h | 10 ------- 3 files changed, 5 insertions(+), 83 deletions(-) diff --git a/man/lparstat.8 b/man/lparstat.8 index 9721580b029f..daa578d122c6 100644 --- a/man/lparstat.8 +++ b/man/lparstat.8 @@ -77,9 +77,6 @@ Shows the percentage of the entitled capacity consumed. Because the time base ov lbusy Shows the percentage of logical processor(s) utilization that occurred while executing at the user and system level. .TP -app -Shows the available physical processors in the shared pool. -.TP phint Shows the number of phantom (targeted to another shared partition in this pool) interruptions received. .SH OPTIONS diff --git a/src/lparstat.c b/src/lparstat.c index ec57c1a22bdc..a3a0155dce2a 100644 --- a/src/lparstat.c +++ b/src/lparstat.c @@ -123,32 +123,6 @@ int get_time_base() return 0; } -void get_sys_uptime(struct sysentry *unused_se, char *uptime) -{ - FILE *f; - char buf[80]; - - f = fopen("/proc/uptime", "r"); - if (!f) { - fprintf(stderr, "Could not open /proc/uptime\n"); - sprintf(uptime, SE_NOT_VALID); - return; - } - - if ((fgets(buf, 80, f)) != NULL) { - char *value; - - value = strchr(buf, ' '); - *value = '\0'; - sprintf(uptime, "%s", buf); - } else { - sprintf(uptime, SE_NOT_VALID); - } - - fclose(f); -} - - void get_cpu_physc(struct sysentry *unused_se, char *buf) { struct sysentry *se; @@ -191,44 +165,6 @@ void get_per_entc(struct sysentry *unused_se, char *buf) sprintf(buf, "%.6f", atof(physc) / atof(entc) * 100.0); } -void get_cpu_app(struct sysentry *unused_se, char *buf) -{ - struct sysentry *se; - float timebase, app, elapsed_time; - long long new_app, old_app, newtime, oldtime; - char *descr, uptime[32]; - - se = get_sysentry("time"); - if (se->old_value[0] == '\0') { - /* Single report since boot */ - get_sysdata("uptime", &descr, uptime); - - if (!strcmp(uptime, SE_NOT_VALID)) { - sprintf(buf, "-"); - return; - } - elapsed_time = atof(uptime); - } else { - newtime = strtoll(se->value, NULL, 0); - oldtime = strtoll(se->old_value, NULL, 0); - elapsed_time = (newtime - oldtime) / 1000000.0; - } - - se = get_sysentry("timebase"); - timebase = atof(se->value); - - se = get_sysentry("pool_idle_time"); - new_app = strtoll(se->value, NULL, 0); - if (se->old_value[0] == '\0') { - old_app = 0; - } else { - old_app = strtoll(se->old_value, NULL, 0); - } - - app = (new_app - old_app)/timebase/elapsed_time; - sprintf(buf, "%.2f", app); -} - int parse_lparcfg() { FILE *f; @@ -601,13 +537,13 @@ int print_iflag_data() void print_default_output(int interval, int count) { - char *fmt = "%5s %5s %5s %8s %8s %5s %5s %5s %5s %5s\n"; + char *fmt = "%5s %5s %5s %8s %8s %5s %5s %5s %5s\n"; char *descr; char buf[128]; int offset; char value[32]; char user[32], sys[32], wait[32], idle[32], physc[32], entc[32]; - char lbusy[32], app[32], vcsw[32], phint[32]; + char lbusy[32], vcsw[32], phint[32]; memset(buf, 0, 128); get_sysdata("shared_processor_mode", &descr, value); @@ -628,9 +564,9 @@ void print_default_output(int interval, int count) fprintf(stdout, "\nSystem Configuration\n%s\n\n", buf); fprintf(stdout, fmt, "\%user", "\%sys", "\%wait", "\%idle", "physc", - "\%entc", "lbusy", "app", "vcsw", "phint"); + "\%entc", "lbusy", "vcsw", "phint"); fprintf(stdout, fmt, "-----", "-----", "-----", "-----", "-----", - "-----", "-----", "-----", "-----", "-----"); + "-----", "-----", "-----", "-----"); do { if (interval) { @@ -647,10 +583,9 @@ void print_default_output(int interval, int count) get_sysdata("physc", &descr, physc); get_sysdata("per_entc", &descr, entc); get_sysdata("phint", &descr, phint); - get_sysdata("app", &descr, app); fprintf(stdout, fmt, user, sys, wait, idle, physc, entc, - lbusy, app, vcsw, phint); + lbusy, vcsw, phint); fflush(stdout); } while (--count > 0); } diff --git a/src/lparstat.h b/src/lparstat.h index 3aee19268f83..7504d87b394a 100644 --- a/src/lparstat.h +++ b/src/lparstat.h @@ -46,8 +46,6 @@ extern void get_smt_mode(struct sysentry *, char *); extern void get_cpu_stat(struct sysentry *, char *); extern void get_cpu_physc(struct sysentry *, char *); extern void get_per_entc(struct sysentry *, char *); -extern void get_cpu_app(struct sysentry *, char *); -extern void get_sys_uptime(struct sysentry *, char *); struct sysentry system_data[] = { /* System Names */ @@ -227,9 +225,6 @@ struct sysentry system_data[] = { {.name = "per_entc", .descr = "Entitled CPU Consumed", .get = &get_per_entc}, - {.name = "app", - .descr = "Available physical CPUs in pool", - .get = &get_cpu_app}, /* Time */ {.name = "time", @@ -243,11 +238,6 @@ struct sysentry system_data[] = { {.name = "phint", .descr = "Phantom Interrupts"}, - /* /proc/uptime */ - {.name = "uptime", - .descr = "System Uptime", - .get = &get_sys_uptime}, - {.name[0] = '\0'}, }; -- 2.19.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor