天天看點

檢視linux irq時間,linux – 如何判斷irqbalance是否正在執行任何操作?

在源代碼中,他們引用/ proc幾次.也許你在那裡找到答案.

root @ [/usr/local / src / irqbalance-0.55] egrep -ri“proc | sys”*

activate.c: sprintf(buf, "/proc/irq/%i/smp_affinity", irq->number);

cpumask.h: * set of CPU's in a system, one bit position per CPU number.

cpumask.h: * The following particular system cpumasks and operations manage

cpumask.h: * be plugged in at anytime during the life of that system boot.

cpumask.h:int highest_possible_processor_id(void);

cputree.c: * This file contains the code to construct and manipulate a hierarchy of processors,

cputree.c: * cache domains and processor cores.

cputree.c:#include

cputree.c: dir = opendir("/sys/devices/system/cpu");

cputree.c: sprintf(new_path, "/sys/devices/system/cpu/%s", entry->d_name);

irqbalance.c:#include

irqbalance.c:

irqbalance.c:

irqbalance.c: parse_proc_interrupts();

irqbalance.c: parse_proc_interrupts();

irqbalance.c: parse_proc_interrupts();

irqbalance.c:

irqbalance.h:extern void parse_proc_interrupts(void);

irqlist.c:#include

irqlist.c: * This function classifies and reads various things from /proc about a specific irq

irqlist.c: sprintf(buf, "/proc/irq/%i", number);

irqlist.c: sprintf(buf, "/proc/irq/%i/smp_affinity", number);

Makefile:LIBS=bitmap.o irqbalance.o cputree.o procinterrupts.o irqlist.o placement.o activate.o network.o powermode.o numa.o classify.o

network.c:#include

network.c: sprintf(buffer,"/sys/bus/pci/devices/%s/irq", driver.bus_info);

network.c: file = fopen("/proc/net/dev", "r");

numa.c:#include

numa.c: dir = opendir("/sys/bus/pci/devices");

numa.c: sprintf(line,"/sys/bus/pci/devices/%s/irq", entry->d_name);

numa.c: sprintf(line,"/sys/bus/pci/devices/%s/class", entry->d_name);

numa.c: sprintf(line,"/sys/bus/pci/devices/%s/local_cpus", entry->d_name);

numa.c: * Ethernet gets the type via /proc/net/dev; in addition down'd interfaces

powermode.c: file = fopen("/proc/stat", "r");

powermode.c: dummy = strtoull(c, &c, 10);

procinterrupts.c:void parse_proc_interrupts(void)

procinterrupts.c: file = fopen("/proc/interrupts", "r");