Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/top/top.c
Show First 20 Lines • Show All 613 Lines • ▼ Show 20 Lines | restart: | ||||
/* get the current set of processes */ | /* get the current set of processes */ | ||||
processes = | processes = | ||||
get_process_info(&system_info, &ps, compare); | get_process_info(&system_info, &ps, compare); | ||||
/* display the load averages */ | /* display the load averages */ | ||||
(*d_loadave)(system_info.last_pid, | (*d_loadave)(system_info.last_pid, | ||||
system_info.load_avg); | system_info.load_avg); | ||||
/* display the battery info (if any) */ | |||||
i_battery(statics.nbatteries, system_info.battery); | |||||
/* display the current time */ | /* display the current time */ | ||||
/* this method of getting the time SHOULD be fairly portable */ | /* this method of getting the time SHOULD be fairly portable */ | ||||
time(&curr_time); | time(&curr_time); | ||||
i_uptime(&system_info.boottime, &curr_time); | i_uptime(&system_info.boottime, &curr_time); | ||||
i_timeofday(&curr_time); | i_timeofday(&curr_time); | ||||
/* display process state breakdown */ | /* display process state breakdown */ | ||||
(*d_procstates)(system_info.p_total, | (*d_procstates)(system_info.p_total, | ||||
▲ Show 20 Lines • Show All 589 Lines • Show Last 20 Lines |