使用網頁瀏覽器遠端監控Linux伺服器效能
您是否正在尋找快速伺服器統計監控指令碼?如果是,那麼這篇文章適合您。在這裡,我們將解釋Linux-dash,這是一個用PHP編寫的、記憶體高效、低資源、易於安裝的伺服器統計監控指令碼。
一個網際網路靜態網頁允許您根據需要重新排列各種小部件。此指令碼顯示伺服器的駐留記錄,包括RAM、CPU、磁碟空間、網路連線、已安裝程式、正在執行的程序等等。
Linux Dash 功能
Linux Dash 功能應如下所示:
- 這是一個輕量級且響應迅速的基於Web的伺服器資源監控介面
- 易於在安裝了Apache和PHP的伺服器上安裝
- 易於重新組織各種小部件
- 它支援各種Apache版本
安裝前提條件
要使用Linux-Dash,需要預先安裝工具和軟體包。
- 安裝了Apache的Linux作業系統
- PHP和PHP-json擴充套件
- Linux中的git安裝
- 一個unzip實用工具
安裝Apache、PHP和PHP模組
要在Linux系統中安裝Apache,請使用以下命令:
$ sudo apt-get install apache2 apache2-utils
示例輸出應如下所示:
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: apache2-bin apache2-data libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap Suggested packages: apache2-doc apache2-suexec-pristine apache2-suexec-custom The following NEW packages will be installed: apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap 0 upgraded, 8 newly installed, 0 to remove and 44 not upgraded. Need to get 1,349 kB of archives. After this operation, 5,591 kB of additional disk space will be used. Do you want to continue? [Y/n] y .....
要在Linux系統中安裝PHP,請使用以下命令:
$ sudo apt-get install php5 curl php5-curl php5-json
示例輸出應如下所示:
Reading package lists... Done Building dependency tree Reading state information... Done curl is already the newest version. curl set to manually installed. The following extra packages will be installed: libapache2-mod-php5 php5-cli php5-common php5-readline Suggested packages: php-pear php5-user-cache The following NEW packages will be installed: libapache2-mod-php5 php5 php5-cli php5-common php5-curl php5-json php5-readline 0 upgraded, 7 newly installed, 0 to remove and 44 not upgraded. Need to get 4,893 kB of archives. After this operation, 20.6 MB of additional disk space will be used. Do you want to continue? [Y/n] y .....
要啟動apache2,請使用以下命令:
$ sudo service apache2 start
示例輸出應如下所示:
$ sudo service apache2 start * Starting web server apache2 *
下載和安裝Linux-Dash
請注意,在下載Linux-Dash之前,請確保在您的Linux系統上安裝了**git**軟體包。
$ sudo apt-get install git-all
示例輸出應如下所示:
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: cvs cvsps emacs emacs24 emacs24-bin-common emacs24-common emacs24-common-non-dfsg emacsen-common fgetty gawk git git-arch git-bzr git-cvs git-daemon-run git-doc git-el git-email git-gui git-man git-mediawiki git-svn gitk gitweb imagemagick-common libclass-factory-util-perl libclass-load-perl libclass-singleton-perl libcommon-sense-perl libdata-optlist-perl libdatetime-format-builder-perl libdatetime-format-iso8601-perl libdatetime-format-strptime-perl libdatetime-locale-perl libdatetime-perl libdatetime-timezone-perl libdbd-sqlite3-perl libdbi-perl libencode-locale-perl liberror-perl libfile-listing-perl libfont-afm-perl libgif4 libhtml-form-perl ......
要從**git**下載Linux Dash,請使用以下命令:
$ sudo git clone https://github.com/afaqurk/linux-dash.git
示例輸出應如下所示:
Cloning into 'linux-dash'... remote: Counting objects: 3214, done. remote: Compressing objects: 100% (5/5), done. remote: Total 3214 (delta 0), reused 0 (delta 0), pack-reused 3209 Receiving objects: 100% (3214/3214), 3.33 MiB | 302.00 KiB/s, done. Resolving deltas: 100% (1890/1890), done. Checking connectivity... done.
以上命令將Linux-dash壓縮檔案下載到主目錄。解壓Linux-dash檔案,並將內容複製並貼上到/var/www/目錄。現在,從任何一個Web瀏覽器開啟本地主機。示例輸出應如下所示:

系統基本資訊應如下所示:

系統網路資訊應如下所示:

基本賬戶資訊應如下所示:

恭喜!現在,您知道“如何使用Web瀏覽器遠端監控Linux伺服器效能”。我們將在下一篇文章中學習更多關於這些型別命令的知識。繼續關注!
廣告
資料結構
網路
關係資料庫管理系統 (RDBMS)
作業系統
Java
iOS
HTML
CSS
Android
Python
C程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP