# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def get_kallsyms_table(): global kallsyms try: f = open("/proc/kallsyms", "r") linecount = 0 for line in f: linecount = linecount+1 f.seek(0) except: return j = 0 for line in f: loc = int(line.split()[0], 16) name = line.split()[2] j = j +1 if ((j % 100) == 0): print "\r" + str(j) + "/" + str(linecount), kallsyms.append({ 'loc': loc, 'name' : name}) print "\r" + str(j) + "/" + str(linecount) kallsyms.sort() return def get_sym(sloc): loc = int(sloc) for i in kallsyms: if (i['loc'] >= loc): return (i['name'], i['loc']-loc) return (None, 0) def print_drop_table(): print "%25s %25s %25s" % ("LOCATION", "OFFSET", "COUNT") for i in drop_log.keys(): (sym, off) = get_sym(i) if sym == None: sym = i print "%25s %25s %25s" % (sym, off, drop_log[i]) def trace_begin(): print "Starting trace (Ctrl-C to dump results)" def trace_end(): print "Gathering kallsyms data" get_kallsyms_table() print_drop_table() # called from perf, when it finds a correspoinding event def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm, skbaddr, protocol, location): slocation = str(location) try: drop_log[slocation] = drop_log[slocation] + 1 except: drop_log[slocation] = 1 22.y'>linux-2.6.22.y Hosts the 0x221E linux distro kernel.Ubuntu
summaryrefslogtreecommitdiff
path: root/kernel/taskstats.c
AgeCommit message (Expand)Author
2020-11-16treewide: rename nla_strlcpy to nla_strscpy.Francis Laniel
2020-10-02taskstats: move specifying netlink policy back to opsJakub Kicinski
2020-10-02genetlink: move to smaller ops wherever possibleJakub Kicinski
2019-12-04taskstats: fix data-raceChristian Brauner
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157Thomas Gleixner
2019-04-27genetlink: optionally validate strictly/dumpsJohannes Berg
2019-04-27netlink: make validation more configurable for future strictnessJohannes Berg
2019-04-27netlink: make nla_nest_start() add NLA_F_NESTED flagMichal Kubecek
2019-03-22genetlink: make policy common to familyJohannes Berg
2018-02-06pids: introduce find_get_task_by_vpid() helperMike Rapoport
2017-05-08taskstats: add e/u/stime for TGID commandZhang Xiao
2016-11-15Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
2016-11-03taskstats: fix the length of cgroupstats_cmd_get_policyWANG Cong
2016-10-27genetlink: mark families as __ro_after_initJohannes Berg
2016-10-27genetlink: statically initialize familiesJohannes Berg
2016-10-27genetlink: no longer support using static family IDsJohannes Berg
2016-04-23taskstats: use the libnl API to align nlattr on 64-bitNicolas Dichtel
2015-01-18netlink: make nlmsg_end() and genlmsg_end() voidJohannes Berg
2014-11-19kill f_dentry usesAl Viro
2014-08-26scheduler: Replace __get_cpu_var with this_cpu_ptrChristoph Lameter
2013-11-19genetlink: only pass array to genl_register_family_with_ops()Johannes Berg
2013-11-14genetlink: make all genl_ops users constJohannes Berg
2013-11-14taskstats: use genl_register_family_with_ops()Johannes Berg
2013-11-13kernel/taskstats.c: return -ENOMEM when alloc memory fails in add_del_listener()Chen Gang
2013-11-13kernel/taskstats.c: add nla_nest_cancel() for failure processing between nla_...Chen Gang
2012-10-06taskstats: cgroupstats_user_cmd() may leak on errorJesper Juhl
2012-10-02Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vir...Linus Torvalds
2012-10-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds
2012-09-26switch simple cases of fget_light to fdgetAl Viro
2012-09-18userns: Convert taskstats to handle the user and pid namespaces.Eric W. Biederman
2012-09-10netlink: Rename pid to portid to avoid confusionEric W. Biederman