我在中包含了以下tcp_cubic.c printk语句
static u32 bictcp_recalc_ssthresh(struct sock *sk)
{
..
if (tp->snd_cwnd < ca->last_max_cwnd && fast_convergence)
ca->last_max_cwnd = (tp->snd_cwnd * (BICTCP_BETA_SCALE + beta))
/ (2 * BICTCP_BETA_SCALE);
else
ca->last_max_cwnd = tp->snd_cwnd;
ca->loss_cwnd = tp->snd_cwnd;
printk(KERN_INFO "ssthresh is %s", snd_cwnd); // <<<--- here
return max((tp->snd_cwnd * beta) / BICTCP_BETA_SCALE, 2U);
}但是它没有打印dmesg或syslog中的值。为什么会这样呢?
发布于 2012-04-11 07:29:27
例如,在Linux3.1中,DEFAULT_MESSAGE_LOGLEVEL值为4,KERN_INFO值为6。尝试使用类似于KERN_ALERT (值为1)的内容打印。
您可以通过读取/修改这个proc文件来检查或更改默认的日志级别:
cat /proc/sys/kernel/printk 有关此文件的更多信息,请参见man 5 proc。
https://stackoverflow.com/questions/10101557
复制相似问题