您的位置:首页 > 运维架构 > Linux

[置顶] 【linux 服务器运行情况】了解Linux服务器运行情况

2017-10-05 18:23 435 查看
1、free

在Linux下,使用free命令获取当前内存的使用情况

[root@izbp1f0leha0lvmqfhigzpz code]# free -h
total        used        free      shared  buff/cache   available
Mem:           1.8G         84M        173M        388K        1.5G        1.5G
Swap:            0B          0B          0B
[root@izbp1f0leha0lvmqfhigzpz code]#


2.uptime

如果主观上感觉系统运行缓慢,首先可以通过uptime命令获取当前系统的平均负载

[root@izbp1f0leha0lvmqfhigzpz code]# uptime
18:01:46 up 30 days,  6:32,  2 users,  load average: 0.00, 0.01, 0.05
[root@izbp1f0leha0lvmqfhigzpz code]#


3、htop

htop 是一款运行于Linux上的监控与进程管理软件。用户取代linux下传统的top.top 只提供最消费资源的进程列表,但是htop 提供所有进程的列表。并且使用颜色标识出处理器,swap、和内存状况。

4、boom

压力测试

测试一个网站到底能够承受多大的用户访问量,

pip install boom

[root@izbp1f0leha0lvmqfhigzpz ~]# boom http://101.37.147.236:1518/ -c 10 -n 100
Server Software: Werkzeug/0.12.2 Python/2.7.5
Running GET http://101.37.147.236:1518/ Running 100 queries - concurrency 10
[=================================================================>] 100% Done

-------- Results --------
Successful calls                100
Total time                      4.8468 s
Average                         0.4342 s
Fastest                         0.0049 s
Slowest                         3.2364 s
Amplitude                       3.2315 s
Standard deviation              0.563146
RPS                             20
BSI                             :(

-------- Status codes --------
Code 200                        100 times.

-------- Legend --------
RPS: Request Per Second
BSI: Boom Speed Index
[root@izbp1f0leha0lvmqfhigzpz ~]#
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: