该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
一台ubuntu server的服务器,登录时发现motd信息被打印了两次:
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-32-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Thu Jul 17 11:40:27 CST 2014
System load: 0.06 Processes: 200
Usage of /: 38.3% of 454.39GB Users logged in: 0
Memory usage: 30% IP address for eth0: 192.168.1.188
Swap usage: 0%
Graph this data and manage this system at:
https://landscape.canonical.com/
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-32-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Thu Jul 17 14:21:05 CST 2014
System load: 0.05 Processes: 198
Usage of /: 38.3% of 454.39GB Users logged in: 0
Memory usage: 33% IP address for eth0: 192.168.1.188
Swap usage: 0%
Graph this data and manage this system at:
https://landscape.canonical.com/
No mail.
Last login: Thu Jul 17 11:40:28 2014 from 192.168.1.39
mz@s406ok988:~$
但是我查了一下motd(软连接到/var/run/motd)是没问题的
mz@s406ok988:~$ ll /etc/motd
lrwxrwxrwx 1 root root 21 7月 17 11:34 /etc/motd -> /var/run/motd.dynamic
mz@s406ok988:~$ cat /etc/motd
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-32-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Thu Jul 17 14:21:05 CST 2014
System load: 0.05 Processes: 198
Usage of /: 38.3% of 454.39GB Users logged in: 0
Memory usage: 33% IP address for eth0: 192.168.1.188
Swap usage: 0%
Graph this data and manage this system at:
https://landscape.canonical.com/
mz@s406ok988:~$ run-parts /etc/update-motd.d/
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-32-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of 2014年 07月 17日 星期四 14:25:12 CST
System load: 0.0 Processes: 199
Usage of /: 38.3% of 454.39GB Users logged in: 1
Memory usage: 33% IP address for eth0: 192.168.1.188
Swap usage: 0%
Graph this data and manage this system at:
https://landscape.canonical.com/
mz@s406ok988:~$
可以看到motd的内容是没问题的,并且试了下run-parts,显示输出也对。
mz@s406ok988:~$ run-parts /etc/update-motd.d/
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-32-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of 2014年 07月 17日 星期四 14:25:12 CST
System load: 0.0 Processes: 199
Usage of /: 38.3% of 454.39GB Users logged in: 1
Memory usage: 33% IP address for eth0: 192.168.1.188
Swap usage: 0%
Graph this data and manage this system at:
https://landscape.canonical.com/
mz@s406ok988:~$
不明白为什么登录的时候motd被打印了两次。同样的线上服务器,也是这么配置的,但是有的服务器正常,有的服务器也出现了motd被打印两次,不知道怎么回事