yangyu-MAXI
作者yangyu-MAXI·2021-10-30 20:58
系统架构师·IPS-浪潮商用机器

Linux Dash监控在PowerLinux平台上的安装和应用

字数 9609阅读 2601评论 0赞 0

浪潮商用机器,技术支持部,杨宇

客户在业务环境中,经常需要对所管理的Linux服务器进行性能监控,以准确评估当前服务器的性能表现。然而Linux原生的性能监控小工具通常都是字符界面,通过命令行来进行操作和启停,对于管理员的技能要求比较高,同时展现也不够直观。

一些开源的监控小工具能够很好地弥补这方面的不足。Linux Dash就是一款轻量级、低开销 Linux 服务器监控工具,基于 Web 的监控界面,能够对Linux服务器的处理器、内存、网络和磁盘当前的使用进行有效直观的监控。

下面我们就在PowerLinux平台上,看看如何安装和运用Linux Dash吧:

  • 1、 安装git版本控制工具,并确认安装的版本信息。

[root@yytest home]# yum -y install git

Loaded plugins: fastestmirror, langpacks

Determining fastest mirrors

  • base: mirrors.tuna.tsinghua.edu.cn
  • extras: mirrors.tuna.tsinghua.edu.cn
  • updates: mirrors.tuna.tsinghua.edu.cn

base | 3.6 kB 00:00:00

extras | 2.9 kB 00:00:00

updates | 2.9 kB 00:00:00

updates/7/primary_db | 2.1 MB 00:00:00

Resolving Dependencies

--> Running transaction check

---> Package git.ppc64le 0:1.8.3.1-23.el7_8 will be installed

--> Processing Dependency: perl-Git = 1.8.3.1-23.el7_8 for package: git-1.8.3.1-23.el7_8.ppc64le

--> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.3.1-23.el7_8.ppc64le

--> Processing Dependency: perl(Git) for package: git-1.8.3.1-23.el7_8.ppc64le

--> Processing Dependency: perl(Error) for package: git-1.8.3.1-23.el7_8.ppc64le

--> Running transaction check

---> Package perl-Error.noarch 1:0.17020-2.el7 will be installed

---> Package perl-Git.noarch 0:1.8.3.1-23.el7_8 will be installed

---> Package perl-TermReadKey.ppc64le 0:2.30-20.el7 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================

Package Arch Version Repository Size

=============================================================================================================================

Installing:

git ppc64le 1.8.3.1-23.el7_8 base 4.5 M

Installing for dependencies:

perl-Error noarch 1:0.17020-2.el7 base 32 k

perl-Git noarch 1.8.3.1-23.el7_8 base 56 k

perl-TermReadKey ppc64le 2.30-20.el7 base 31 k

Transaction Summary

=============================================================================================================================

Install 1 Package (+3 Dependent packages)

Total download size: 4.6 M

Installed size: 25 M

Downloading packages:

(1/4): perl-Error-0.17020-2.el7.noarch.rpm | 32 kB 00:00:01

(2/4): perl-Git-1.8.3.1-23.el7_8.noarch.rpm | 56 kB 00:00:00

(3/4): perl-TermReadKey-2.30-20.el7.ppc64le.rpm | 31 kB 00:00:00

(4/4): git-1.8.3.1-23.el7_8.ppc64le.rpm | 4.5 MB 00:00:01


Total 3.3 MB/s | 4.6 MB 00:00:01

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Installing : 1:perl-Error-0.17020-2.el7.noarch 1/4

Installing : perl-TermReadKey-2.30-20.el7.ppc64le 2/4

Installing : git-1.8.3.1-23.el7_8.ppc64le 3/4

Installing : perl-Git-1.8.3.1-23.el7_8.noarch 4/4

Verifying : 1:perl-Error-0.17020-2.el7.noarch 1/4

Verifying : git-1.8.3.1-23.el7_8.ppc64le 2/4

Verifying : perl-Git-1.8.3.1-23.el7_8.noarch 3/4

Verifying : perl-TermReadKey-2.30-20.el7.ppc64le 4/4

Installed:

git.ppc64le 0:1.8.3.1-23.el7_8

Dependency Installed:

perl-Error.noarch 1:0.17020-2.el7 perl-Git.noarch 0:1.8.3.1-23.el7_8 perl-TermReadKey.ppc64le 0:2.30-20.el7

Complete!

[root@yytest home]# git --version

git version 1.8.3.1


  • 2,从GitHub的相应地址获取Linux Dash。

[root@yytest home]# git clone https://github.com/afaqurk/linux-dash.git

Cloning into 'linux-dash'...

remote: Enumerating objects: 4520, done.

remote: Total 4520 (delta 0), reused 0 (delta 0), pack-reused 4520

Receiving objects: 100% (4520/4520), 4.58 MiB | 1.92 MiB/s, done.

Resolving deltas: 100% (2671/2671), done.


  • 3,我们可以看到目录下多了linux-dash目录。

[root@yytest home]# ll

total 0

drwx------. 3 inspur inspur 78 Apr 11 2018 inspur

drwxr-xr-x 6 root root 203 Oct 28 13:53 linux-dash


  • 4,进入/linux-dash/app/server目录下,我们可以看到Linux Dash支持四种不同的server执行脚本。

Node.js
Go
Python
PHP

[root@yytest server]# pwd

/home/linux-dash/app/server

[root@yytest server]# ll

total 36

drwxr-xr-x 2 root root 24 Oct 28 13:53 config

-rwxrwxrwx 1 root root 1245 Oct 28 15:23 index.go

-rw-r--r-- 1 root root 1880 Oct 28 13:53 index.js

-rw-r--r-- 1 root root 265 Oct 28 13:53 index.php

-rwxrwxrwx 1 root root 1904 Oct 28 14:26 index.py

-rwxr-xr-x 1 root root 18530 Oct 28 13:53 linux_json_api.sh


  • 5,本次我们选择用Python来运行,先安装Python。(本人实测Go语言执行也OK)。

[root@yytest server]# yum install -y python

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

  • base: mirrors.tuna.tsinghua.edu.cn
  • extras: mirrors.tuna.tsinghua.edu.cn
  • updates: mirrors.tuna.tsinghua.edu.cn

Resolving Dependencies

--> Running transaction check

---> Package python.ppc64le 0:2.7.5-76.el7 will be updated

---> Package python.ppc64le 0:2.7.5-90.el7 will be an update

--> Processing Dependency: python-libs(ppc-64) = 2.7.5-90.el7 for package: python-2.7.5-90.el7.ppc64le

--> Running transaction check

---> Package python-libs.ppc64le 0:2.7.5-76.el7 will be updated

---> Package python-libs.ppc64le 0:2.7.5-90.el7 will be an update

--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================

Package Arch Version Repository Size

=============================================================================================================================

Updating:

python ppc64le 2.7.5-90.el7 updates 96 k

Updating for dependencies:

python-libs ppc64le 2.7.5-90.el7 updates 5.8 M

Transaction Summary

=============================================================================================================================

Upgrade 1 Package (+1 Dependent package)

Total download size: 5.9 M

Downloading packages:

No Presto metadata available for updates

(1/2): python-2.7.5-90.el7.ppc64le.rpm | 96 kB 00:00:00

(2/2): python-libs-2.7.5-90.el7.ppc64le.rpm | 5.8 MB 00:00:02


Total 2.5 MB/s | 5.9 MB 00:00:02

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Updating : python-libs-2.7.5-90.el7.ppc64le 1/4

Updating : python-2.7.5-90.el7.ppc64le 2/4

Cleanup : python-2.7.5-76.el7.ppc64le 3/4

Cleanup : python-libs-2.7.5-76.el7.ppc64le 4/4

Verifying : python-libs-2.7.5-90.el7.ppc64le 1/4

Verifying : python-2.7.5-90.el7.ppc64le 2/4

Verifying : python-libs-2.7.5-76.el7.ppc64le 3/4

Verifying : python-2.7.5-76.el7.ppc64le 4/4

Updated:

python.ppc64le 0:2.7.5-90.el7

Dependency Updated:

python-libs.ppc64le 0:2.7.5-90.el7

Complete!


  • 6,Python安装完毕,执行脚本。

[root@yytest server]# python index.py

Starting server, use <Ctrl-C> to stop


  • 7,客户端浏览器访问,即可欣喜地看到图形化展现的监控工具Linux Dash。Linux Dash可以对Linux服务器CPU、内存、网络及磁盘等信息进行直观的实时监控,并支持用鼠标拖拽的方式按客户需求调整监控的窗口。如果您觉得PowerLinux上的这款监控工具简单好用,就请一起应用体验吧。



如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

0

添加新评论0 条评论

Ctrl+Enter 发表

作者其他文章

相关文章

相关问题

相关资料

X社区推广