Changeset 516adce in mainline for uspace/app/top
- Timestamp:
- 2010-04-07T10:24:00Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 36b5b0f
- Parents:
- 1ba37fa
- Location:
- uspace/app/top
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/top/Makefile
r1ba37fa r516adce 35 35 screen.c \ 36 36 input.c \ 37 func.c \ 37 38 ps.c 38 39 -
uspace/app/top/screen.c
r1ba37fa r516adce 43 43 #include "screen.h" 44 44 #include "top.h" 45 #include "func.h" 45 46 46 47 int rows; … … 133 134 ++up_rows; 134 135 } 136 } 137 138 static inline void print_meminfo(data_t *data) 139 { 140 uint64_t newsize; 141 char suffix; 142 order(data->mem_info.total, &newsize, &suffix); 143 printf("Mem: %8llu %c total", newsize, suffix); 144 order(data->mem_info.used, &newsize, &suffix); 145 printf(", %8llu %c used", newsize, suffix); 146 order(data->mem_info.free, &newsize, &suffix); 147 printf(", %8llu %c free", newsize, suffix); 135 148 } 136 149 … … 182 195 ++up_rows; 183 196 print_cpuinfo(data); 197 print_meminfo(data); 198 puts("\n"); 199 ++up_rows; 184 200 puts("\n"); 185 201 ++up_rows; -
uspace/app/top/top.c
r1ba37fa r516adce 43 43 #include <sys/time.h> 44 44 #include <load.h> 45 #include <ps.h> 45 46 #include "screen.h" 46 47 #include "input.h" … … 84 85 /* Read cpu infos */ 85 86 target->cpu_count = get_cpu_infos(&target->cpus); 87 88 /* Read mem info */ 89 get_mem_info(&target->mem_info); 86 90 } 87 91 -
uspace/app/top/top.h
r1ba37fa r516adce 68 68 uspace_cpu_info_t *cpus; 69 69 cpu_perc_t *cpu_perc; 70 71 uspace_mem_info_t mem_info; 70 72 } data_t; 71 73
Note:
See TracChangeset
for help on using the changeset viewer.