/freebsd-11-stable/lib/libkvm/ |
H A D | kvm_cptime.c | 85 kvm_getcptime(kvm_t *kd, long *cp_time) argument 96 return (getsysctl(kd, "kern.cp_time", cp_time, sizeof(long) * 101 "cannot read cp_time from non-native core"); 110 /* If this kernel has a "cp_time[]" symbol, then just read that. */ 112 if (kvm_read(kd, kvm_cp_time_nl[NL_CP_TIME].n_value, cp_time, 114 _kvm_err(kd, kd->program, "cannot read cp_time array"); 122 * "cp_time[]" by adding up the individual times for each CPU. 128 cp_time[i] = 0; 136 cp_time[ [all...] |
/freebsd-11-stable/include/rpcsvc/ |
H A D | rstat.x | 70 int cp_time[RSTAT_CPUSTATES]; 89 int cp_time[RSTAT_CPUSTATES]; 107 int cp_time[RSTAT_CPUSTATES];
|
/freebsd-11-stable/sys/kern/ |
H A D | kern_clock.c | 101 long cp_time[CPUSTATES]; local 107 read_cpu_time(cp_time); 113 cp_time32[i] = (unsigned int)cp_time[i]; 119 return SYSCTL_OUT(req, 0, sizeof(cp_time)); 120 error = SYSCTL_OUT(req, cp_time, sizeof(cp_time)); 125 SYSCTL_PROC(_kern, OID_AUTO, cp_time, CTLTYPE_LONG|CTLFLAG_RD|CTLFLAG_MPSAFE, 136 long *cp_time; local 153 cp_time = pcpu->pc_cp_time; 155 cp_time 322 read_cpu_time(long *cp_time) argument 709 long *cp_time; local [all...] |
/freebsd-11-stable/usr.bin/systat/ |
H A D | iostat.c | 126 len = sizeof(cur_dev.cp_time); 127 if (sysctlbyname("kern.cp_time", &cur_dev.cp_time, &len, NULL, 0) 128 || len != sizeof(cur_dev.cp_time)) { 129 perror("kern.cp_time"); 256 X(cp_time); 257 etime += cur_dev.cp_time[i]; 342 dtime += cur_dev.cp_time[i]; 347 histogram(100.0 * cur_dev.cp_time[o] / dtime, 50, CPUSCALE);
|
H A D | vmstat.c | 392 Q(cp_time); 745 GETSYSCTL("kern.cp_time", ls->time); 746 GETSYSCTL("kern.cp_time", cur_dev.cp_time);
|
/freebsd-11-stable/usr.sbin/iostat/ |
H A D | iostat.c | 425 bzero(cur.cp_time, sizeof(cur.cp_time)); 490 if (readvar(kd, "kern.cp_time", 0, 491 &cur.cp_time, sizeof(cur.cp_time)) != 0) 494 if (kvm_getcptime(kd, cur.cp_time) < 0) { 611 tmp = cur.cp_time[i]; 612 cur.cp_time[i] -= last.cp_time[i]; 613 last.cp_time[ [all...] |
/freebsd-11-stable/sys/sys/ |
H A D | resource.h | 178 void read_cpu_time(long *cp_time); /* Writes array of CPUSTATES */
|
/freebsd-11-stable/libexec/rpc.rstatd/ |
H A D | rstat_proc.c | 203 if (sysctlbyname("kern.cp_time", bsd_cp_time, &len, 0, 0) < 0) { 204 syslog(LOG_ERR, "sysctl(kern.cp_time): %m"); 208 stats_all.s1.cp_time[i] = bsd_cp_time[cp_time_xlat[i]]; 229 fprintf(stderr, "%d %d %d %d\n", stats_all.s1.cp_time[0], 230 stats_all.s1.cp_time[1], stats_all.s1.cp_time[2], stats_all.s1.cp_time[3]);
|
/freebsd-11-stable/usr.bin/vmstat/ |
H A D | vmstat.c | 714 if (kvm_getcptime(kd, cur.cp_time) < 0) 717 size = sizeof(cur.cp_time); 718 mysysctl("kern.cp_time", &cur.cp_time, &size, NULL, 0); 719 if (size != sizeof(cur.cp_time)) 720 xo_errx(1, "cp_time size mismatch"); 1113 tmp = cur.cp_time[state]; 1114 cur.cp_time[state] -= last.cp_time[state]; 1115 last.cp_time[stat [all...] |
/freebsd-11-stable/release/picobsd/tinyware/ns/ |
H A D | ns.c | 797 static u_int32_t cp_time[5]; local 807 if (sysctlbyname("kern.cp_time", new_cp_time, &l, NULL, 0) < 0) { 808 warn("sysctl: retrieving cp_time length"); 821 bcopy(new_cp_time, cp_time, sizeof(cp_time)); 826 #define X(i) ( (double)(new_cp_time[i] - cp_time[i])*100/shz ) 830 bcopy(new_cp_time, cp_time, sizeof(cp_time));
|
/freebsd-11-stable/lib/libdevstat/ |
H A D | devstat.h | 138 long cp_time[CPUSTATES]; member in struct:statinfo
|
/freebsd-11-stable/usr.bin/ctlstat/ |
H A D | ctlstat.c | 212 long cp_time[CPUSTATES]; local 215 cplen = sizeof(cp_time); 217 if (sysctlbyname("kern.cp_time", &cp_time, &cplen, NULL, 0) == -1) { 218 warn("sysctlbyname(kern.cp_time...) failed"); 222 cpu_stats->user = cp_time[CP_USER]; 223 cpu_stats->nice = cp_time[CP_NICE]; 224 cpu_stats->system = cp_time[CP_SYS]; 225 cpu_stats->intr = cp_time[CP_INTR]; 226 cpu_stats->idle = cp_time[CP_IDL [all...] |
/freebsd-11-stable/sys/compat/linprocfs/ |
H A D | linprocfs.c | 405 long cp_time[CPUSTATES]; local 410 read_cpu_time(cp_time); 413 T2J(cp_time[CP_USER]), 414 T2J(cp_time[CP_NICE]), 415 T2J(cp_time[CP_SYS] /*+ cp_time[CP_INTR]*/), 416 T2J(cp_time[CP_IDLE])); 474 long cp_time[CPUSTATES]; local 478 read_cpu_time(cp_time); 481 T2S(cp_time[CP_IDL [all...] |
/freebsd-11-stable/usr.bin/top/ |
H A D | machine.c | 157 static long cp_time[CPUSTATES]; variable 503 GETSYSCTL("kern.cp_time", cp_time); 511 /* convert cp_time counts to percentages */ 521 percentages(CPUSTATES, cpu_states, cp_time, cp_old, cp_diff);
|