如何从浏览器监视Linux服务器资源

这篇文章主要讲解了“如何从浏览器监视Linux服务器资源”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“如何从浏览器监视Linux服务器资源”吧!

创新互联网络公司拥有十多年的成都网站开发建设经验,数千家客户的共同信赖。提供成都网站建设、成都做网站、网站开发、网站定制、卖友情链接、建网站、网站搭建、成都响应式网站建设公司、网页设计师打造企业风格,提供周到的售前咨询和贴心的售后服务

过去,我们介绍了许多用于监视Linux性能的基于命令行的工具,这里仅举几个例子。例如top,htop,atop,glance等,以及许多基于Web的工具,例如cockpit,pydash,linux-dash。你还可以在web服务器模式下运行glance来监视远程服务器。除此之外,我们还发现了另一个我们希望与您共享的简单服务器监视工具,名为Scout_Realtime。

Scout_Realtime是一个简单,易于使用的基于Web的工具,用于以一种类似top的方式实时监视Linux服务器指标。它显示了有关从CPU,内存,磁盘,网络和进程(前10名)实时收集的指标的流畅图表。

如何从浏览器监视Linux服务器资源

实时Linux服务器进程监控

在本文中,我们将向您展示如何在Linux系统上安装scout_realtime监视工具以监视远程服务器。

在Linux中安装Scout_Realtime监控工具

1、要在Linux服务器上安装scout_realtime,必须使用以下命令在服务器上安装Ruby 1.9.3+。

linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt-get install rubygems [在 Debian/Ubuntu 上]  linuxmi@linuxmi:~/www.linuxmi.com$ sudo yum -y install rubygems-devel [在 RHEL/CentOS 上]  linuxmi@linuxmi:~/www.linuxmi.com$ sudo dnf -y install rubygems-devel [在 Fedora 22+ 上]

如何从浏览器监视Linux服务器资源

来自:https://www.linuxmi.com/linux-scout_realtime-top.html

2、在Linux系统上安装了Ruby之后,现在可以使用以下命令安装scout_realtime包。

linuxmi@linuxmi:~/www.linuxmi.com$ sudo gem install scout_realtime

如何从浏览器监视Linux服务器资源

3、成功安装scout_realtime软件包后,接下来,您需要启动scout_realtime守护程序,该守护程序将实时收集服务器指标,如图所示。

linuxmi@linuxmi:~/www.linuxmi.com$ scout_realtime  /var/lib/gems/2.7.0/gems/scout_realtime-1.0.5/lib/vendor/sinatra-1.4.4/lib/sinatra/base.rb:1208: warning: constant ::Fixnum is deprecated  /var/lib/gems/2.7.0/gems/scout_realtime-1.0.5/lib/vendor/sinatra-1.4.4/lib/sinatra/base.rb:1208: warning: constant ::Fixnum is deprecated  /var/lib/gems/2.7.0/gems/scout_realtime-1.0.5/lib/vendor/sinatra-1.4.4/lib/sinatra/base.rb:1208: warning: constant ::Fixnum is deprecated  /var/lib/gems/2.7.0/gems/scout_realtime-1.0.5/lib/vendor/sinatra-1.4.4/lib/sinatra/base.rb:1208: warning: constant ::Fixnum is deprecated  /var/lib/gems/2.7.0/gems/scout_realtime-1.0.5/lib/vendor/sinatra-1.4.4/lib/sinatra/base.rb:1208: warning: constant ::Fixnum is deprecated  Daemon has started successfully  To view in your browser, do ONE of the following:  A) create an SSH tunnel: ssh -NL 5555:localhost:5555 user@ip_or_hostname (run that command on your own computer, not the server)  then point your browser to: http://localhost:5555  --- OR ---  B) open a port in your firewall: sudo iptables -A INPUT -p tcp --dport 5555 -j ACCEPT (run that command on your server)  then point your browser to: http://your-ip-or-hostname:5555  * FYI, the log file is: /home/linuxmi/.scout/scout_realtime.log  * "scout_realtime stop" to stop the daemon

如何从浏览器监视Linux服务器资源

在服务器上启动Scout Realtime

4、现在,scout_realtime守护程序正在您要在端口5555上进行远程监视的Linux服务器上运行。如果正在运行防火墙,则需要在防火墙中打开scout_realtime侦听的端口5555,以允许对其发出请求。

---------- 在 Debian/Ubuntu 上----------  $ sudo ufw allow 27017  $sudo ufw reload  ---------- 在 RHEL/CentOS 6.x 上 ----------  $ sudo iptables -A INPUT -p tcp --dport 5555 -j ACCEPT  $ sudo service iptables restart  ---------- 在 RHEL/CentOS 7.x 上----------  $ sudo firewall-cmd --permanent --add-port=5555/tcp  $ sudo firewall-cmd reload

5、现在,从任何其他机器上,打开Web浏览器,然后使用下面的URL访问scout_realtime来监视远程Linux服务器的性能。

http://localhost:5555  或者  http://ip-address-or-domain.com:5555

如何从浏览器监视Linux服务器资源

6、默认情况下,scout_realtime日志写在系统上的.scout/scout_realtime.log中,您可以使用cat命令查看。

linuxmi@linuxmi:~$ cat .scout/scout_realtime.log

如何从浏览器监视Linux服务器资源

来自:https://www.linuxmi.com/linux-scout_realtime-top.html

7、运行以下命令停止scout_realtime守护进程。

linuxmi@linuxmi:~$ scout_realtime stop

8、使用实例从系统中卸载scout_realtime。

linuxmi@linuxmi:~$ gem uninstall scout_realtime

要了解更多信息,请查看Scout_realtime Github存储库。

感谢各位的阅读,以上就是“如何从浏览器监视Linux服务器资源”的内容了,经过本文的学习后,相信大家对如何从浏览器监视Linux服务器资源这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是创新互联,小编将为大家推送更多相关知识点的文章,欢迎关注!

网站名称:如何从浏览器监视Linux服务器资源
当前URL:https://www.cdcxhl.com/article6/ispjig.html

成都网站建设公司_创新互联,为您提供App设计域名注册微信小程序动态网站外贸建站静态网站

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

绵阳服务器托管