extern unsigned int flags;
extern unsigned int dm_major;
+extern struct sa_dlist *st_dev_list;
+extern int dlist_idx;
/*
***************************************************************************
sndc = (struct stats_net_dev *) ((char *) a->buf[curr] + i * a->msize);
+ if (dlist_idx) {
+ /* A list of devices has been entered on the command line */
+ if (!search_sa_dlist(st_dev_list, dlist_idx, sndc->interface,
+ A_NET_DEV))
+ /* Device not found */
+ continue;
+ }
+
j = check_net_dev_reg(a, curr, !curr, i);
if (j < 0) {
/* This is a newly registered interface. Previous stats are zero */
snedc = (struct stats_net_edev *) ((char *) a->buf[curr] + i * a->msize);
+ if (dlist_idx) {
+ /* A list of devices has been entered on the command line */
+ if (!search_sa_dlist(st_dev_list, dlist_idx, snedc->interface,
+ A_NET_DEV))
+ /* Device not found */
+ continue;
+ }
+
j = check_net_edev_reg(a, curr, !curr, i);
if (j < 0) {
/* This is a newly registered interface. Previous stats are zero */
extern unsigned int flags;
extern unsigned int dm_major;
+extern struct sa_dlist *st_dev_list;
+extern int dlist_idx;
/*
***************************************************************************
sndc = (struct stats_net_dev *) ((char *) a->buf[curr] + i * a->msize);
+ if (dlist_idx) {
+ /* A list of devices has been entered on the command line */
+ if (!search_sa_dlist(st_dev_list, dlist_idx, sndc->interface,
+ A_NET_DEV))
+ /* Device not found */
+ continue;
+ }
+
printf("%s; %s", timestr, pfield(a->hdr_line, FIRST));
j = check_net_dev_reg(a, curr, !curr, i);
if (j < 0) {
snedc = (struct stats_net_edev *) ((char *) a->buf[curr] + i * a->msize);
+ if (dlist_idx) {
+ /* A list of devices has been entered on the command line */
+ if (!search_sa_dlist(st_dev_list, dlist_idx, snedc->interface,
+ A_NET_DEV))
+ /* Device not found */
+ continue;
+ }
+
printf("%s; %s", timestr, pfield(a->hdr_line, FIRST));
j = check_net_edev_reg(a, curr, !curr, i);
if (j < 0) {
extern unsigned int flags;
extern unsigned int dm_major;
+extern struct sa_dlist *st_dev_list;
+extern int dlist_idx;
/*
***************************************************************************
sndc = (struct stats_net_dev *) ((char *) a->buf[curr] + i * a->msize);
+ if (dlist_idx) {
+ /* A list of devices has been entered on the command line */
+ if (!search_sa_dlist(st_dev_list, dlist_idx, sndc->interface,
+ A_NET_DEV))
+ /* Device not found */
+ continue;
+ }
+
j = check_net_dev_reg(a, curr, !curr, i);
if (j < 0) {
/* This is a newly registered interface. Previous stats are zero */
snedc = (struct stats_net_edev *) ((char *) a->buf[curr] + i * a->msize);
+ if (dlist_idx) {
+ /* A list of devices has been entered on the command line */
+ if (!search_sa_dlist(st_dev_list, dlist_idx, snedc->interface,
+ A_NET_DEV))
+ /* Device not found */
+ continue;
+ }
+
j = check_net_edev_reg(a, curr, !curr, i);
if (j < 0) {
/* This is a newly registered interface. Previous stats are zero */
struct tstamp tm_start, tm_end;
char *args[MAX_ARGV_NR];
+/* Devices entered on the command line */
+struct sa_dlist *st_dev_list = NULL;
+int dlist_idx = 0;
+
extern struct activity *act[];
extern struct report_format *fmt[];
fprintf(stderr, _("Options are:\n"
"[ -C ] [ -c | -d | -g | -j | -p | -r | -x ] [ -H ] [ -h ] [ -T | -t | -U ] [ -V ]\n"
"[ -O <opts> [,...] ] [ -P { <cpu> [,...] | ALL } ]\n"
- "[ -s [ <hh:mm[:ss]> ] ] [ -e [ <hh:mm[:ss]> ] ]\n"
+ "[ --iface=<iface_list> ] [ -s [ <hh:mm[:ss]> ] ] [ -e [ <hh:mm[:ss]> ] ]\n"
"[ -- <sar_options> ]\n"));
exit(1);
}
}
}
+ else if (!strncmp(argv[opt], "--iface=", 8)) {
+ /* Parse devices entered on the command line */
+ parse_sa_devices(argc, argv, &st_dev_list,
+ &dlist_idx, &opt, A_NET_DEV, 8);
+ }
+
else if (!strcmp(argv[opt], "-s")) {
/* Get time start */
if (parse_timestamp(argv, &opt, &tm_start, DEF_TMSTART)) {
extern unsigned int flags;
extern unsigned int dm_major;
+extern struct sa_dlist *st_dev_list;
+extern int dlist_idx;
unsigned int svg_colors[] = {0x00cc00, 0xff00bf, 0x00ffff, 0xff0000,
0xe85f00, 0x0000ff, 0x006020, 0x7030a0,
for (i = 0; i < a->nr[curr]; i++) {
sndc = (struct stats_net_dev *) ((char *) a->buf[curr] + i * a->msize);
+ if (dlist_idx) {
+ /* A list of devices has been entered on the command line */
+ if (!search_sa_dlist(st_dev_list, dlist_idx, sndc->interface,
+ A_NET_DEV))
+ /* Device not found */
+ continue;
+ }
+
/* Look for corresponding graph */
for (k = 0; k < svg_p->nr_max; k++) {
item_name = *(out + k * 9 + 8);
/* Empty structure: This is the end of the list */
break;
+ if (dlist_idx) {
+ /* A list of devices has been entered on the command line */
+ if (!search_sa_dlist(st_dev_list, dlist_idx, snedc->interface,
+ A_NET_DEV))
+ /* Device not found */
+ continue;
+ }
+
/* Look for corresponding graph */
for (k = 0; k < svg_p->nr_max; k++) {
item_name = *(out + k * 10 + 9);
extern unsigned int flags;
extern unsigned int dm_major;
+extern struct sa_dlist *st_dev_list;
+extern int dlist_idx;
/*
***************************************************************************
sndc = (struct stats_net_dev *) ((char *) a->buf[curr] + i * a->msize);
+ if (dlist_idx) {
+ /* A list of devices has been entered on the command line */
+ if (!search_sa_dlist(st_dev_list, dlist_idx, sndc->interface,
+ A_NET_DEV))
+ /* Device not found */
+ continue;
+ }
+
j = check_net_dev_reg(a, curr, !curr, i);
if (j < 0) {
/* This is a newly registered interface. Previous stats are zero */
snedc = (struct stats_net_edev *) ((char *) a->buf[curr] + i * a->msize);
+ if (dlist_idx) {
+ /* A list of devices has been entered on the command line */
+ if (!search_sa_dlist(st_dev_list, dlist_idx, snedc->interface,
+ A_NET_DEV))
+ /* Device not found */
+ continue;
+ }
+
j = check_net_edev_reg(a, curr, !curr, i);
if (j < 0) {
/* This is a newly registered interface. Previous stats are zero */