Zabbix Lack of free swap alarm Linux online add swap partition

Source: Internet
Author: User
Tags uuid

Received Zabbix alarm Lack of free swap space on Zabbix_server

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/67/wKiom1X8GQiBWIAUAAFYrbOt14c374.jpg "title=" Qq20150918215951.png "width=" 224 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:224px;height:400px; "alt = "Wkiom1x8gqibwiauaafyrbot14c374.jpg"/>

1. View memory Status

[Email protected] ~]# free-m

Total used free shared buffers Cached

mem:488 450 37 6 6 46

-/+ buffers/cache:397 91

swap:0 0 0

The output of free has a total of four lines, the fourth behavior Swap area information: Total amount of exchange, usage (used) and swap area (free)

2. View disk partition status

[Email protected] ~]# df-h

Filesystem Size used Avail use% mounted on

/DEV/XVDA1 20G 3.8G 15G 21%/

Devtmpfs 237M 0 237M 0%/dev

Tmpfs 245M 0 245M 0%/dev/shm

Tmpfs 245M 4.3M 241M 2%/run

Tmpfs 245M 0 245M 0%/sys/fs/cgroup


3. Create swap Files

[[email protected] ~]# dd If=/dev/zero of=/home/swap bs=1024 count=512000

512000+0 Records in

512000+0 Records out

524288000 bytes (524 MB) copied, 10.8309 s, 48.4 MB/s


4. Create a Swap partition

[Email protected] ~]# Mkswap/home/swap

Setting up Swapspace version 1, size = 511996 KiB

No label, uuid=6ff030ce-898d-4245-b6d5-ee1580c26929

[Email protected] fonts]#/sbin/swapon/home/swap

Swapon:/home/swap:insecure permissions 0644, 0600 suggested.


5. View Free

[Email protected] ~]# free-m

Total used free shared buffers Cached

mem:488 478 10 6 1 78

-/+ buffers/cache:398 90

swap:499 0 499


6. Mounting

[Email protected] ~]# Vi/etc/fstab

#

#/etc/fstab

# Created by Anaconda on Fri Nov 21 18:16:53 2014

#

# Accessible filesystems, by reference, is maintained under '/dev/disk '

# See mans Pages Fstab (5), Findfs (8), mount (8) and/or Blkid (8) for more info

#

UUID=6634633E-001D-43BA-8FAB-202F1DF93339/EXT4 defaults,barrier=0 1 1

uuid=6ff030ce-898d-4245-b6d5-ee1580c26929 swap swap defaults 0 0

~

"/etc/fstab" 10L, 356C written

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/67/wKiom1X8F3zRTVG2AAPovewtmJM938.jpg "title=" 20150918215224.png "width=" height= "213" border= "0" hspace= "0" vspace= "0" style= "width:600px;height:213px;" alt= " Wkiom1x8f3zrtvg2aapovewtmjm938.jpg "/>650) this.width=650;" Src= "http://s3.51cto.com/wyfs02/M02/73/65/ Wkiol1x8hbihdmujaah5h41af-a710.jpg "title=" Qq20150918220310.png "width=" 285 "height=" "border=" 0 "hspace=" 0 " Vspace= "0" style= "width:285px;height:500px;" alt= "wkiol1x8hbihdmujaah5h41af-a710.jpg"/>

This article is from the "Work Experience" blog, please be sure to keep this source http://chlipeng.blog.51cto.com/8928892/1696173

Zabbix Lack of free swap alarm Linux online add swap partition

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.