嵌入式开发之syslog和rsyslog构建日志记录

文章介绍了syslogd作为客户端的使用方法,包括配置文件选项、参数传递以及与远程服务器的通信。同时,详细讲解了rsyslog作为服务端的配置,如何接收、存储和区分不同设备的日志。

1.syslogd作客户端

BusyBox v1.20.2 (2022-04-06 16:19:14 CST) multi-call binary.

Usage: syslogd [OPTIONS]

System logging utility

        -n              Run in foreground
        -O FILE         Log to FILE (default:/var/log/messages)
        -l N            Log only messages more urgent than prio N (1-8)
        -S              Smaller output
        -s SIZE         Max size (KB) before rotation (default:200KB, 0=off)
        -b N            N rotated logs to keep (default:1, max=99, 0=purge)
        -R HOST[:PORT]  Log to IP or hostname on PORT (default PORT=514/UDP)
        -L              Log locally and via network (default is network only if -R)
        -D              Drop duplicates
        -C[size_kb]     Log to shared mem buffer (use logread to read it)
        -f FILE         Use FILE as config (default:/etc/syslog.conf)

大概翻译下:

BusyBox v1.20.2 (2022-04-06 16:19:14 CST) multi-call binary.

Usage: syslo
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值