mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
top(1): show CPU state breakdown on first run
There is no documented reason for this not to be shown on the first run. I can't find any good reason, and it breaks batch mode. PR: 218889 Submitted by: "Jeremy C. Reed" <[email protected]>
This commit is contained in:
1 parent
6014f3c446
commit
becfb1625c
1 file changed
+1
-20
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335576
+1
-20
@@ -243,7 +243,6 @@ main(int argc, char *argv[])
|
||||
int preset_argc = 0;
|
||||
const char **av = NULL;
|
||||
int ac = -1;
|
||||
bool dostates = false;
|
||||
bool do_unames = true;
|
||||
char interactive = 2;
|
||||
char warnings = 0;
|
||||
@@ -641,25 +640,7 @@ restart:
|
||||
/* display process state breakdown */
|
||||
(*d_procstates)(system_info.p_total,
|
||||
system_info.procstates);
|
||||
|
||||
/* display the cpu state percentage breakdown */
|
||||
if (dostates) /* but not the first time */
|
||||
{
|
||||
(*d_cpustates)(system_info.cpustates);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* we'll do it next time */
|
||||
if (smart_terminal)
|
||||
{
|
||||
z_cpustates();
|
||||
}
|
||||
else
|
||||
{
|
||||
putchar('\n');
|
||||
}
|
||||
dostates = true;
|
||||
}
|
||||
(*d_cpustates)(system_info.cpustates);
|
||||
|
||||
/* display memory stats */
|
||||
(*d_memory)(system_info.memory);
|
||||
|
||||
Reference in new issue
Block a user