diff --git a/free.c b/free.c index d10ec6c8..87249564 100644 --- a/free.c +++ b/free.c @@ -380,15 +380,15 @@ int main(int argc, char **argv) */ if (flags & FREE_LOHI) { printf("%-7s", _("Low:")); - printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEMLO_TOTAL, ul_int), flags, args)); - printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEMLO_USED, ul_int), flags, args)); - printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEMLO_FREE, ul_int), flags, args)); + printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_LOW_TOTAL, ul_int), flags, args)); + printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_LOW_USED, ul_int), flags, args)); + printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_LOW_FREE, ul_int), flags, args)); printf("\n"); printf("%-7s", _("High:")); - printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEMHI_TOTAL, ul_int), flags, args)); - printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEMHI_USED, ul_int), flags, args)); - printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEMHI_FREE, ul_int), flags, args)); + printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_HIGH_TOTAL, ul_int), flags, args)); + printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_HIGH_USED, ul_int), flags, args)); + printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_HIGH_FREE, ul_int), flags, args)); printf("\n"); } diff --git a/ps/common.h b/ps/common.h index 5bf8cb74..31a2c566 100644 --- a/ps/common.h +++ b/ps/common.h @@ -114,11 +114,11 @@ makEXT(NS_PID) makEXT(NS_USER) makEXT(NS_UTS) makEXT(PRIORITY) +makEXT(PRIORITY_RT) makEXT(PROCESSOR) makEXT(PROCESSOR_NODE) makEXT(RSS) makEXT(RSS_RLIM) -makEXT(RTPRIO) makEXT(SCHED_CLASS) makEXT(SD_MACH) makEXT(SD_OUID) diff --git a/ps/global.c b/ps/global.c index 3ef8926d..c6b107b2 100644 --- a/ps/global.c +++ b/ps/global.c @@ -104,11 +104,11 @@ makREL(NS_PID) makREL(NS_USER) makREL(NS_UTS) makREL(PRIORITY) +makREL(PRIORITY_RT) makREL(PROCESSOR) makREL(PROCESSOR_NODE) makREL(RSS) makREL(RSS_RLIM) -makREL(RTPRIO) makREL(SCHED_CLASS) makREL(SD_MACH) makREL(SD_OUID) diff --git a/ps/output.c b/ps/output.c index ef05b6cc..b5945924 100644 --- a/ps/output.c +++ b/ps/output.c @@ -626,9 +626,9 @@ setREL1(SCHED_CLASS) // default "%u:%u", type, prio // We just print the priority, and have other keywords for type. static int pr_rtprio(char *restrict const outbuf, const proc_t *restrict const pp){ -setREL2(SCHED_CLASS,RTPRIO) +setREL2(SCHED_CLASS,PRIORITY_RT) if(rSv(SCHED_CLASS, s_int, pp)==0 || rSv(SCHED_CLASS, s_int, pp)==-1) return snprintf(outbuf, COLWID, "-"); - return snprintf(outbuf, COLWID, "%d", rSv(RTPRIO, s_int, pp)); + return snprintf(outbuf, COLWID, "%d", rSv(PRIORITY_RT, s_int, pp)); } static int pr_sched(char *restrict const outbuf, const proc_t *restrict const pp){ @@ -1551,7 +1551,7 @@ static const format_struct format_array[] = { /* {"rss", "RSS", pr_rss, PIDS_VM_RSS, 5, XXX, PO|RIGHT}, /* was 5 wide */ {"rssize", "RSS", pr_rss, PIDS_VM_RSS, 5, DEC, PO|RIGHT}, /*rsz*/ {"rsz", "RSZ", pr_rss, PIDS_VM_RSS, 5, BSD, PO|RIGHT}, /*rssize*/ -{"rtprio", "RTPRIO", pr_rtprio, PIDS_RTPRIO, 6, BSD, TO|RIGHT}, +{"rtprio", "RTPRIO", pr_rtprio, PIDS_PRIORITY_RT, 6, BSD, TO|RIGHT}, {"ruid", "RUID", pr_ruid, PIDS_ID_RUID, 5, XXX, ET|RIGHT}, {"ruser", "RUSER", pr_ruser, PIDS_ID_RUSER, 8, U98, ET|USER}, {"s", "S", pr_s, PIDS_STATE, 1, SUN, TO|LEFT}, /*stat,state*/ diff --git a/slabtop.c b/slabtop.c index 8497d6c7..af96a4f0 100644 --- a/slabtop.c +++ b/slabtop.c @@ -44,7 +44,7 @@ #include "strutils.h" #include -#define DEFAULT_SORT SLABNODE_OBJS +#define DEFAULT_SORT SLAB_NUM_OBJS #define CHAINS_ALLOC 150 #define MAXTBL(t) (int)( sizeof(t) / sizeof(t[0]) ) @@ -59,12 +59,12 @@ enum slabinfo_item Sort_item = DEFAULT_SORT; enum slabinfo_sort_order Sort_Order = SLABINFO_SORT_DESCEND; enum slabinfo_item Node_items[] = { - SLABNODE_OBJS, SLABNODE_AOBJS, SLABNODE_USE, - SLABNODE_OBJ_SIZE, SLABNODE_SLABS, SLABNODE_OBJS_PER_SLAB, - SLABNODE_SIZE, SLABNODE_NAME, + SLAB_NUM_OBJS, SLAB_ACTIVE_OBJS, SLAB_PERCENT_USED, + SLAB_OBJ_SIZE, SLAB_NUMS_SLABS, SLAB_OBJ_PER_SLAB, + SLAB_SIZE_TOTAL, SLAB_NAME, /* next 2 are sortable but are not displayable, thus they need not be represented in the Relative_enums */ - SLABNODE_PAGES_PER_SLAB, SLABNODE_ASLABS }; + SLAB_PAGES_PER_SLAB, SLAB_ACTIVE_SLABS }; enum Relative_node { nod_OBJS, nod_AOBJS, nod_USE, nod_OSIZE, @@ -131,35 +131,35 @@ static void set_sort_stuff (const char key) switch (tolower(key)) { case 'n': - Sort_item = SLABNODE_NAME; + Sort_item = SLAB_NAME; Sort_Order = SLABINFO_SORT_ASCEND; break; case 'o': - Sort_item = SLABNODE_OBJS; + Sort_item = SLAB_NUM_OBJS; break; case 'a': - Sort_item = SLABNODE_AOBJS; + Sort_item = SLAB_ACTIVE_OBJS; break; case 's': - Sort_item = SLABNODE_OBJ_SIZE; + Sort_item = SLAB_OBJ_SIZE; break; case 'b': - Sort_item = SLABNODE_OBJS_PER_SLAB; + Sort_item = SLAB_OBJ_PER_SLAB; break; case 'p': - Sort_item = SLABNODE_PAGES_PER_SLAB; + Sort_item = SLAB_PAGES_PER_SLAB; break; case 'l': - Sort_item = SLABNODE_SLABS; + Sort_item = SLAB_NUMS_SLABS; break; case 'v': - Sort_item = SLABNODE_ASLABS; + Sort_item = SLAB_ACTIVE_SLABS; break; case 'c': - Sort_item = SLABNODE_SIZE; + Sort_item = SLAB_SIZE_TOTAL; break; case 'u': - Sort_item = SLABNODE_USE; + Sort_item = SLAB_PERCENT_USED; break; default: break; @@ -207,12 +207,12 @@ static void print_summary (void) { #define totalVAL(e,t) SLABINFO_VAL(e, t, p, Slab_info) enum slabinfo_item items[] = { - SLABS_AOBJS, SLABS_OBJS, - SLABS_ASLABS, SLABS_SLABS, - SLABS_ACACHES, SLABS_CACHES, - SLABS_SIZE_ACTIVE, SLABS_SIZE_TOTAL, - SLABS_SIZE_MIN, SLABS_SIZE_AVG, - SLABS_SIZE_MAX + SLABS_ACTIVE_OBJS, SLABS_NUM_OBJS, + SLABS_ACTIVE_SLABS, SLABS_NUMS_SLABS, + SLABS_CACHES_ACTIVE, SLABS_CACHES_TOTAL, + SLABS_SIZE_ACTIVE, SLABS_SIZE_TOTAL, + SLABS_OBJ_SIZE_MIN, SLABS_OBJ_SIZE_AVG, + SLABS_OBJ_SIZE_MAX }; enum rel_items { tot_AOBJS, tot_OBJS, tot_ASLABS, tot_SLABS, diff --git a/vmstat.c b/vmstat.c index b46812a2..27d2b26a 100644 --- a/vmstat.c +++ b/vmstat.c @@ -143,7 +143,7 @@ static enum diskstats_item Disk_items[] = { DISKSTATS_WRITE_TIME, DISKSTATS_IO_INPROGRESS, DISKSTATS_IO_TIME, - DISKSTATS_IO_WTIME + DISKSTATS_WEIGHTED_TIME }; enum Rel_diskitems { disk_TYPE, disk_NAME, @@ -719,9 +719,9 @@ static void slabformat (void) struct slabinfo_reap *reaped; int i, j; enum slabinfo_item node_items[] = { - SLABNODE_AOBJS, SLABNODE_OBJS, - SLABNODE_OBJ_SIZE, SLABNODE_OBJS_PER_SLAB, - SLABNODE_NAME }; + SLAB_ACTIVE_OBJS, SLAB_NUM_OBJS, + SLAB_OBJ_SIZE, SLAB_OBJ_PER_SLAB, + SLAB_NAME }; enum rel_enums { slab_AOBJS, slab_OBJS, slab_OSIZE, slab_OPS, slab_NAME }; @@ -734,7 +734,7 @@ static void slabformat (void) for (i = 0; infinite_updates || i < num_updates; i++) { if (!(reaped = procps_slabinfo_reap(slab_info, node_items, MAX_ITEMS))) xerrx(EXIT_FAILURE, _("Unable to get slabinfo node data")); - if (!(procps_slabinfo_sort(slab_info, reaped->stacks, reaped->total, SLABNODE_NAME, SLABINFO_SORT_ASCEND))) + if (!(procps_slabinfo_sort(slab_info, reaped->stacks, reaped->total, SLAB_NAME, SLABINFO_SORT_ASCEND))) xerrx(EXIT_FAILURE, _("Unable to sort slab nodes")); for (j = 0; j < reaped->total; j++) {