快速查看 系統、硬碟、RAM 使用情況等資訊的 Script

想要快速查看 Linux 系統平均負載、硬碟、記憶體的使用情況等等資訊,此網站作者有寫一隻 Bash shell script 可以快速整理呈現。

安裝、使用方式

  1. wget http://tecmint.com/wp-content/scripts/tecmint_monitor.sh
  2. chmod +x ./tecmint_monitor.sh
  3. ./tecmint_monitor.sh # 即可呈現

Linux 4.0 引入 更新 Kernel 不需重開機的功能

Linux 更新 Kernel 最麻煩的地方就是需要重新開機,但是 Server 要重新開機是一件很複雜的事情,平常在跑的服務不能停,想重新開機都得要另外安排時間,所以就會需要找備援機器來替代,達到 0 downtime。

Linux 4.0 以後,這個問題應該就可以盡量避免了,之後更新 Kernel 就不需要重新開機囉~ (更換硬體應該還是會需要重開機)

註:不過如果機器沒事的話,偶爾還是可以重開機看看,避免難得重開確開不了機的糗狀。 XD

閱讀全文〈Linux 4.0 引入 更新 Kernel 不需重開機的功能〉

Ubuntu 12.04 遇到 procps 造成 udev、mountall 相依性衝突解法

Ubuntu Linux 12.04 最近升級時,遇到幾台有下述訊息:

Setting up procps (1:3.2.8-11ubuntu6.4) ...
start: Job failed to start
invoke-rc.d: initscript procps, action "start" failed.
dpkg: error processing procps (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of udev:
 udev depends on procps; however:
  Package procps is not configured yet.
dpkg: error processing udev (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mountall:
 mountall depends on udev; however:
  Package udev is not configured yet.
dpkg: error processing mountall (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
  procps
  udev
  mountall
E: Sub-process /usr/bin/dpkg returned an error code (1)

遇到這個還好,想說新版套件應該就會修復此問題,但是剛好遇到 Linode 全部機器都要重開,就炸了。

出現這個問題的機器,重開自然開不了機,簡單的直接進入修復模式後,資料備份出來,直接重灌成 Debian 解決;麻煩的就參照這篇試試看,看能不能解決囉~

  • 註1:在 Linode 若要進入修復模式,可見此篇:Rescue and Rebuild - Linode Guides & Tutorials
  • 註2:在 Rescue 模式預設網路是通的,但是 DNS 不通,請自行到 /etc/resole.conf 增加 nameserver 8.8.8.8 之類的.

閱讀全文〈Ubuntu 12.04 遇到 procps 造成 udev、mountall 相依性衝突解法〉