| 247 |
|
printw("%5d", stats.user_stats->num_entries); |
| 248 |
|
|
| 249 |
|
/* Mem */ |
| 250 |
– |
|
| 250 |
|
move(6, 12); |
| 251 |
|
printw("%7s", size_conv(stats.mem_stats->total)); |
| 252 |
|
move(7, 12); |
| 314 |
|
network_stat_ptr++; |
| 315 |
|
} |
| 316 |
|
|
| 317 |
+ |
/* Disk */ |
| 318 |
|
disk_stat_ptr = stats.disk_stats; |
| 319 |
|
for(counter=0;counter<stats.disk_entries;counter++){ |
| 320 |
|
move(13+stats.network_entries+counter, 42); |
| 322 |
|
move(13+stats.network_entries+counter, 62); |
| 323 |
|
printw("%7s", size_conv(disk_stat_ptr->avail)); |
| 324 |
|
move(13+stats.network_entries+counter, 73); |
| 325 |
< |
printw("%5.2f%%", 100.00 * ((float)disk_stat_ptr->used / (float)disk_stat_ptr->size)); |
| 325 |
> |
printw("%5.2f%%", 100.00 * ((float) (disk_stat_ptr->size - disk_stat_ptr->avail) / (float) disk_stat_ptr->size)); |
| 326 |
|
disk_stat_ptr++; |
| 327 |
|
} |
| 328 |
|
|
| 353 |
|
} |
| 354 |
|
|
| 355 |
|
void version_num(char *progname){ |
| 356 |
< |
fprintf(stderr, "%s version %s\n", PACKAGE_VERSION); |
| 356 |
> |
fprintf(stderr, "%s version %s\n", progname, PACKAGE_VERSION); |
| 357 |
|
fprintf(stderr, "\nReport bugs to <%s>.\n", PACKAGE_BUGREPORT); |
| 358 |
|
exit(1); |
| 359 |
|
} |