summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.examples/network/nettop.stp
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2009-04-08 12:29:29 -0400
committerFrank Ch. Eigler <fche@elastic.org>2009-04-08 12:29:29 -0400
commitcfde3cb1fdda81a5156df2f39201518d815c2710 (patch)
treecf8b7fc370503388c028ad75c39c8597e017c2e0 /testsuite/systemtap.examples/network/nettop.stp
parent3dd58c2ac312fc16aa38124987081adbd6697629 (diff)
downloadsystemtap-steved-cfde3cb1fdda81a5156df2f39201518d815c2710.tar.gz
systemtap-steved-cfde3cb1fdda81a5156df2f39201518d815c2710.tar.xz
systemtap-steved-cfde3cb1fdda81a5156df2f39201518d815c2710.zip
tweak nettop.stp demo to sort by accumulated counts despite merging
Diffstat (limited to 'testsuite/systemtap.examples/network/nettop.stp')
-rwxr-xr-xtestsuite/systemtap.examples/network/nettop.stp8
1 files changed, 4 insertions, 4 deletions
diff --git a/testsuite/systemtap.examples/network/nettop.stp b/testsuite/systemtap.examples/network/nettop.stp
index b84e4882..e96548f1 100755
--- a/testsuite/systemtap.examples/network/nettop.stp
+++ b/testsuite/systemtap.examples/network/nettop.stp
@@ -19,11 +19,11 @@ function print_activity()
"PID", "UID", "DEV", "XMIT_PK", "RECV_PK",
"XMIT_KB", "RECV_KB", "COMMAND")
- foreach ([pid, dev, exec, uid] in ifrecv-) {
- ifmerged[pid, dev, exec, uid] = 1;
+ foreach ([pid, dev, exec, uid] in ifrecv) {
+ ifmerged[pid, dev, exec, uid] += @count(ifrecv[pid,dev,exec,uid]);
}
- foreach ([pid, dev, exec, uid] in ifxmit-) {
- ifmerged[pid, dev, exec, uid] = 1;
+ foreach ([pid, dev, exec, uid] in ifxmit) {
+ ifmerged[pid, dev, exec, uid] += @count(ifxmit[pid,dev,exec,uid]);
}
foreach ([pid, dev, exec, uid] in ifmerged-) {
n_xmit = @count(ifxmit[pid, dev, exec, uid])