@
liwei @
est 多谢告知。感谢已送。
ss.c 里的统计信息似乎还是读取/proc/* 。是我下了错误的版本吗?
$ uname -a
Linux dt 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
$ sudo apt-get source iproute
~/iproute2-3.12.0/misc$ grep -A13 'static FILE \*generic_proc_open' ss.c
static FILE *generic_proc_open(const char *env, const char *name)
{
const char *p = getenv(env);
char store[128];
if (!p) {
p = getenv("PROC_ROOT") ? : "/proc";
snprintf(store, sizeof(store)-1, "%s/%s", p, name);
p = store;
}
return fopen(p, "r");
}