覺得輸入完帳號、密碼到 prompt 出現速度實在有點太慢,檢查了 .bashrc 發現在 bash_completion 之前,還有 script 拖到時間。
每次登入都會看到這個畫面,:
Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.9.3-x86 i686)
* Documentation: https://help.ubuntu.com/
System information as of Wed Oct 23 09:35:28 CST 2013
System load: 0.66 Processes: 163
Usage of /: 65.8% of 46.01GB Users logged in: 0
Memory usage: 39% IP address for eth0: 127.0.0.1
Swap usage: 10%
Graph this data and manage this system at https://landscape.canonical.com/
Last login: Wed Oct 23 09:30:26 2013 from some.where.net
除了 uptime 以外,還會有需要更新的套件數量統計,不禁懷疑是否就是統計套件更新數量在慢。
先搜尋訊息存在哪裡:
$ grep -s -r "System information" /etc
motd: System information as of Wed Oct 23 09:35:28 CST 2013
update-motd.d/50-landscape-sysinfo: echo -n " System information as of "
update-motd.d/50-landscape-sysinfo: echo " System information disabled due to load higher than $threshold"
看來是跟 motd 有關。man 一下, motd 的意思是「message of a day」,而 /etc/update-motd.d 下則是用來統計系統資訊的 script。
而 update-motd.d 的 script 是否在 login 時執行還不曉得,找個時間在繼續追。