/*
- * rndr_stats.c: Funtions used by sadf to display statistics in selected format.
- * (C) 1999-2020 by Sebastien GODARD (sysstat <at> orange.fr)
+ * rndr_stats.c: Functions used by sadf to display statistics in selected format.
+ * (C) 1999-2022 by Sebastien GODARD (sysstat <at> orange.fr)
*
***************************************************************************
* This program is free software; you can redistribute it and/or modify it *
char *seps[] = {"\t", ";"};
-extern unsigned int flags;
+extern uint64_t flags;
/*
***************************************************************************
else if (rflags & PT_USERND) {
printf("%s%.0f", seps[isdb], dval);
}
- else {
+ else if (rflags & PT_NOFLAG) {
printf("%s%.2f", seps[isdb], dval);
}
if (newline) {
struct stats_cpu *scc, *scp;
unsigned char offline_cpu_bitmap[BITMAP_SIZE(NR_CPUS)] = {0};
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
/* @nr[curr] cannot normally be greater than @nr_ini */
if (a->nr[curr] > a->nr_ini) {
*spc = (struct stats_pcsw *) a->buf[curr],
*spp = (struct stats_pcsw *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
/* The first one as an example */
render(isdb, /* db/ppc flag */
__print_funct_t render_irq_stats(struct activity *a, int isdb, char *pre,
int curr, unsigned long long itv)
{
- int i;
- struct stats_irq *sic, *sip;
- int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ int i, c, first;
+ struct stats_irq *stc_cpu_irq, *stp_cpu_irq, *stc_cpuall_irq;
+ unsigned char masked_cpu_bitmap[BITMAP_SIZE(NR_CPUS)] = {0};
+ char cpu_name[32], ppc_txt[512];
+ double dval;
- for (i = 0; (i < a->nr[curr]) && (i < a->bitmap->b_size + 1); i++) {
+ /* @nr[curr] cannot normally be greater than @nr_ini */
+ if (a->nr[curr] > a->nr_ini) {
+ a->nr_ini = a->nr[curr];
+ }
+
+ /* Identify offline and unselected CPU, and keep persistent statistics values */
+ get_global_int_statistics(a, !curr, curr, flags, masked_cpu_bitmap);
+
+ for (i = 0; i < a->nr2; i++) {
+
+ stc_cpuall_irq = (struct stats_irq *) ((char *) a->buf[curr] + i * a->msize);
+
+ if (a->item_list != NULL) {
+ /* A list of devices has been entered on the command line */
+ if (!search_list_item(a->item_list, stc_cpuall_irq->irq_name))
+ /* Device not found */
+ continue;
+ }
- sic = (struct stats_irq *) ((char *) a->buf[curr] + i * a->msize);
- sip = (struct stats_irq *) ((char *) a->buf[!curr] + i * a->msize);
+ first = TRUE;
+ for (c = 0; (c < a->nr[curr]) && (c < a->bitmap->b_size + 1); c++) {
- /* Should current interrupt (including int "sum") be displayed? */
- if (a->bitmap->b_array[i >> 3] & (1 << (i & 0x07))) {
+ stc_cpu_irq = (struct stats_irq *) ((char *) a->buf[curr] + c * a->msize * a->nr2
+ + i * a->msize);
+ stp_cpu_irq = (struct stats_irq *) ((char *) a->buf[!curr] + c * a->msize * a->nr2
+ + i * a->msize);
+
+ /* Should current CPU (including CPU "all") be displayed? */
+ if (masked_cpu_bitmap[c >> 3] & (1 << (c & 0x07)))
+ /* No */
+ continue;
+
+ /* Compute value to be displayed */
+ dval = S_VALUE(stp_cpu_irq->irq_nr, stc_cpu_irq->irq_nr, itv);
/* Yes: Display it */
- if (!i) {
- /* This is interrupt "sum" */
- render(isdb, pre, pt_newlin,
- "sum\tintr/s", "-1", NULL,
+ if (!c) {
+ strcpy(cpu_name, "all");
+
+ /* If number of int has decreased for CPU "all" then display 0.00 */
+ if (stc_cpu_irq->irq_nr < stp_cpu_irq->irq_nr) {
+ dval = 0.0;
+ }
+ }
+ else {
+ snprintf(cpu_name, sizeof(cpu_name), "cpu%d", c - 1);
+ cpu_name[sizeof(cpu_name) - 1] = '\0';
+ }
+ snprintf(ppc_txt, sizeof(ppc_txt), "%s\t%s", stc_cpuall_irq->irq_name, cpu_name);
+ ppc_txt[sizeof(ppc_txt) - 1] = '\0';
+
+ if (first) {
+ render(isdb, pre, PT_NOFLAG,
+ "%s", "%s",
+ isdb ? cons(sv, stc_cpuall_irq->irq_name, NOVAL)
+ : cons(sv, ppc_txt, NOVAL),
NOVAL,
- S_VALUE(sip->irq_nr, sic->irq_nr, itv),
+ dval,
NULL);
+ first = FALSE;
}
else {
- render(isdb, pre, pt_newlin,
- "i%03d\tintr/s", "%d", cons(iv, i - 1, NOVAL),
+ render(isdb, pre, PT_NOFLAG,
+ "%s", NULL,
+ cons(sv, ppc_txt, NOVAL),
NOVAL,
- S_VALUE(sip->irq_nr, sic->irq_nr, itv),
+ dval,
NULL);
}
}
+ if (isdb && !DISPLAY_HORIZONTALLY(flags)) {
+ /* Print a newline chr and make sure that @pre text will be printed next time */
+ render(isdb, pre, PT_NEWLIN, NULL, NULL, NULL, NOVAL, NOVAL, NULL);
+ }
}
}
*ssc = (struct stats_swap *) a->buf[curr],
*ssp = (struct stats_swap *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\tpswpin/s", NULL, NULL,
*spc = (struct stats_paging *) a->buf[curr],
*spp = (struct stats_paging *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\tpgpgin/s", NULL, NULL,
*sic = (struct stats_io *) a->buf[curr],
*sip = (struct stats_io *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
/*
* If we get negative values, this is probably because
struct stats_memory
*smc = (struct stats_memory *) a->buf[curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
int ptn;
unsigned long long nousedmem;
struct stats_ktables
*skc = (struct stats_ktables *) a->buf[curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_USEINT,
"-\tdentunusd", NULL, NULL,
struct stats_queue
*sqc = (struct stats_queue *) a->buf[curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_USEINT,
"-\trunq-sz", NULL, NULL,
int i, j, j0, found;
struct stats_serial *ssc, *ssp;
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
for (i = 0; i < a->nr[curr]; i++) {
struct ext_disk_stats xds;
char *dev_name;
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
memset(&sdpzero, 0, STATS_DISK_SIZE);
}
/* Get device name */
- dev_name = get_sa_devname(sdc->major, sdc->minor,
- sdc->wwn, sdc->part_nr, flags);
+ dev_name = get_device_name(sdc->major, sdc->minor, sdc->wwn, sdc->part_nr,
+ DISPLAY_PRETTY(flags), DISPLAY_PERSIST_NAME_S(flags),
+ USE_STABLE_ID(flags), NULL);
if (a->item_list != NULL) {
/* A list of devices has been entered on the command line */
render(isdb, pre, PT_NOFLAG,
"%s\ttps", "%s",
- cons(sv, dev_name, NULL),
+ cons(sv, dev_name, NOVAL),
NOVAL,
S_VALUE(sdp->nr_ios, sdc->nr_ios, itv),
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\trkB/s", NULL,
- cons(sv, dev_name, NULL),
+ cons(sv, dev_name, NOVAL),
NOVAL,
S_VALUE(sdp->rd_sect, sdc->rd_sect, itv) / 2,
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\twkB/s", NULL,
- cons(sv, dev_name, NULL),
+ cons(sv, dev_name, NOVAL),
NOVAL,
S_VALUE(sdp->wr_sect, sdc->wr_sect, itv) / 2,
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\tdkB/s", NULL,
- cons(sv, dev_name, NULL),
+ cons(sv, dev_name, NOVAL),
NOVAL,
S_VALUE(sdp->dc_sect, sdc->dc_sect, itv) / 2,
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\tareq-sz", NULL,
- cons(sv, dev_name, NULL),
+ cons(sv, dev_name, NOVAL),
NOVAL,
xds.arqsz / 2,
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\taqu-sz", NULL,
- cons(sv, dev_name, NULL),
+ cons(sv, dev_name, NOVAL),
NOVAL,
S_VALUE(sdp->rq_ticks, sdc->rq_ticks, itv) / 1000.0,
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\tawait", NULL,
- cons(sv, dev_name, NULL),
+ cons(sv, dev_name, NOVAL),
NOVAL,
xds.await,
NULL);
render(isdb, pre, pt_newlin,
"%s\t%%util", NULL,
- cons(sv, dev_name, NULL),
+ cons(sv, dev_name, NOVAL),
NOVAL,
xds.util / 10.0,
NULL);
struct stats_net_dev *sndc, *sndp, sndzero;
double rxkb, txkb, ifutil;
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
memset(&sndzero, 0, STATS_NET_DEV_SIZE);
render(isdb, pre, PT_NOFLAG,
"%s\trxpck/s", "%s",
- cons(sv, sndc->interface, NULL), /* What if the format args are strings? */
+ cons(sv, sndc->interface, NOVAL), /* What if the format args are strings? */
NOVAL,
S_VALUE(sndp->rx_packets, sndc->rx_packets, itv),
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\ttxpck/s", NULL,
- cons(sv, sndc->interface, NULL),
+ cons(sv, sndc->interface, NOVAL),
NOVAL,
S_VALUE(sndp->tx_packets, sndc->tx_packets, itv),
NULL);
rxkb = S_VALUE(sndp->rx_bytes, sndc->rx_bytes, itv);
render(isdb, pre, PT_NOFLAG,
"%s\trxkB/s", NULL,
- cons(sv, sndc->interface, NULL),
+ cons(sv, sndc->interface, NOVAL),
NOVAL,
rxkb / 1024,
NULL);
txkb = S_VALUE(sndp->tx_bytes, sndc->tx_bytes, itv);
render(isdb, pre, PT_NOFLAG,
"%s\ttxkB/s", NULL,
- cons(sv, sndc->interface, NULL),
+ cons(sv, sndc->interface, NOVAL),
NOVAL,
txkb / 1024,
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\trxcmp/s", NULL,
- cons(sv, sndc->interface, NULL),
+ cons(sv, sndc->interface, NOVAL),
NOVAL,
S_VALUE(sndp->rx_compressed, sndc->rx_compressed, itv),
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\ttxcmp/s", NULL,
- cons(sv, sndc->interface, NULL),
+ cons(sv, sndc->interface, NOVAL),
NOVAL,
S_VALUE(sndp->tx_compressed, sndc->tx_compressed, itv),
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\trxmcst/s", NULL,
- cons(sv, sndc->interface, NULL),
+ cons(sv, sndc->interface, NOVAL),
NOVAL,
S_VALUE(sndp->multicast, sndc->multicast, itv),
NULL);
ifutil = compute_ifutil(sndc, rxkb, txkb);
render(isdb, pre, pt_newlin,
"%s\t%%ifutil", NULL,
- cons(sv, sndc->interface, NULL),
+ cons(sv, sndc->interface, NOVAL),
NOVAL,
ifutil,
NULL);
int i, j;
struct stats_net_edev *snedc, *snedp, snedzero;
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
memset(&snedzero, 0, STATS_NET_EDEV_SIZE);
render(isdb, pre, PT_NOFLAG,
"%s\trxerr/s", "%s",
- cons(sv, snedc->interface, NULL),
+ cons(sv, snedc->interface, NOVAL),
NOVAL,
S_VALUE(snedp->rx_errors, snedc->rx_errors, itv),
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\ttxerr/s", NULL,
- cons(sv, snedc->interface, NULL),
+ cons(sv, snedc->interface, NOVAL),
NOVAL,
S_VALUE(snedp->tx_errors, snedc->tx_errors, itv),
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\tcoll/s", NULL,
- cons(sv, snedc->interface, NULL),
+ cons(sv, snedc->interface, NOVAL),
NOVAL,
S_VALUE(snedp->collisions, snedc->collisions, itv),
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\trxdrop/s", NULL,
- cons(sv, snedc->interface, NULL),
+ cons(sv, snedc->interface, NOVAL),
NOVAL,
S_VALUE(snedp->rx_dropped, snedc->rx_dropped, itv),
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\ttxdrop/s", NULL,
- cons(sv, snedc->interface, NULL),
+ cons(sv, snedc->interface, NOVAL),
NOVAL,
S_VALUE(snedp->tx_dropped, snedc->tx_dropped, itv),
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\ttxcarr/s", NULL,
- cons(sv, snedc->interface, NULL),
+ cons(sv, snedc->interface, NOVAL),
NOVAL,
S_VALUE(snedp->tx_carrier_errors, snedc->tx_carrier_errors, itv),
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\trxfram/s", NULL,
- cons(sv, snedc->interface, NULL),
+ cons(sv, snedc->interface, NOVAL),
NOVAL,
S_VALUE(snedp->rx_frame_errors, snedc->rx_frame_errors, itv),
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\trxfifo/s", NULL,
- cons(sv, snedc->interface, NULL),
+ cons(sv, snedc->interface, NOVAL),
NOVAL,
S_VALUE(snedp->rx_fifo_errors, snedc->rx_fifo_errors, itv),
NULL);
render(isdb, pre, pt_newlin,
"%s\ttxfifo/s", NULL,
- cons(sv, snedc->interface, NULL),
+ cons(sv, snedc->interface, NOVAL),
NOVAL,
S_VALUE(snedp->tx_fifo_errors, snedc->tx_fifo_errors, itv),
NULL);
*snnc = (struct stats_net_nfs *) a->buf[curr],
*snnp = (struct stats_net_nfs *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\tcall/s", NULL, NULL,
*snndc = (struct stats_net_nfsd *) a->buf[curr],
*snndp = (struct stats_net_nfsd *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\tscall/s", NULL, NULL,
struct stats_net_sock
*snsc = (struct stats_net_sock *) a->buf[curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_USEINT,
"-\ttotsck", NULL, NULL,
*snic = (struct stats_net_ip *) a->buf[curr],
*snip = (struct stats_net_ip *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\tirec/s", NULL, NULL,
*sneic = (struct stats_net_eip *) a->buf[curr],
*sneip = (struct stats_net_eip *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\tihdrerr/s", NULL, NULL,
*snic = (struct stats_net_icmp *) a->buf[curr],
*snip = (struct stats_net_icmp *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\timsg/s", NULL, NULL,
*sneic = (struct stats_net_eicmp *) a->buf[curr],
*sneip = (struct stats_net_eicmp *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\tierr/s", NULL, NULL,
*sntc = (struct stats_net_tcp *) a->buf[curr],
*sntp = (struct stats_net_tcp *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\tactive/s", NULL, NULL,
*snetc = (struct stats_net_etcp *) a->buf[curr],
*snetp = (struct stats_net_etcp *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\tatmptf/s", NULL, NULL,
*snuc = (struct stats_net_udp *) a->buf[curr],
*snup = (struct stats_net_udp *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\tidgm/s", NULL, NULL,
struct stats_net_sock6
*snsc = (struct stats_net_sock6 *) a->buf[curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_USEINT,
"-\ttcp6sck", NULL, NULL,
*snic = (struct stats_net_ip6 *) a->buf[curr],
*snip = (struct stats_net_ip6 *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\tirec6/s", NULL, NULL,
*sneic = (struct stats_net_eip6 *) a->buf[curr],
*sneip = (struct stats_net_eip6 *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\tihdrer6/s", NULL, NULL,
*snic = (struct stats_net_icmp6 *) a->buf[curr],
*snip = (struct stats_net_icmp6 *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\timsg6/s", NULL, NULL,
*sneic = (struct stats_net_eicmp6 *) a->buf[curr],
*sneip = (struct stats_net_eicmp6 *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\tierr6/s", NULL, NULL,
*snuc = (struct stats_net_udp6 *) a->buf[curr],
*snup = (struct stats_net_udp6 *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\tidgm6/s", NULL, NULL,
int i;
struct stats_pwr_cpufreq *spc;
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
for (i = 0; (i < a->nr[curr]) && (i < a->bitmap->b_size + 1); i++) {
int i;
struct stats_pwr_fan *spc;
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
for (i = 0; i < a->nr[curr]; i++) {
spc = (struct stats_pwr_fan *) ((char *) a->buf[curr] + i * a->msize);
int i;
struct stats_pwr_temp *spc;
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
for (i = 0; i < a->nr[curr]; i++) {
spc = (struct stats_pwr_temp *) ((char *) a->buf[curr] + i * a->msize);
int i;
struct stats_pwr_in *spc;
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
for (i = 0; i < a->nr[curr]; i++) {
spc = (struct stats_pwr_in *) ((char *) a->buf[curr] + i * a->msize);
struct stats_huge
*smc = (struct stats_huge *) a->buf[curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_USEINT,
"-\tkbhugfree", NULL, NULL,
struct stats_pwr_wghfreq *spc, *spp, *spc_k, *spp_k;
unsigned long long tis, tisfreq;
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
for (i = 0; (i < a->nr[curr]) && (i < a->bitmap->b_size + 1); i++) {
{
int i;
struct stats_filesystem *sfc;
+ char *dev_name;
+ int pt_newlin
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
for (i = 0; i < a->nr[curr]; i++) {
sfc = (struct stats_filesystem *) ((char *) a->buf[curr] + i * a->msize);
+ /* Get name to display (persistent or standard fs name, or mount point) */
+ dev_name = get_fs_name_to_display(a, flags, sfc);
+
if (a->item_list != NULL) {
/* A list of devices has been entered on the command line */
- if (!search_list_item(a->item_list,
- DISPLAY_MOUNT(a->opt_flags) ? sfc->mountp : sfc->fs_name))
+ if (!search_list_item(a->item_list, dev_name))
/* Device not found */
continue;
}
render(isdb, pre, PT_USERND,
"%s\tMBfsfree",
"%s",
- cons(sv, DISPLAY_MOUNT(a->opt_flags) ? sfc->mountp : sfc->fs_name, NOVAL),
+ cons(sv, dev_name, NOVAL),
NOVAL,
(double) sfc->f_bfree / 1024 / 1024,
NULL);
render(isdb, pre, PT_USERND,
"%s\tMBfsused",
NULL,
- cons(sv, DISPLAY_MOUNT(a->opt_flags) ? sfc->mountp : sfc->fs_name, NOVAL),
+ cons(sv, dev_name, NOVAL),
NOVAL,
(double) (sfc->f_blocks - sfc->f_bfree) / 1024 / 1024,
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\t%%fsused",
NULL,
- cons(sv, DISPLAY_MOUNT(a->opt_flags) ? sfc->mountp : sfc->fs_name, NOVAL),
+ cons(sv, dev_name, NOVAL),
NOVAL,
sfc->f_blocks ? SP_VALUE(sfc->f_bfree, sfc->f_blocks, sfc->f_blocks)
: 0.0,
render(isdb, pre, PT_NOFLAG,
"%s\t%%ufsused",
NULL,
- cons(sv, DISPLAY_MOUNT(a->opt_flags) ? sfc->mountp : sfc->fs_name, NOVAL),
+ cons(sv, dev_name, NOVAL),
NOVAL,
sfc->f_blocks ? SP_VALUE(sfc->f_bavail, sfc->f_blocks, sfc->f_blocks)
: 0.0,
render(isdb, pre, PT_USEINT,
"%s\tIfree",
NULL,
- cons(sv, DISPLAY_MOUNT(a->opt_flags) ? sfc->mountp : sfc->fs_name, NOVAL),
+ cons(sv, dev_name, NOVAL),
sfc->f_ffree,
NOVAL,
NULL);
render(isdb, pre, PT_USEINT,
"%s\tIused",
NULL,
- cons(sv, DISPLAY_MOUNT(a->opt_flags) ? sfc->mountp : sfc->fs_name, NOVAL),
+ cons(sv, dev_name, NOVAL),
sfc->f_files - sfc->f_ffree,
NOVAL,
NULL);
- render(isdb, pre,
- (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN),
+ render(isdb, pre, pt_newlin,
"%s\t%%Iused",
NULL,
- cons(sv, DISPLAY_MOUNT(a->opt_flags) ? sfc->mountp : sfc->fs_name, NOVAL),
+ cons(sv, dev_name, NOVAL),
NOVAL,
sfc->f_files ? SP_VALUE(sfc->f_ffree, sfc->f_files, sfc->f_files)
: 0.0,
{
int i, j, j0, found;
struct stats_fchost *sfcc, *sfcp, sfczero;
+ int pt_newlin
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
memset(&sfczero, 0, sizeof(struct stats_fchost));
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\tfch_txf/s", NULL,
- cons(sv, sfcc->fchost_name, NULL),
+ cons(sv, sfcc->fchost_name, NOVAL),
NOVAL,
S_VALUE(sfcp->f_txframes, sfcc->f_txframes, itv),
NULL);
render(isdb, pre, PT_NOFLAG,
"%s\tfch_rxw/s", NULL,
- cons(sv, sfcc->fchost_name, NULL),
+ cons(sv, sfcc->fchost_name, NOVAL),
NOVAL,
S_VALUE(sfcp->f_rxwords, sfcc->f_rxwords, itv),
NULL);
- render(isdb, pre,
- (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN),
+ render(isdb, pre, pt_newlin,
"%s\tfch_txw/s", NULL,
- cons(sv, sfcc->fchost_name, NULL),
+ cons(sv, sfcc->fchost_name, NOVAL),
NOVAL,
S_VALUE(sfcp->f_txwords, sfcc->f_txwords, itv),
NULL);
struct stats_softnet *ssnc, *ssnp;
unsigned char offline_cpu_bitmap[BITMAP_SIZE(NR_CPUS)] = {0};
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
/* @nr[curr] cannot normally be greater than @nr_ini */
if (a->nr[curr] > a->nr_ini) {
S_VALUE(ssnp->received_rps, ssnc->received_rps, itv),
NULL);
- render(isdb, pre, pt_newlin,
+ render(isdb, pre, PT_NOFLAG,
"all\tflw_lim/s",
NULL, NULL,
NOVAL,
S_VALUE(ssnp->flow_limit, ssnc->flow_limit, itv),
NULL);
+
+ render(isdb, pre, PT_USEINT | pt_newlin,
+ "all\tblg_len",
+ NULL, NULL,
+ ssnc->backlog_len,
+ DNOVAL,
+ NULL);
}
else {
render(isdb, pre, PT_NOFLAG,
S_VALUE(ssnp->received_rps, ssnc->received_rps, itv),
NULL);
- render(isdb, pre, pt_newlin,
+ render(isdb, pre, PT_NOFLAG,
"cpu%d\tflw_lim/s",
NULL, cons(iv, i - 1, NOVAL),
NOVAL,
S_VALUE(ssnp->flow_limit, ssnc->flow_limit, itv),
NULL);
+
+ render(isdb, pre, PT_USEINT | pt_newlin,
+ "cpu%d\tblg_len",
+ NULL, cons(iv, i - 1, NOVAL),
+ ssnc->backlog_len,
+ DNOVAL,
+ NULL);
}
}
}
*psic = (struct stats_psi_cpu *) a->buf[curr],
*psip = (struct stats_psi_cpu *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\t%scpu-10", NULL, NULL,
*psic = (struct stats_psi_io *) a->buf[curr],
*psip = (struct stats_psi_io *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\t%sio-10", NULL, NULL,
*psic = (struct stats_psi_mem *) a->buf[curr],
*psip = (struct stats_psi_mem *) a->buf[!curr];
int pt_newlin
- = (DISPLAY_HORIZONTALLY(flags) ? PT_NOFLAG : PT_NEWLIN);
+ = PT_NOFLAG + (DISPLAY_HORIZONTALLY(flags) ? 0 : PT_NEWLIN);
render(isdb, pre, PT_NOFLAG,
"-\t%smem-10", NULL, NULL,