2
1

More than 5 years have passed since last update.

OpenWrtのログサイズを変更する

Last updated at Posted at 2018-01-06

OpenWrtではsyslogdに当たるものとしてlogdが動いている。デフォルトではログサイズは64K。

これを変更するにはuciコマンドを利用するしかない(と思う)。 LuCIの「System」「System」「Logging」からも設定できるらしいですが、以下はuciコマンドによる設定例です。

# uci set system.@system[0].log_size=1024
# uci commit
# reboot

実際にサイズが変わっていることは次のように確認できる。

# ps | grep logd
  650 root      2284 S    /sbin/logd -S 1024
 2006 root      1188 S    grep logd

logreadで読み出せるログの量も増える。

# logread | wc
     1103     14081    121425

参考資料

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1