2018年12月25日 星期二

failed to send WATCHDOG=1 notification message: Transport endpoint is not connected

Update ubuntu properly. Write following commands in terminal:
sudo apt-get update
update-manager
After completion update, Write following command in terminal:
reboot
Hopefully, Problem will be solved.
If the problem is still exits:
  • Press and Hold Power button and let the PC to turn off forcibly.
  • Turn on PC now, it will on perfectly.
  • if it throws fsck error, write command:
    fsck -yf /dev/sdaX 
    Done

2018年12月6日 星期四

How to open a .txt file and display it in a text box using VB.Net

Imports System.IO

Public Class MyForm

    ' ... Whatever code you have for your form

    Public Sub OpenFile()

        Dim oReader As StreamReader

        OpenFileDialog1.CheckFileExists = True
        OpenFileDialog1.CheckPathExists = True
        OpenFileDialog1.DefaultExt = "txt"
        OpenFileDialog1.FileName = ""
        OpenFileDialog1.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"
        OpenFileDialog1.Multiselect = False

        If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
            oReader = New StreamReader(OpenFileDialog1.FileName, True)
            RichTextBox1.Text = oReader.ReadToEnd
        End If

    End Sub

End Class

2018年12月4日 星期二

BIOS中Power/APM Configuration

在電源管理(Power Management)功能選單中,選項『Restore on AC Power Loss』決定當電源不足或損壞時系統的處置方式,這個選項有「Power  On」、「Power  Off」、「Last State」三種選擇種,做為電源中斷或不小心意外而關機的應變方式。

「Power  Off」:系統持續在關機的狀態。
「Power  On」:系統會自動重新啟動。
「Last   State」:設定為斷電前的狀態。(我建議)

2018年12月3日 星期一

ubuntu change color of top menu bar in Unity and top menu bar in any window

How to install Ubuntu Tweak?
  • Hit Alt+Ctrl+T to open terminal and run following commands:
    1. For Ubuntu 14.04 onwards, it's available in softxare sources, just type:
      sudo apt-get install unity-tweak-tool
      
    2. For older Ubntu releases:
      sudo add-apt-repository ppa:tualatrix/ppa
      sudo apt-get update
      sudo apt-get install ubuntu-tweak

2018年11月28日 星期三

kernel line上的“rhgb”是什麼?

source:https://www.redhat.com/archives/rhl-list/2004-May/msg07775.html

rhgb = redhat graphical boot - This is a GUI mode booting screen with most of the information hidden while the user sees a rotating activity icon spining and brief information as to what the computer is doing.

quiet = hides the majority of boot messages before rhgb starts. These are supposed to make the common user more comfortable. They get alarmed about seeing the kernel and initializing messages, so they hide them for their comfort.

2018年11月18日 星期日

Ubuntu套件伺服器

sudo apt-get update 台灣區的伺服器連不上,切換到了其他套件伺服器,然後就可以更新

Step1.
按右上角的齒輪>選「系統設定值…」>按「軟體和更新」>按「下載自:」旁的 按鈕/選單>選擇「其他」










接著按下「選最佳的伺服器(S)」(其實你可以在旁邊的欄位隨便挑一個)













接著它會去尋找最適合你的伺服器








當完成後,按下「選擇伺服器(S)」並且輸入密碼











如果出現下圖,按下「重新載入(R)」即可


然後你就成功的切換套件伺服器了…

2018年11月4日 星期日

Linux7(CentOS,RHEL,OEL)和Oracle RAC環境系列-10-ABRT-系統啟動

Linux7會自動檢查和報告錯誤:

Last login: Sat Jan 16 23:09:25 2016 from 192.168.56.1
ABRT has detected 5 problem(s). For more info run: abrt-cli list --since 1452956965
[root@lunar1 ~]# 
Abrt從Linux 6中引入的一個自動缺陷報告工具。 
我們知道,Linux6中開始對新硬件熱插拔特性的支持進一步增強(估計也是移動互聯網和新硬件層出不窮催生的需求)。 
比如,Linux6包括高級數據完整性特性(DIF/DIX),可以通過AER的PCIe設備的增強錯誤檢查,因此就引入了ABRT(自動缺陷報告工具)。 
ABRT全程是Automatic Bug Reporting Tool,它提供了確定和報告系統異常情況,包括內核故障和用戶空間應用崩潰等。 

abrt-cli就是這個工具的命令行接口,也可以使用圖形界面的ABRT工具例如:gnome-abrt &。 
詳細信息,請參見Redhat的官方手冊:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-abrt-handling-problems.html

abrt-cli命令的help內容:

[root@lunar1 ~]# abrt-cli command --help 
用法:abrt-cli [--authenticate] [--version] COMMAND [DIR]...

    list, ls      列出 [in DIRs] 問题
    remove, rm    删除問题目錄 DIR
    report, e     分析並報告 DIR 中的問题數據
    info, i       輸出有關DIR的信息
    status, st    顯示最近的崩潰計數
    process, p    處理多個問題

详情请查看 'abrt-cli COMMAND --help'
[root@lunar1 ~]# 
現在,我們根據提示查看一下錯誤列表:

[root@lunar1 ~]# abrt-cli list --since 1452956965
id bcb60782560b94bcb05b57145242778992fcacd0
reason:         ibus-daemon killed by SIGABRT
time:           20160117 星期日 003944
cmdline:        /usr/bin/ibus-daemon -r --xim
package:        ibus-1.5.3-13.el7
uid:            54322 (grid)
count:          1
Directory:      /var/spool/abrt/ccpp-2016-01-17-00:39:44-30522

id dc1e51ec4c3bae28ac787be1e32dcfc2ee627af7
reason:         gnome-shell killed by SIGTRAP
time:           20160117 星期日 003944
cmdline:        /usr/bin/gnome-shell
package:        gnome-shell-3.14.4-37.el7
uid:            54322 (grid)
count:          1
Directory:      /var/spool/abrt/ccpp-2016-01-17-00:39:44-4330

id 8002c377b00f1031a59d4eeaa9491a48dcc9f95a
reason:         gnome-shell killed by SIGTRAP
time:           20160117 星期日 002348
cmdline:        /usr/bin/gnome-shell
package:        gnome-shell-3.14.4-37.el7
uid:            54321 (oracle)
count:          2
Directory:      /var/spool/abrt/ccpp-2016-01-17-00:23:48-28148

id 4fd232514a4753e38c05ce5ca1d0ada8b4ef8ba0
reason:         gnome-shell killed by SIGTRAP
time:           20160117 星期日 003855
cmdline:        /usr/bin/gnome-shell
package:        gnome-shell-3.14.4-37.el7
uid:            0 (root)
count:          1
Directory:      /var/spool/abrt/ccpp-2016-01-17-00:38:55-3844

id c7100bb912a43bebe3bdfa13859d473416faba59
reason:         ibus-daemon killed by SIGABRT
time:           20160117 星期日 003851
cmdline:        /usr/bin/ibus-daemon -r --xim
package:        ibus-1.5.3-13.el7
uid:            0 (root)
count:          1
Directory:      /var/spool/abrt/ccpp-2016-01-17-00:38:51-26249
已禁用自動報告功能。請考慮啟用該功能,方法是 
作為有root特權的用戶使用命令'abrt-auto-reporting enabled' 
[root@lunar1 ~]#