summaryrefslogtreecommitdiff
path: root/usr/src/cmd/acctadm/res.c
diff options
context:
space:
mode:
authorEric Cheng <none@none>2008-12-04 18:16:10 -0800
committerEric Cheng <none@none>2008-12-04 18:16:10 -0800
commitda14cebe459d3275048785f25bd869cb09b5307f (patch)
treea394d2c61ec4d7591782a4a5db4e3a157c3ca89a /usr/src/cmd/acctadm/res.c
parent03361682bf38acf5bcc36ee83a0d6277731eee68 (diff)
downloadillumos-joyent-da14cebe459d3275048785f25bd869cb09b5307f.tar.gz
PSARC/2006/357 Crossbow - Network Virtualization and Resource Management
6498311 Crossbow - Network Virtualization and Resource Management 6402493 DLPI provider loopback behavior should be improved 6453165 move mac capabs definitions outside mac.h 6338667 Need ability to use NAT for non-global zones 6692884 several threads hung due to deadlock scenario between aggr and mac 6768302 dls: soft_ring_bind/unbind race can panic in thread_affinity_set with cpu_id == -1 6635849 race between lacp_xmit_sm() and aggr_m_stop() ends in panic 6742712 potential message double free in the aggr driver 6754299 a potential race between aggr_m_tx() and aggr_port_delete() 6485324 mi_data_lock recursively held when enabling promiscuous mode on an aggregation 6442559 Forwarding perf bottleneck due to mac_rx() calls 6505462 assertion failure after removing a port from a snooped aggregation 6716664 need to add src/dst IP address to soft ring fanout --HG-- rename : usr/src/uts/common/io/dls/dls_soft_ring.c => usr/src/uts/common/io/mac/mac_soft_ring.c rename : usr/src/uts/common/inet/ip/ip_cksum.c => usr/src/uts/common/os/ip_cksum.c rename : usr/src/uts/common/inet/sctp_crc32.c => usr/src/uts/common/os/sctp_crc32.c rename : usr/src/uts/common/sys/dls_soft_ring.h => usr/src/uts/common/sys/mac_soft_ring.h
Diffstat (limited to 'usr/src/cmd/acctadm/res.c')
-rw-r--r--usr/src/cmd/acctadm/res.c52
1 files changed, 48 insertions, 4 deletions
diff --git a/usr/src/cmd/acctadm/res.c b/usr/src/cmd/acctadm/res.c
index 844e3641c1..7f9484f12b 100644
--- a/usr/src/cmd/acctadm/res.c
+++ b/usr/src/cmd/acctadm/res.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdlib.h>
#include <stdio.h>
#include <libintl.h>
@@ -89,6 +87,33 @@ static ac_resname_t ac_names[] = {
{ AC_FLOW, AC_FLOW_ANAME, "action" },
/*
+ * Net accounting resources
+ */
+
+ { AC_NET, AC_NET_NAME, "name" },
+ { AC_NET, AC_NET_EHOST, "ehost" },
+ { AC_NET, AC_NET_EDEST, "edest" },
+ { AC_NET, AC_NET_VLAN_TPID, "vlan_pid" },
+ { AC_NET, AC_NET_VLAN_TCI, "vlan_tci" },
+ { AC_NET, AC_NET_SAP, "sap" },
+ { AC_NET, AC_NET_PRIORITY, "priority" },
+ { AC_NET, AC_NET_BWLIMIT, "bwlimit" },
+ { AC_NET, AC_NET_DEVNAME, "devname" },
+ { AC_NET, AC_NET_SADDR, "src_ip" },
+ { AC_NET, AC_NET_DADDR, "dst_ip" },
+ { AC_NET, AC_NET_SPORT, "src_port" },
+ { AC_NET, AC_NET_DPORT, "dst_port" },
+ { AC_NET, AC_NET_PROTOCOL, "protocol" },
+ { AC_NET, AC_NET_DSFIELD, "dsfield" },
+ { AC_NET, AC_NET_CURTIME, "curtime" },
+ { AC_NET, AC_NET_IBYTES, "ibytes" },
+ { AC_NET, AC_NET_OBYTES, "obytes" },
+ { AC_NET, AC_NET_IPKTS, "ipkts" },
+ { AC_NET, AC_NET_OPKTS, "opkts" },
+ { AC_NET, AC_NET_IERRPKTS, "ierrpkts" },
+ { AC_NET, AC_NET_OERRPKTS, "oerrpkts" },
+
+ /*
* These are included for compatibility with old acctadm that
* didn't have resource groups for individual accounting types.
* It was possible to have resource "pid" enabled for task
@@ -134,6 +159,19 @@ static ac_group_t ac_groups[] = {
{ AC_FLOW_SADDR, AC_FLOW_DADDR, AC_FLOW_SPORT, AC_FLOW_DPORT,
AC_FLOW_PROTOCOL, AC_FLOW_NBYTES, AC_FLOW_NPKTS, AC_FLOW_ANAME,
AC_NONE } },
+ { AC_NET, "extended",
+ { AC_NET_NAME, AC_NET_EHOST, AC_NET_EDEST, AC_NET_VLAN_TPID,
+ AC_NET_VLAN_TCI, AC_NET_SAP, AC_NET_PRIORITY,
+ AC_NET_BWLIMIT, AC_NET_DEVNAME, AC_NET_SADDR, AC_NET_DADDR,
+ AC_NET_SPORT, AC_NET_DPORT, AC_NET_PROTOCOL, AC_NET_DSFIELD,
+ AC_NET_CURTIME, AC_NET_IBYTES, AC_NET_OBYTES, AC_NET_IPKTS,
+ AC_NET_OPKTS, AC_NET_IERRPKTS, AC_NET_OERRPKTS, AC_NONE } },
+ { AC_NET, "basic",
+ { AC_NET_NAME, AC_NET_DEVNAME, AC_NET_EHOST, AC_NET_EDEST,
+ AC_NET_VLAN_TPID, AC_NET_VLAN_TCI, AC_NET_SAP,
+ AC_NET_PRIORITY, AC_NET_BWLIMIT, AC_NET_CURTIME, AC_NET_IBYTES,
+ AC_NET_OBYTES, AC_NET_IPKTS, AC_NET_OPKTS, AC_NET_IERRPKTS,
+ AC_NET_OERRPKTS, AC_NONE } },
{ AC_NONE, NULL,
{ AC_NONE } }
};
@@ -202,9 +240,10 @@ printgroups(int type)
{
int header = 0;
- if ((type & AC_PROC) && (type & AC_TASK) && (type & AC_FLOW))
+ if ((type & AC_PROC) && (type & AC_TASK) && (type & AC_FLOW) &&
+ (type & AC_NET)) {
header = 1;
-
+ }
if (type & AC_PROC) {
if (header == 1)
(void) printf("process:\n");
@@ -220,6 +259,11 @@ printgroups(int type)
(void) printf("flow:\n");
printgroup(AC_FLOW);
}
+ if (type & AC_NET) {
+ if (header == 1)
+ (void) printf("net:\n");
+ printgroup(AC_NET);
+ }
}
/*