[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
内存,cpu,硬盘区别
内存:就是存储程序以及数据的地方,比如当我们在使用WPS处理文稿时,当你在键盘上敲入字符时,它就被存入内存中,当你选择存盘时,内存中的数据才会被存入硬(磁)盘。断电后,内存中的信息全部丢失,存储介质是集成块的RAM类型,电子读写,存储容量较小。。
cpu:是英语“Central Processing
Unit/中央处理器”的缩写,CPU一般由逻辑运算单元、控制单元和存储单元组成。在逻辑运算和控制单元中包括一些寄存器,这些寄存器用于CPU在处理数据过程中数据的暂时保存,
其实我们在买CPU时,并不需要知道它的构造,只要知道它的性能就可以了。
硬盘:是磁存储,靠磁头读写。硬盘可以长期存储数据,不受断电影响。存储容量大。
一.linux系统查看内存命令:cat /proc/meminfo
free命令是一个快速查看内存使用情况的方法,它是对 /proc/meminfo 收集到的信息的一个概述
如何判断系统内存不足:如果Swap used值大于0,代表服务器物理内存已经遇到内存瓶颈了,已开始使用虚拟内存了,要么优化代码,要么加内存
1. 内存
total:内存总数
used:已使用的内存数
free:空闲的内存数
shared:当前已废弃不用
buffers:系统分配但未被使用的缓冲区
cached:系统分配但未被使用的缓存
(buffers和cached区别:A buffer is something that has yet to be “written” to disk.
A cache is something that has been “read” from the disk and stored for later
use(缓冲区还没有被写入磁盘。 缓存是从磁盘“读取”并存储以备后用的))
2. 程序已用内存数:
-(buffers/cached):used 第一部分mem行 used-buffers-cached (反应的被程序实实在在吃掉的内存)
程序可用内存数
+(buffers/cached):free 第一部分 mem行 free+buffers+cached (可以挪用的内存总数)
3.交换区
二.cpu:top(即可查看cpu也可查看内存占用率1.)
用下图画红框内容来判定系统是否负载过高(同命令uptime显示效果)
:服务器运行时间
任务
判断进行运行状态:s:sleep; r:run; Z: 僵尸(代表:进程已经死了,但还在占用进程,服务器资源未释放)
i:代表短时在切换资源
三.显示磁盘 :df -h
四.查看服务器java程序
ps -ef|grep java
五:linux系统状态