Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support intuitively display #191

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ PMPATHD = /usr/lib/systemd/system-sleep
CFLAGS += -O2 -I. -Wall -Wno-stringop-truncation # -DNOPERFEVENT # -DHTTPSTATS
OBJMOD0 = version.o
OBJMOD1 = various.o deviate.o procdbase.o
OBJMOD2 = acctproc.o photoproc.o photosyst.o rawlog.o ifprop.o parseable.o
OBJMOD2 = acctproc.o photoproc.o photosyst.o rawlog.o ifprop.o parseable.o intuitive.o
OBJMOD3 = showgeneric.o showlinux.o showsys.o showprocs.o
OBJMOD4 = atopsar.o netatopif.o gpucom.o
ALLMODS = $(OBJMOD0) $(OBJMOD1) $(OBJMOD2) $(OBJMOD3) $(OBJMOD4)
Expand Down Expand Up @@ -187,6 +187,7 @@ rawlog.o: atop.h photoproc.h photosyst.h rawlog.h showgeneric.h
various.o: atop.h acctproc.h
ifprop.o: atop.h photosyst.h ifprop.h
parseable.o: atop.h photoproc.h photosyst.h parseable.h
intuitive.o: atop.h photosyst.h showgeneric.h intuitive.h
deviate.o: atop.h photoproc.h photosyst.h
procdbase.o: atop.h photoproc.h
acctproc.o: atop.h photoproc.h atopacctd.h acctproc.h netatop.h
Expand Down
5 changes: 5 additions & 0 deletions atop.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@
#include "photosyst.h"
#include "showgeneric.h"
#include "parseable.h"
#include "intuitive.h"
#include "gpucom.h"

#define allflags "ab:cde:fghijklmnopqrstuvwxyz1ABCDEFGHIJKL:MNOP:QRSTUVWXYZ"
Expand Down Expand Up @@ -594,6 +595,10 @@ main(int argc, char *argv[])
linelen = atoi(optarg);
break;

case 'I': /* intuitively display all statistics at a glance */
vis.show_samp = intuitiveout;
break;

case MALLPROC: /* all processes per sample ? */
deviatonly = 0;
break;
Expand Down
2 changes: 2 additions & 0 deletions deviate.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ deviatsyst(struct sstat *cur, struct sstat *pre, struct sstat *dev,
count_t ticks;

dev->cpu.cpu[i].cpunr = cur->cpu.cpu[i].cpunr;
dev->cpu.cpu[i].numanr = cur->cpu.cpu[i].numanr;
dev->cpu.cpu[i].stime = subcount(cur->cpu.cpu[i].stime,
pre->cpu.cpu[i].stime);
dev->cpu.cpu[i].utime = subcount(cur->cpu.cpu[i].utime,
Expand Down Expand Up @@ -1481,6 +1482,7 @@ totalsyst(char category, struct sstat *new, struct sstat *tot)
for (i=0; i < new->cpu.nrcpu; i++)
{
tot->cpu.cpu[i].cpunr = new->cpu.cpu[i].cpunr;
tot->cpu.cpu[i].numanr = new->cpu.cpu[i].numanr;
tot->cpu.cpu[i].stime += new->cpu.cpu[i].stime;
tot->cpu.cpu[i].utime += new->cpu.cpu[i].utime;
tot->cpu.cpu[i].ntime += new->cpu.cpu[i].ntime;
Expand Down
Loading