usr.bin/vmstat.sparc/vmstat.c
/*
 * Print cpu statistics for dovmstat().
 */
Print cpu statistics for dovmstat().
Print cpu statistics for dovmstat () .
void
cpustats()
{
	double pct;
	if (cputime.total)
		pct = 100.0 / cputime.total;
	else
		pct = 0.0;
	(void)printf("%2.0f %2.0f %2.0f",
	    (cputime.delta[CP_USER] + cputime.delta[CP_NICE]) * pct,
	    (cputime.delta[CP_SYS] + cputime.delta[CP_INTR]) * pct,
	    cputime.delta[CP_IDLE] * pct);
}
void cpustats ( ) { double pct ; if ( cputime . total ) pct = 100.0 / cputime . total ; else pct = 0.0 ; ( void ) printf ( " " , ( cputime . delta [ CP_USER ] + cputime . delta [ CP_NICE ] ) * pct , ( cputime . delta [ CP_SYS ] + cputime . delta [ CP_INTR ] ) * pct , cputime . delta [ CP_IDLE ] * pct ) ; }
Print cpu statistics for dovmstat().
Print cpu statistics for dovmstat () .