High swap space usage less than 20 free windows

I have several Windows Server 2012 Virtual Machines, which are monitored by zabbix 2.4. The zabbix throws "Lack of free swap space" for some VMs, but there

Содержание

  1. «Lack of free swap space» on Windows Server
  2. 3 Answers 3
  3. Нехватка памяти на сервере
  4. High swap space usage less than 20 free windows

«Lack of free swap space» on Windows Server

I have several Windows Server 2012 Virtual Machines, which are monitored by zabbix 2.4. The zabbix throws «Lack of free swap space» for some VMs, but there are disk and memory free on these machines, and the Virtual Memory is set to OS Control on Windows.

What means «Lack of free swap space» on Windows Server? It’s disk space? RAM? Virtual Memory?

How can I resolve it?

photo

3 Answers 3

I have just resolved my item with the same error. It is related to the windows page file and in my case it was configured to be automatically managed by windows.

That is one solution for the problem. Unfortunately for us, we have many Windows servers and leave their pagefile (swap space) to be managed by Windows.

When Windows manages the pagefile, it leaves the pagefile size alone even sometimes filled with 0 bytes free until some program requests more memory and then if it has space on the pagefile drive, it will grow the size of the pagefile providing more free pagefile space.

This confuses the «simple» Zabbix alarm. It sees, for example, a 1.7GB page file with 0 bytes free and throws an alarm. It didn’t see that Windows was managing the pagefile and the drive had plenty of disk space available for pagefile growth.

It’d be great if Zabbix could (psuedo code follows): IF «Windows is managing the pagefile» THEN IF pagefile free space % is lower than threshold AND drive containing pagefile has less free space than 2nd threshold THEN throw trigger (send alarm) ELSE #assumes fixed pagefile size on a drive IF pagefile free space % is lower than threshold THEN throw trigger (send alarm) FI

This trigger complexity is beyond my Zabbix skill rating. If anyone has suggestions on how to implement this it would greatly help. (We chase 4 to 5 production level swap space alarms each day. Correction, ignore. Which scares us and should scare Zabbix developers. Crying wolf is not a good thing.)

Источник

Нехватка памяти на сервере

Не так давно я создавал тред, где переживал что апач с одним единственным сайтом из хмтл страничек отжирает всю память на серваке. Меня успокоили, что он отжирает свободную память под кеш, что свободная память все равно никак не используется и как только она понадобится, то апач мне её вернет. Прошло несколько месяцев, сервер никто не трогал. Сегодня установил zabbix и он сразу же выдал мне сообщение о проблеме Lack of free swap space on Zabbix server. Получается память для него так и не освободилась? Как с этим боротся? Не может же быть такого, что apache2 со статическим сайтом + zabbix отжирают 2 гигабайта оперативки?

99263: 1500135053

p

Не ужеле не можете посмотреть, кто сколько памяти отжирает?

7454:1466716480

99263: 1500135053

Апач всё отжирает. Поидее он должен отжирать неиспользуемую память для убыстрения работы, но вот сейчас память нужна, а он её не отдает

56330: 1401494366

Lack of free swap space (Отсутствие свободного пространства подкачки)

Не может же быть такого, что apache2 со статическим сайтом + zabbix отжирают 2 гигабайта оперативки?

Вот сколько памяти у тебя занято приложениями.

99263: 1500135053

Странно, VPS машину создали без свапа получается? теперь вручную его пилить

Источник

High swap space usage less than 20 free windows

Windows CPU by Zabbix agent active

For Zabbix version: 5.4 and higher

Refer to the vendor documentation.

No specific Zabbix configuration is required.

The critical threshold of the % Interrupt Time counter.

The threshold of the % Privileged Time counter.

The threshold of the Processor Queue Length counter.

The critical threshold of the CPU utilization in %.

There are no template links in this template.

CPU utilization in %

The Processor Information% Interrupt Time is the time the processor spends receiving and servicing

hardware interrupts during sample intervals. This value is an indirect indicator of the activity of

devices that generate interrupts, such as the system clock, the mouse, disk drivers, data communication

lines, network interface cards and other peripheral devices. This is an easy way to identify a potential

hardware failure. This should never be higher than 20%.

Context Switches/sec is the combined rate at which all processors on the computer are switched from one thread to another.

Context switches occur when a running thread voluntarily relinquishes the processor, is preempted by a higher priority ready thread, or switches between user-mode and privileged (kernel) mode to use an Executive or subsystem service.

It is the sum of ThreadContext Switches/sec for all threads running on all processors in the computer and is measured in numbers of switches.

There are context switch counters on the System and Thread objects. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.

The Processor Information% Privileged Time counter shows the percent of time that the processor is spent

executing in Kernel (or Privileged) mode. Privileged mode includes services interrupts inside Interrupt

Service Routines (ISRs), executing Deferred Procedure Calls (DPCs), Device Driver calls and other kernel-mode

functions of the Windows® Operating System.

Processor DPC time is the time that a single processor spent receiving and servicing deferred procedure

calls (DPCs). DPCs are interrupts that run at a lower priority than standard interrupts. % DPC Time is a

component of % Privileged Time because DPCs are executed in privileged mode. If a high % DPC Time is

sustained, there may be a processor bottleneck or an application or hardware related issue that can

significantly diminish overall system performance.

The Processor Information% User Time counter shows the percent of time that the processor(s) is spent executing

The number of logical processors available on the computer.

The Processor Queue Length shows the number of threads that are observed as delayed in the processor Ready Queue

and are waiting to be executed.

Group Name Description Type Key and additional info
CPU CPU utilization ZABBIX_ACTIVE perf_counter_en[«Processor Information(_total)% Interrupt Time»]
CPU Context switches per second ZABBIX_ACTIVE perf_counter_en[«SystemContext Switches/sec»]
CPU CPU privileged time ZABBIX_ACTIVE perf_counter_en[«Processor Information(_total)% Privileged Time»]
CPU CPU DPC time ZABBIX_ACTIVE perf_counter_en[«Processor Information(_total)% DPC Time»]
CPU CPU user time ZABBIX_ACTIVE perf_counter_en[«Processor Information(_total)% User Time»]
CPU Number of cores ZABBIX_ACTIVE wmi.get[root/cimv2,»Select NumberOfLogicalProcessors from Win32_ComputerSystem»]
CPU CPU queue length ZABBIX_ACTIVE perf_counter_en[«SystemProcessor Queue Length»]

CPU utilization is too high. The system might be slow to respond.

«The CPU Interrupt Time in the last 5 minutes exceeds <$CPU.INTERRUPT.CRIT.MAX>%.»

The Processor Information% Interrupt Time is the time the processor spends receiving and servicing

hardware interrupts during sample intervals. This value is an indirect indicator of the activity of

devices that generate interrupts, such as the system clock, the mouse, disk drivers, data communication

lines, network interface cards and other peripheral devices. This is an easy way to identify a potential

hardware failure. This should never be higher than 20%.

Depends on:

— High CPU utilization (over <$CPU.UTIL.CRIT>% for 5m)

The CPU privileged time in the last 5 minutes exceeds <$CPU.PRIV.CRIT.MAX>%.

Depends on:

— CPU interrupt time is too high (over <$CPU.INTERRUPT.CRIT.MAX>% for 5m)

— High CPU utilization (over <$CPU.UTIL.CRIT>% for 5m)

The CPU Queue Length in the last 5 minutes exceeds <$CPU.QUEUE.CRIT.MAX>. According to actual observations, PQL should not exceed the number of cores * 2. To fine-tune the conditions, use the macro <$CPU.QUEUE.CRIT.MAX >.

Depends on:

— High CPU utilization (over <$CPU.UTIL.CRIT>% for 5m)

Please report any issues with the template at https://support.zabbix.com

Windows memory by Zabbix agent active

For Zabbix version: 5.4 and higher

Refer to the vendor documentation.

No specific Zabbix configuration is required.

The warning threshold of the Memory Pages/sec counter.

The warning threshold of the Free System Page Table Entries counter.

The warning threshold of the Memory util item.

The warning threshold of the minimum free swap.

There are no template links in this template.

Name Description Expression Severity Dependencies and additional info
High CPU utilization (over <$CPU.UTIL.CRIT>% for 5m) min(/Windows CPU by Zabbix agent active/system.cpu.util,5m)> WARNING
CPU interrupt time is too high (over <$CPU.INTERRUPT.CRIT.MAX>% for 5m) min(/Windows CPU by Zabbix agent active/perf_counter_en[«Processor Information(_total)% Interrupt Time»],5m)> WARNING min(/Windows CPU by Zabbix agent active/perf_counter_en[«Processor Information(_total)% Privileged Time»],5m)> WARNING

Used memory in Bytes

Total memory in Bytes

Memory utilization in %

Cache Bytes is the sum of the MemorySystem Cache Resident Bytes, MemorySystem Driver Resident Bytes,

MemorySystem Code Resident Bytes, and MemoryPool Paged Resident Bytes counters. This counter displays

the last observed value only; it is not an average.

The free space of swap volume/file in bytes.

The total space of swap volume/file in bytes.

This indicates the number of page table entries not currently in use by the system. If the number is less

than 5,000, there may well be a memory leak or you running out of memory.

Page Faults/sec is the average number of pages faulted per second. It is measured in number of pages

faulted per second because only one page is faulted in each fault operation, hence this is also equal

to the number of page fault operations. This counter includes both hard faults (those that require

disk access) and soft faults (where the faulted page is found elsewhere in physical memory.) Most

processors can handle large numbers of soft faults without significant consequence. However, hard faults,

which require disk access, can cause significant delays.

This measures the rate at which pages are read from or written to disk to resolve hard page faults.

If the value is greater than 1,000, as a result of excessive paging, there may be a memory leak.

This measures the size, in bytes, of the non-paged pool. This is an area of system memory for objects

that cannot be written to disk but instead must remain in physical memory as long as they are allocated.

There is a possible memory leak if the value is greater than 175MB (or 100MB with the /3GB switch).

A typical Event ID 2019 is recorded in the system event log.

Group Name Description Type Key and additional info
Memory Used memory CALCULATED vm.memory.util

Expression:

last(//vm.memory.size[used]) / last(//vm.memory.size[total]) * 100

Memory Cache bytes ZABBIX_ACTIVE perf_counter_en[«MemoryCache Bytes»]
Memory Free swap space CALCULATED system.swap.free

Expression:

The free space of swap volume/file in percent.

DEPENDENT system.swap.pfree

Preprocessing:

The used space of swap volume/file in percent.

ZABBIX_ACTIVE perf_counter_en[«Paging file(_Total)% Usage»]
Memory Total swap space ZABBIX_ACTIVE system.swap.size[,total]
Memory Free system page table entries ZABBIX_ACTIVE perf_counter_en[«MemoryFree System Page Table Entries»]
Memory Memory page faults per second ZABBIX_ACTIVE perf_counter_en[«MemoryPage Faults/sec»]
Memory Memory pages per second ZABBIX_ACTIVE perf_counter_en[«MemoryPages/sec»]
Memory Memory pool non-paged ZABBIX_ACTIVE perf_counter_en[«MemoryPool Nonpaged Bytes»]

The system is running out of free memory.

This trigger is ignored, if there is no swap configured

Depends on:

— High memory utilization (><$MEMORY.UTIL.MAX>% for 5m)

The Memory Free System Page Table Entries is less than <$MEM.PAGE_TABLE_CRIT.MIN>for 5 minutes. If the number is less than 5,000, there may well be a memory leak.

Depends on:

— High memory utilization (><$MEMORY.UTIL.MAX>% for 5m)

The Memory Pages/sec in the last 5 minutes exceeds <$MEM.PAGE_SEC.CRIT.MAX>. If the value is greater than 1,000, as a result of excessive paging, there may be a memory leak.

Depends on:

— High memory utilization (><$MEMORY.UTIL.MAX>% for 5m)

Please report any issues with the template at https://support.zabbix.com

Windows filesystems by Zabbix agent active

For Zabbix version: 6.0 and higher

Refer to the vendor documentation.

No specific Zabbix configuration is required.

This macro is used in filesystems discovery. Can be overridden on the host or linked template level.

This macro is used in filesystems discovery. Can be overridden on the host or linked template level.

This macro is used in filesystems discovery. Can be overridden on the host or linked template level.

This macro is used in filesystems discovery. Can be overridden on the host or linked template level.

This macro is used in filesystems discovery. Can be overridden on the host or linked template level.

This macro is used in filesystems discovery. Can be overridden on the host or linked template level.

The critical threshold of the filesystem utilization in percent.

The warning threshold of the filesystem utilization in percent.

There are no template links in this template.

Name Description Expression Severity Dependencies and additional info
High memory utilization (><$MEMORY.UTIL.MAX>% for 5m) min(/Windows memory by Zabbix agent active/vm.memory.util,5m)> AVERAGE
High swap space usage (less than <$SWAP.PFREE.MIN.WARN>% free) max(/Windows memory by Zabbix agent active/perf_counter_en[«MemoryFree System Page Table Entries»],5m) WARNING min(/Windows memory by Zabbix agent active/perf_counter_en[«MemoryPages/sec»],5m)> WARNING

Discovery of file systems of different types.

Name Description Type Key and additional info
Mounted filesystem discovery ZABBIX_ACTIVE vfs.fs.discovery

Filter:

Used storage in Bytes

Total space in Bytes

Space utilization in % for

Group Name Description Type Key and additional info
Filesystems <#FSLABEL>(<#FSNAME>): Used space ZABBIX_ACTIVE vfs.fs.size[<#FSNAME>,pused]

Two conditions should match: First, space utilization should be above <$VFS.FS.PUSED.MAX.CRIT:»<#FSNAME>«>.

Second condition should be one of the following:

— The disk free space is less than 5G.

— The disk will be full in less than 24 hours.

Two conditions should match: First, space utilization should be above <$VFS.FS.PUSED.MAX.WARN:»<#FSNAME>«>.

Second condition should be one of the following:

— The disk free space is less than 10G.

— The disk will be full in less than 24 hours.

Depends on:

Please report any issues with the template at https://support.zabbix.com

Windows physical disks by Zabbix agent active

For Zabbix version: 5.4 and higher

Refer to the vendor documentation.

No specific Zabbix configuration is required.

This macro is used in physical disks discovery. Can be overridden on the host or linked template level.

This macro is used in physical disks discovery. Can be overridden on the host or linked template level.

Disk read average response time (in s) before the trigger would fire.

The warning threshold of disk time utilization in percent.

Disk write average response time (in s) before the trigger would fire.

There are no template links in this template.

Name Description Expression Severity Dependencies and additional info
<#FSLABEL>(<#FSNAME>): Disk space is critically low (used > <$VFS.FS.PUSED.MAX.CRIT:»<#FSNAME>«>%) last(/Windows filesystems by Zabbix agent active/vfs.fs.size[<#FSNAME>,pused])><$VFS.FS.PUSED.MAX.CRIT:»<#FSNAME>«> and ((last(/Windows filesystems by Zabbix agent active/vfs.fs.size[<#FSNAME>,total])-last(/Windows filesystems by Zabbix agent active/vfs.fs.size[<#FSNAME>,used])) AVERAGE last(/Windows filesystems by Zabbix agent active/vfs.fs.size[<#FSNAME>,pused])><$VFS.FS.PUSED.MAX.WARN:»<#FSNAME>«> and ((last(/Windows filesystems by Zabbix agent active/vfs.fs.size[<#FSNAME>,total])-last(/Windows filesystems by Zabbix agent active/vfs.fs.size[<#FSNAME>,used])) WARNING

Discovery of installed physical disks.

Name Description Type Key and additional info
Physical disks discovery ZABBIX_ACTIVE perf_instance_en.discovery[PhysicalDisk]

Preprocessing:

Filter:

Rate of read operations on the disk.

Rate of write operations on the disk.

Current average disk queue, the number of requests outstanding on the disk at the time the performance data is collected.

This item is the percentage of elapsed time that the selected disk drive was busy servicing read or writes requests.

The average time for read requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.

The average time for write requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.

Average disk read queue, the number of requests outstanding on the disk at the time the performance data is collected.

Average disk write queue, the number of requests outstanding on the disk at the time the performance data is collected.

Group Name Description Type Key and additional info
Storage <#DEVNAME>: Disk read rate ZABBIX_ACTIVE perf_counter_en[«PhysicalDisk(<#DEVNAME>)Disk Reads/sec»,60]
Storage <#DEVNAME>: Disk write rate ZABBIX_ACTIVE perf_counter_en[«PhysicalDisk(<#DEVNAME>)Disk Writes/sec»,60]
Storage <#DEVNAME>: Disk average queue size (avgqu-sz) ZABBIX_ACTIVE perf_counter_en[«PhysicalDisk(<#DEVNAME>)Current Disk Queue Length»,60]
Storage <#DEVNAME>: Disk utilization ZABBIX_ACTIVE perf_counter_en[«PhysicalDisk(<#DEVNAME>)% Disk Time»,60]
Storage <#DEVNAME>: Disk read request avg waiting time ZABBIX_ACTIVE perf_counter_en[«PhysicalDisk(<#DEVNAME>)Avg. Disk sec/Read»,60]
Storage <#DEVNAME>: Disk write request avg waiting time ZABBIX_ACTIVE perf_counter_en[«PhysicalDisk(<#DEVNAME>)Avg. Disk sec/Write»,60]
Storage <#DEVNAME>: Average disk read queue length ZABBIX_ACTIVE perf_counter_en[«PhysicalDisk(<#DEVNAME>)Avg. Disk Read Queue Length»,60]
Storage <#DEVNAME>: Average disk write queue length ZABBIX_ACTIVE perf_counter_en[«PhysicalDisk(<#DEVNAME>)Avg. Disk Write Queue Length»,60]

The disk appears to be under heavy load

Depends on:

— <#DEVNAME>: Disk read request responses are too high (read > <$VFS.DEV.READ.AWAIT.WARN:»<#DEVNAME>«>s for 15m

— <#DEVNAME>: Disk write request responses are too high (write > <$VFS.DEV.WRITE.AWAIT.WARN:»<#DEVNAME>«>s for 15m)

This trigger might indicate disk <#DEVNAME>saturation.

This trigger might indicate disk <#DEVNAME>saturation.

Please report any issues with the template at https://support.zabbix.com

Windows generic by Zabbix agent active

For Zabbix version: 5.4 and higher

Refer to the vendor documentation.

No specific Zabbix configuration is required.

The threshold for difference of system time in seconds.

There are no template links in this template.

Name Description Expression Severity Dependencies and additional info
<#DEVNAME>: Disk is overloaded (util > <$VFS.DEV.UTIL.MAX.WARN>% for 15m) min(/Windows physical disks by Zabbix agent active/perf_counter_en[«PhysicalDisk(<#DEVNAME>)% Disk Time»,60],15m)> WARNING min(/Windows physical disks by Zabbix agent active/perf_counter_en[«PhysicalDisk(<#DEVNAME>)Avg. Disk sec/Read»,60],15m) > <$VFS.DEV.READ.AWAIT.WARN:»<#DEVNAME>«> WARNING min(/Windows physical disks by Zabbix agent active/perf_counter_en[«PhysicalDisk(<#DEVNAME>)Avg. Disk sec/Write»,60],15m) > <$VFS.DEV.WRITE.AWAIT.WARN:»<#DEVNAME>«> WARNING

System local time of the host.

Operating system architecture of the host.

Group Name Description Type Key and additional info
General System local time ZABBIX_ACTIVE system.hostname

Preprocessing:

System description of the host.

ZABBIX_ACTIVE system.uname

Preprocessing:

The number of processes.

The number of threads used by all running processes.

ZABBIX_ACTIVE perf_counter_en[«SystemThreads»]
Inventory Operating system architecture ZABBIX_ACTIVE system.sw.arch

Preprocessing:

System uptime in ‘N days, hh:mm:ss’ format.

ZABBIX_ACTIVE system.uptime

The host system time is different from the Zabbix server time.

System name has changed. Ack to close.

Please report any issues with the template at https://support.zabbix.com

Windows network by Zabbix agent active

For Zabbix version: 5.4 and higher

Refer to the vendor documentation.

No specific Zabbix configuration is required.

This macro is used in Network interface discovery. Can be overridden on the host or linked template level.

This macro is used in Network interface discovery. Can be overridden on the host or linked template level.

This macro is used in Network interface discovery. Can be overridden on the host or linked template level.

This macro is used in Network interface discovery. Can be overridden on the host or linked template level.

This macro is used in Network interface discovery. Can be overridden on the host or linked template level.

This macro is used in Network interface discovery. Can be overridden on the host or linked template level.

There are no template links in this template.

Name Description Expression Severity Dependencies and additional info
System time is out of sync (diff with Zabbix server > <$SYSTEM.FUZZYTIME.MAX>s) fuzzytime(/Windows generic by Zabbix agent active/system.localtime,<$SYSTEM.FUZZYTIME.MAX>)=0 WARNING last(/Windows generic by Zabbix agent active/system.hostname,#1)<>last(/Windows generic by Zabbix agent active/system.hostname,#2) and length(last(/Windows generic by Zabbix agent active/system.hostname))>0 INFO
Host has been restarted (uptime last(/Windows generic by Zabbix agent active/system.uptime) WARNING

Discovery of installed network interfaces.

Name Description Type Key and additional info
Network interfaces discovery DEPENDENT net.if.discovery

Preprocessing:

— JAVASCRIPT: The text is too long. Please see the template.

Filter:

Incoming traffic on the network interface.

Group Name Description Type Key and additional info
Network_interfaces Interface <#IFNAME>(<#IFALIAS>): Bits received ZABBIX_ACTIVE net.if.in[«<#IFGUID>«]

Preprocessing:

Outgoing traffic on the network interface.

ZABBIX_ACTIVE net.if.out[«<#IFGUID>«]

Preprocessing:

The number of incoming packets dropped on the network interface.

ZABBIX_ACTIVE net.if.in[«<#IFGUID>«,dropped]

Preprocessing:

The number of outgoing packets dropped on the network interface.

ZABBIX_ACTIVE net.if.out[«<#IFGUID>«,dropped]

Preprocessing:

The number of incoming packets with errors on the network interface.

ZABBIX_ACTIVE net.if.in[«<#IFGUID>«,errors]

Preprocessing:

The number of outgoing packets with errors on the network interface.

ZABBIX_ACTIVE net.if.out[«<#IFGUID>«,errors]

Preprocessing:

Estimated bandwidth of the network interface if any.

DEPENDENT net.if.speed[«<#IFGUID>«]

Preprocessing:

The type of the network interface.

DEPENDENT net.if.type[«<#IFGUID>«]

Preprocessing:

The operational status of the network interface.

DEPENDENT net.if.status[«<#IFGUID>«]

Preprocessing:

Raw data of win32_networkadapter.

ZABBIX_ACTIVE wmi.getall[rootcimv2,»select Name,Description,NetConnectionID,Speed,AdapterTypeId,NetConnectionStatus,GUID from win32_networkadapter where PhysicalAdapter=True and NetConnectionStatus>0″]

Preprocessing:

The network interface utilization is close to its estimated maximum bandwidth.

Depends on:

Recovers when below 80% of <$IF.ERRORS.WARN:»<#IFNAME>«> threshold

Depends on:

This Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Ack to close.

Depends on:

This trigger expression works as follows:

1. Can be triggered if operations status is down.

No new trigger will be fired if this interface is down.

Please report any issues with the template at https://support.zabbix.com

Windows services by Zabbix agent active

For Zabbix version: 5.4 and higher
Special version of services template that is required for Windows OS.

Refer to the vendor documentation.

No specific Zabbix configuration is required.

This macro is used in Service discovery. Can be overridden on the host or linked template level.

This macro is used in Service discovery. Can be overridden on the host or linked template level.

This macro is used in Service discovery. Can be overridden on the host or linked template level.

This macro is used in Service discovery. Can be overridden on the host or linked template level.

There are no template links in this template.

Name Description Expression Severity Dependencies and additional info
Interface <#IFNAME>(<#IFALIAS>): High bandwidth usage (><$IF.UTIL.MAX:»<#IFNAME>«>%) (avg(/Windows network by Zabbix agent active/net.if.in[«<#IFGUID>«],15m)>(<$IF.UTIL.MAX:»<#IFNAME>«>/100)*last(/Windows network by Zabbix agent active/net.if.speed[«<#IFGUID>«]) or avg(/Windows network by Zabbix agent active/net.if.out[«<#IFGUID>«],15m)>(<$IF.UTIL.MAX:»<#IFNAME>«>/100)*last(/Windows network by Zabbix agent active/net.if.speed[«<#IFGUID>«])) and last(/Windows network by Zabbix agent active/net.if.speed[«<#IFGUID>«])>0

avg(/Windows network by Zabbix agent active/net.if.in[«<#IFGUID>«],15m)

WARNING min(/Windows network by Zabbix agent active/net.if.in[«<#IFGUID>«,errors],5m)><$IF.ERRORS.WARN:»<#IFNAME>«> or min(/Windows network by Zabbix agent active/net.if.out[«<#IFGUID>«,errors],5m)><$IF.ERRORS.WARN:»<#IFNAME>«>

max(/Windows network by Zabbix agent active/net.if.in[«<#IFGUID>«,errors],5m)

WARNING change(/Windows network by Zabbix agent active/net.if.speed[«<#IFGUID>«]) 0 and last(/Windows network by Zabbix agent active/net.if.status[«<#IFGUID>«])=2 INFO <$IFCONTROL:»<#IFNAME>«>=1 and last(/Windows network by Zabbix agent active/net.if.status[«<#IFGUID>«])<>2 and (last(/Windows network by Zabbix agent active/net.if.status[«<#IFGUID>«],#1)<>last(/Windows network by Zabbix agent active/net.if.status[«<#IFGUID>«],#2))

last(/Windows network by Zabbix agent active/net.if.status[«<#IFGUID>«])=2 or <$IFCONTROL:»<#IFNAME>«>=0

AVERAGE

Discovery of Windows services of different types as defined in template’s macros.

Name Description Type Key and additional info
Windows services discovery ZABBIX_ACTIVE service.discovery

Filter:

Group Name Description Type Key and additional info
Services State of service «<#SERVICE.NAME>» (<#SERVICE.DISPLAYNAME>) ZABBIX_ACTIVE service.info[«<#SERVICE.NAME>«,state]

The service has a state other than «Running» for the last three times.

Name Description Expression Severity Dependencies and additional info
«<#SERVICE.NAME>» (<#SERVICE.DISPLAYNAME>) is not running (startup type <#SERVICE.STARTUPNAME>) min(/Windows services by Zabbix agent active/service.info[«<#SERVICE.NAME>«,state],#3)<>0 AVERAGE

Please report any issues with the template at https://support.zabbix.com

Windows by Zabbix agent active

For Zabbix version: 5.4 and higher
New official Windows template. Requires agent of Zabbix 4.4 and newer.

This template was tested on:

Install Zabbix agent on Windows OS according to Zabbix documentation.

No specific Zabbix configuration is required.

Name
Windows CPU by Zabbix agent active
Windows filesystems by Zabbix agent active
Windows generic by Zabbix agent active
Windows memory by Zabbix agent active
Windows network by Zabbix agent active
Windows physical disks by Zabbix agent active
Windows services by Zabbix agent active
Zabbix agent active

Please report any issues with the template at https://support.zabbix.com

You can also provide a feedback, discuss the template or ask for help with it at ZABBIX forums.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Читайте также:  код ошибки 0x000021a windows 10

Adblock
detector

Farik

(@f-yakhyaev)

Trusted Member

Присоединился: 4 года назад

Сообщения: 71

Topic starter
19.11.2018 13:10  

Добрый день знатоки данного форума. Нуждаюсь в вашей помощи. 

Есть zabbix сервер. Относительно недавно познакомился с данной системой мониторинга. 

Есть так же сервер Unit на нем 5 виртуалок крутится.

И на каждой ВМ агенты забикс стоят.

Сегодня сообщение на одном из сереверов в забикс высветилось. 

Lack of free swap space on Server name

Заранее погуглив понял, что файл подкачки закончился. Полазив на сервере, всё гуд. Место на диске хватает. ОПеративка минимум 8гигов указана + динамическое расширение. занято примерно 5 гигов. 

Что, куда копать, что бы эту ошибку убрать? 

Прилагаю скрин события ТУТ

Помогите пж

Тема была редактированна 4 года назад от Farik

Zerox

(@zerox)

Prominent Member Admin

Присоединился: 9 лет назад

Сообщения: 806

19.11.2018 15:41  

Это не обязательно ошибка. Я частенько триггер на свап вообще отключаю, если не возникает проблем с тем, что свап кончился. Это информационное оповещение. 

That is one solution for the problem. Unfortunately for us, we have many Windows servers and leave their pagefile (swap space) to be managed by Windows.

When Windows manages the pagefile, it leaves the pagefile size alone even sometimes filled with 0 bytes free until some program requests more memory and then if it has space on the pagefile drive, it will grow the size of the pagefile providing more free pagefile space.

This confuses the «simple» Zabbix alarm. It sees, for example, a 1.7GB page file with 0 bytes free and throws an alarm. It didn’t see that Windows was managing the pagefile and the drive had plenty of disk space available for pagefile growth.

It’d be great if Zabbix could (psuedo code follows):
IF «Windows is managing the pagefile» THEN
IF
pagefile free space % is lower than threshold
AND
drive containing pagefile has less free space than 2nd threshold
THEN
throw trigger (send alarm)
ELSE #assumes fixed pagefile size on a drive
IF
pagefile free space % is lower than threshold
THEN
throw trigger (send alarm)
FI

This trigger complexity is beyond my Zabbix skill rating.
If anyone has suggestions on how to implement this it would greatly help.
(We chase 4 to 5 production level swap space alarms each day. Correction, ignore. Which scares us and should scare Zabbix developers. Crying wolf is not a good thing.)

Bill

Проверка отправки списка процессов

Теперь проверим, как все это будет работать. Для этого идем на целевой сервер и нагружаем его чем-нибудь. Я для примера запустил в двух разных консолях по команде:

# cat /dev/zero | bzip2 -c > /dev/null
# md5sum /dev/urandom

Они достаточно быстро нагрузили единственное ядро тестового сервера, так что оставалось только подождать активации триггера. Через 5 минут это случилось.

Иду в раздел Последние данные и вижу там список процессов, которые нагрузили мой сервер.

Что мне в итоге и требовалось. Теперь нет нужды каким-то образом проверять, что конкретно нагружает сервер. В момент пиковой нагрузки я получу список запущенных процессов в отдельный айтем. Для полного списка процессов все делается по аналогии.

What is this Zabbix Free Disk Space Is Less Than 20 On Volume alert?

In general, Zabbix greatly helps in monitoring the servers. Zabbix triggers alerts to indicate upcoming problems on the server.

One such alert is this free disk space less alert.

The trigger gives this alert when the disk space is less than 20%  on the volume. Here, the Zabbix allows customization on the threshold at which the system triggers the alert.

Moreover, based on the purpose of the server, we see some customers set it at even low values like 10%. A snippet of Zabbix dashboard with such alerts show up as:

In such situations, we firstly find out what is consuming the disk space and take action accordingly.

Let’s see how our Engineers found a fix for this Zabbix message.

Zabbix: Отсутствие свободного места для подкачки на решении Zabbix server

s http-equiv=»Content-Type» content=»text/html;charset=UTF-8″>tyle=»clear:both;»>

проблема

При использовании Zabbix для мониторинга некоторых облачных хостов вы можете столкнуться с:

Lack of free swap space on Zabbix server1

Используйте команду:

free -m

видеть:

Общие, использованные и свободные значения свопа равны 0. Это потому, что Zabbix не учитывает пользователей облачного хоста.

Этапы обработки:

1. Управление-шаблон-шаблон ОС Linux-Trigger

2. Выберите «Отсутствие свободного места для подкачки на {HOST.NAME}».

3. Изменить выражение

{Template OS Linux:system.swap.size.last(0)}<501

превратиться в

{Template OS Linux:system.swap.size.last(0)}<50 and {Template OS Linux:system.swap.size.last(0)}<>0

Нажмите «Обновить», чтобы сохранить, подождите некоторое время, оно станет «Решено», подтвердите

Перепечатано по адресу: https://blog.51cto.com/9499607/2163615

Интеллектуальная рекомендация

Глава первая: Причина В большинстве анекдотов в Интернете говорится, что программисты относительно тупые, плохие слова и в основном мужчины. Я один из тысяч программистов. Обычно я не знаю, как правил…

Всегда был спрос, надеясь увидеть в реальном времени рейтинг моего сайта в Baidu Я использовал некоторые инструменты, либо медленный ответ, либо результаты не точные или в режиме реального времени Поэ…

Алгоритм обнаружения характерных точек Обнаружение угла Харриса                                 Обнаружение функции SIFT…

По просьбе пользователей сети напишите пример использования Selenium Grid для управления несколькими системами и несколькими браузерами для параллельного выполнения тестов. Поскольку у меня здесь две …

Эта проблема возникает, когда используется openrowset. Просто выполните следующий код:           http://www.cnblogs.com/wayne-ivan/archive/2008/01/07/1028759.html…

Вам также может понравиться

В проекте .net я часто сталкиваюсь с необходимостью автоматически делать скриншот кадра после загрузки видео. Вот метод использования ffmpeg для автоматического создания скриншота Сначала загрузите фа…

Ленивая загрузка не удалась, потому что @Responsebobode JSON преобразует Getroles по умолчанию, которая заканчивается пользователем, поэтому ленивая загрузка недействительна. Если вы предоставляете TO…

virtualenv установка Основное использование Создайте виртуальную среду для проекта: virtualenv venv создаст папку в текущем каталоге, содержащую исполняемые файлы Python и копию библиотеки pip, чтобы …

Java.io.fileNotfoundException: файл: d: Code xml-load target xx.jar! Xxx (имя файла, имя каталога или синтаксис громкости неверно.) 1. При использовании Spring Boot для применения к JAR не…

Облачный сервер zabbix server сообщил об ошибке: Отсутствие бесплатного свопа на Zabbix сервере

s http-equiv=»Content-Type» content=»text/html;charset=UTF-8″>tyle=»clear:both;»>

1. Проблема

Lack of free swap space on Zabbix server

Такая ситуация часто возникает при мониторинге облачных хостов. Хотя память в основном бесполезна, появляется это сообщение. Поскольку zabbix не учитывает облачный хост, облачный хост не имеет подкачки. Когда физической памяти системы недостаточно, раздел подкачки освободит часть физической памяти для текущей операции. Использование программы. Это означает, что должна быть физическая память Сообщение об ошибке: Решение:

Этапы обработки:

  1. Администрирование-Шаблон-Шаблон ОС Linux-Триггер
  2. Выберите «Отсутствие свободного места для подкачки» на {HOST.NAME}.
  3. Изменить выражение

превратиться в

Нажмите «Обновить», чтобы сохранить, подождите некоторое время, он станет «Решенным», подтвердите

Если вышеперечисленное не помогло, проверьте следующие методы:

Как добавить раздел SWAP на облачный сервер

Как увеличить своп?

1. Проверьте, включен ли раздел подкачки в текущей системе.

2. Если функция раздела подкачки не включена, создайте специальный файл для раздела подкачки.

Примечание: dd: скопируйте файл с блоком указанного размера и выполните указанное преобразование при копировании, если = имя входного файла, то есть укажите исходный файл, of = имя выходного файла, то есть укажите файл назначения. Размер этого файла равен размеру count, умноженному на размер bs, размер указанной выше команды составляет 4294971392, что составляет 4 ГБ

Наш тест не должен быть таким большим

3. Используйте команду mkswap, чтобы превратить вновь созданный файл в раздел подкачки.

4. Проверьте, равно ли значение параметра ядра vm.swappiness 0, если оно равно 0, отрегулируйте его до 30 или 60 в соответствии с фактическими потребностями.

Команда настройки

Примечание: если вы хотите изменить его навсегда, отредактируйте файл /etc/sysctl.conf

5. Включите функцию подкачки этого раздела подкачки.

6. Просмотрите добавленный эффект.

Ссылка для справки:

Zabbix: Отсутствие свободного места для подкачки на сервере Zabbix решение: https://blog.51cto.com/9499607/2163615

Ссылка для ссылки: https://blog.csdn.net/windle89/article/details/77771483 тревога zabbix Отсутствие свободного места подкачки на zabbix

Ссылка для справки: https://yq.aliyun.com/articles/52098 Хост Alibaba Cloud Cloud добавляет раздел подкачки и оптимизацию производительности подкачки

Интеллектуальная рекомендация

Глава первая: Причина В большинстве анекдотов в Интернете говорится, что программисты относительно тупые, плохие слова и в основном мужчины. Я один из тысяч программистов. Обычно я не знаю, как правил…

Всегда был спрос, надеясь увидеть в реальном времени рейтинг моего сайта в Baidu Я использовал некоторые инструменты, либо медленный ответ, либо результаты не точные или в режиме реального времени Поэ…

Алгоритм обнаружения характерных точек Обнаружение угла Харриса                                 Обнаружение функции SIFT…

По просьбе пользователей сети напишите пример использования Selenium Grid для управления несколькими системами и несколькими браузерами для параллельного выполнения тестов. Поскольку у меня здесь две …

Эта проблема возникает, когда используется openrowset. Просто выполните следующий код:           http://www.cnblogs.com/wayne-ivan/archive/2008/01/07/1028759.html…

Вам также может понравиться

В проекте .net я часто сталкиваюсь с необходимостью автоматически делать скриншот кадра после загрузки видео. Вот метод использования ffmpeg для автоматического создания скриншота Сначала загрузите фа…

Ленивая загрузка не удалась, потому что @Responsebobode JSON преобразует Getroles по умолчанию, которая заканчивается пользователем, поэтому ленивая загрузка недействительна. Если вы предоставляете TO…

virtualenv установка Основное использование Создайте виртуальную среду для проекта: virtualenv venv создаст папку в текущем каталоге, содержащую исполняемые файлы Python и копию библиотеки pip, чтобы …

Java.io.fileNotfoundException: файл: d: Code xml-load target xx.jar! Xxx (имя файла, имя каталога или синтаксис громкости неверно.) 1. При использовании Spring Boot для применения к JAR не…

Zabbix 4 на CentOS 7

Считаем, что у нас есть установленный и предварительно минимально настроенный CentOS 7. В качестве web-сервера для Zabbix будет использоваться nginx.

Подключаем репозиторий nginx и устанавливаем его:

Запускаем nginx и добавляем в автозагрузку.

Дальше устанавливаем менеджер процессов FastCGI (FPM) – php-fpm. Для этого подключаем репозиторий remi

Устанавливаем php 7.1 и модули к нему

Запускаем и добавляем в автозагрузку php-fpm

Проверяем, запустился ли он.

Все в порядке, но запустим его через unix сокет. Для этого правим конфиг

Перезапустим php-fpm проверим, запущенный сокет

Дальше установим свежую версию сервера баз данных MariaDB. Подключаем нужный репозиторий – Идем сюда и выбираем нужные параметры операционки

Устанавливаем сервер баз данных

Запускаем mariadb и добавляем в автозагрузку

Запустим скрипт начальной конфигурации mysql и создадим пароль для root. Все остальное можно оставить по-умолчанию.

Сделаем свой конфиг для mariadb, оптимизированный под zabbix

Перезапустим mariadb и убедимся, что он запустился

Приступим к установке Zabbix Server 4.0, первым делом нужно подключить репозиторий

Теперь запускаем установку Zabbix-server

После установки, создаём базу данных zabbix, пользователя zabbix и заполняем базу

Отредактируем файл конфигурации сервера zabbix, этих минимальных настроек достаточно, для работы сервера

Запустим zabbix и добавим его в автозагрузку

Можно проверить лог файл на наличие ошибок

Остается сделать конфиг nginx для работы web интерфейса zabbix. В моем случае nginx работает на том же сервере, где сам zabbix, а других виртуальных хостов нет, правим дефолтный конфиг

Проверим конфиг на ошибки и перезапустим nginx

Важный нюанс – необходимо изменить права доступа и назначить владельцем nginx

Этот нужно будет проделывать после каждого обновления php или zabbix. По-умолчанию zabbix идет в комплекте с apache и рассчитан на работу с ним. После установки или обновления, он делает его владельцем директории /etc/zabbix/web.

С серверной частью всё, продолжаем установку zabbix сервера через Zabbix Frontend. На одном из этапов указываем параметры доступа к базе данных. После завершения установки, авторизуемся на сервере со стандартной учетной записью

Изменение стандартных шаблонов мониторинга

В шаблоне Template App Zabbix Agent отключаем триггер Version of zabbix_agent(d) was changed on . В шаблоне Template OS Linux меняем в триггере Disk I/O is overloaded on значение со стандартных 20% до 50%. В этом же шаблоне в правиле обнаружения Mounted filesystem discovery добавим еще один прототип триггера, скопировав Free disk space is less than 20% on volume

В новом шаблоне вместо 20% указываем 5% и ставим важность «Высокая». В этом же шаблоне в триггере Lack of free swap space on меняем порог срабатывания с 50% до 20%

В шаблоне Template OS Windows отключаем Правило обнаружения Windows service discovery. Если нужен мониторинг какой-то службы windows, для этого можно сделать отдельный шаблон.

Общие настройки

В общих настройках zabbix server, которые располагаются в разделе Администрирование -> Общие меняем следующие параметры:

В разделе Рабочее время выставляем актуальные рабочие часы. В разделе Опции отображения триггеров меняем значения Отображать триггеры в состоянии ОК в течении и Мигание триггеров при изменении состояния на 1 минуту. В разделе Прочее меняю Обновление неподдерживаемых элементов данных на 1 минуту. Это актуально во время отладки новых шаблонов.

Настройки оповещений в Telegram описаны тут.

Давайте посмотрим на типовые ситуации и к чему они приводят при наличии и отсутствии swap. О метриках «конкуренции за память» я рассказываю в докладе про cgroup v2 .

Без конкуренции или с малой конкуренцией за память

  • При наличии swap : мы можем положить в swap анонимную память, которая редко используется и нужна только в небольшой части жизненного цикла процесса. Это позволяет использовать данную память для улучшения коэффициента попаданий в кэш и других оптимизаций.
  • Без swap : не можем складывать в swap редко используемую анонимную память, поскольку она вынуждена храниться только в памяти. Не факт, что это сразу приведёт к проблеме, однако в некоторых рабочих нагрузках производительность может упасть из-за устаревших анонимных страниц, забирающих место у более важных задач.

С умеренной или высокой конкуренцией за память

  • При наличии swap : у всех типов памяти одинаковая вероятность высвобождения. Это означает большую вероятность успешного высвобождения страниц — мы можем высвобождать страницы, которые не будут быстро снова приводить к отказу (к пробуксовке ).
  • Без swap : анонимные страницы ограничены памятью, т.к. не имеют альтернатив для хранения. Вероятность успешного долгосрочного высвобождения страниц ниже, поскольку оно доступно только для некоторых типов памяти. Риск пробуксовки страниц выше. Случайный читатель может подумать, что так всё равно будет лучше, поскольку не случится нагрузки на ввод/вывод диска, но это не так: мы попросту переносим disk I/O из-за swapping’а на сброс горячего страничного кэша и сегментов кода, которые нам скоро понадобятся.

При временных всплесках в потреблении памяти

  • При наличии swap : устойчивость к временным всплескам выше, однако в случае резкой нехватки памяти время между пробуксовкой и работой OOM killer может вырасти. Нам лучше видны причины нагрузки на память и мы можем более рационально повлиять на них, можем осуществить контролируемое вмешательство.
  • Без swap : OOM killer вызывается быстрее, поскольку анонимные страницы ограничены памятью и не могут быть высвобождены. Мы скорее столкнёмся с пробуксовкой, однако время между ней и OOMing’ом сократится. Будет лучше или хуже — зависит от конкретного приложения. Например, основанное на очередях приложение может захотеть потребовать такого быстрого перехода от пробуксовки к OOMing’у. Тем не менее, всё равно уже слишком поздно для полезных действий — OOM killer вызывается только в случаях резкой нехватки памяти. Вместо того, чтобы полагаться на такое поведение, в первую очередь лучше позаботиться о более оппортунистическом подходе (т.е. направленном на следование своим интересам —прим. перев.) к убиванию процессов при достижении состояния конкуренции за память.

Окей, я хочу системный swap, но как его настроить для конкретных приложений?

Вы же не думали, что в этой статье не будет упоминаний использования cgroup v2?

Очевидно, что общему эвристическому алгоритму тяжело не ошибаться всё время, поэтому важно иметь возможность дать необходимые инструкции ядру. Исторически единственной настройкой, которую можно было применить на системном уровне, являлась vm.swappiness

У неё две проблемы: vm.swappiness крайне сложно разумно применять, потому что она является лишь маленькой частью гораздо большей эвристической системы, и она применима лишь ко всей системе, но не к ограниченному набору процессов.

Можно также использовать mlock для фиксации страниц в памяти, но такой подход требует либо модификации кода программы и забав с LD_PRELOAD, либо ужасных танцев с отладчиком во время исполнения приложения. В языках, основанных на виртуальных машинах, всё это тоже не так-то хорошо работает, поскольку у вас обычно нет возможности контролировать распределение памяти и приходится делать mlockall, у которого нет точных настроек для тех страниц, что действительно важны.

В cgroup v2 есть определяемая на каждую cgroup настройка memory.low, которая позволяет сказать ядру отдавать предпочтение другим приложениям для высвобождения до достижения определённого порога используемой памяти. Нет гарантий, что ядро предотвратит swapping частей приложения, однако оно будет предпочитать высвобождение для других приложений в случае конкуренции за память. В нормальных условиях логика swap’а в ядре в целом достаточно хороша, так что разрешение оппортунистически выносить в swap страницы в общем случае повышает системную производительность. Пробуксовка swap’а в условиях сильной конкуренции за память не идеальна, но это скорее просто особенность ситуации нехватки памяти, чем проблема swapper’а. В ситуациях, когда давление на память начинает расти, вы обычно хотите быстрого завершения работы некритических процессов посредством их «самоубийства».

И в этом вопросе нельзя просто положиться на OOM killer. Потому что OOM killer вызывается только в самых критичных ситуациях, когда система уже оказалась в значительно нездоровом состоянии и, возможно, находилась в нём некоторое время. Необходимо самостоятельно и оппортунистически разрешить ситуацию ещё до того, как задумываться об OOM killer’е.

Тем не менее, выявить давление на память достаточно трудно с помощью традиционных счётчиков памяти в Linux. Нам доступно нечто, что каким-то образом относится к проблеме, однако скорее по касательной: потребление памяти, количество операций сканирования страниц и т.п. — и по одним этим метрикам очень трудно отличить эффективную конфигурацию памяти от той, что приводит к конкуренции за память. У нас есть группа в Facebook, возглавляемая Johannes’ом и работающая над новыми метриками, упрощающими демонстрацию давления на память, — это должно помочь нам в будущем. Больше информации об этом можно получить из моего доклада про cgroup v2, где я начинаю подробнее рассказывать об одной из метрик.

Содержание

  1. Нехватка памяти на сервере
  2. Как быстро выяснить какой процесс в Linux использует пространство подкачки (swap)
  3. High memory usage with little swap space used
  4. 1 Answer 1
  5. How to increase swap memory in Windows? [duplicate]
  6. 3 Answers 3
  7. “Lack of free swap space” on Windows Server
  8. 3 Answers 3

Нехватка памяти на сервере

Не так давно я создавал тред, где переживал что апач с одним единственным сайтом из хмтл страничек отжирает всю память на серваке. Меня успокоили, что он отжирает свободную память под кеш, что свободная память все равно никак не используется и как только она понадобится, то апач мне её вернет. Прошло несколько месяцев, сервер никто не трогал. Сегодня установил zabbix и он сразу же выдал мне сообщение о проблеме Lack of free swap space on Zabbix server. Получается память для него так и не освободилась? Как с этим боротся? Не может же быть такого, что apache2 со статическим сайтом + zabbix отжирают 2 гигабайта оперативки?

Не ужеле не можете посмотреть, кто сколько памяти отжирает?

Судя по выводу free — cвоп у вас не подключенотсутствует, соответственно свободного пространства в нем 0.

Апач всё отжирает. Поидее он должен отжирать неиспользуемую память для убыстрения работы, но вот сейчас память нужна, а он её не отдает

Lack of free swap space (Отсутствие свободного пространства подкачки)

Не может же быть такого, что apache2 со статическим сайтом + zabbix отжирают 2 гигабайта оперативки?

Вот сколько памяти у тебя занято приложениями.

Странно, VPS машину создали без свапа получается? теперь вручную его пилить

Как быстро выяснить какой процесс в Linux использует пространство подкачки (swap)

Заметка очень короткая и призвана администраторам помочь быстро найти процессы которые максимально используют пространство swap. Что делать с этими процессами — это уже отдельная тема, главное найти кто потребляет swap.

Исходные данные: ОС Oracle Linux 7;
Задач: Найти потребителя SWAP

Типичная ситуация на сервере с системой мониторинга — это аларм вида:
prod-srv-01 Low free swap space (free: 0.15 %, threshold: 10%, alert started: 8.79 %)

Вначале немного теории, о том как получить информацию о распределении памяти процессами в Linux.

  • /proc/meminfo — псевдо-файл который сообщает статистику об использовании памяти в системе. Вы также можете использовать утилиты free, vmstat и другие инструменты, чтобы узнать ту же информацию;
  • /proc/$/smaps, /proc/$/status и /proc/$/stat — используйте эти псевдо-файлы для поиска информации о потреблении памяти каждым процессом ($ замените на номер процесса);
  • smem — утилита (скрипт python), которая поможет вывести информацию в более удобном виде;

    Теперь идем на сервер и смотрим:

    Мы видим, что swap заполнен на 100% — это плохо.

    Попробуем быстро выяснить кто основной потребитель, для этого обратимся к /proc/*/status
    Ниже простой сценарий на bash который выдаст нам список потребителей swap:

    Результат будет длинным, я покажу только TOP потребителей:

    Мы видим, что основной потребитель — это процесс ora_j001_bs. На сервере установлен Oracle и один из процессов потребляет swap.
    На втором месте мы видим процесс rsyslogd — думаю он в представлении не нуждается.

    Если на потребителя №1 мы не можем повлиять быстро, то на потребителя №2 (rsyslogd) можем — это попытаться его перазапустить.

    Выполняем перезапуск rsyslogd:

    И смотрим состояние swap:

    Мы видим, что стало доступно 1.6 GB, а это уже более 30% от размера swap, что вполне нас должно устроить на первое время.

    На этом все, до скорых встреч. Если у Вас возникли вопросы или Вы хотите чтобы я помог Вам, то Вы всегда можете связаться со мной разными доступными способами.

    High memory usage with little swap space used

    I have 8Gb usable memory and 10Gb swap space available

    My memory usage is 90-95% used while only +/- 1gb swap space is used.

    Do I misunderstand the purpose of swap space or is there some issue on my side?

    2GB. I cannot and will not compare it to Windows and it’s irrelevant for your question. In it you seem to imply you should be having more swap used which is nonsense. And the list you gave can easily take that much memory and more. FYI, any modern web browser will gulp as many as it can and what the tabs are matters way more than how many they are. – user589808 Oct 5 ’16 at 12:32

    1 Answer 1

    If you’d run the top command, you’d see something in line with this:

    In this particular case, we have 32 gigs of RAM, of which just 172 MiB is shown as «free».
    We do not have swap at all in our case.

    Yet, to calculate the «real» free memory, add «cached Mem» to «free» and you would see that almost all of the memory is free.
    The trick is that «cached Mem» is basically disk cache — Linux would use most of available free memory just for that to speed up disk operations. Do not worry — should a necessity for extra memory arise, Linux can instantly reduce the disk cache and use that for whatever purposes are needed. You only need to start worrying once both «free» and «cached Mem» are very small — that would mean you probably need a RAM upgrade to keep things running smoothly.

    As to swap, I would agree with the previous replies that you don’t want to use it in vain in cases where you have plenty of RAM. And 8 gigs are plenty for a desktop, if you are not using some heavy graphics processing software or such.

    How to increase swap memory in Windows? [duplicate]

    I bought a new system with 4 GB of RAM. I don’t know how do I check how much swap memory I have allocated. I know that we can increase RAM physically. I want to increase swap memory on windows. How can I increase swap memory? Is that possible?

    3 Answers 3

    Taken directly from the documentation, which is the first Google result for «windows change swap space»:

    Open System by clicking the Start button Picture of the Start button, right-clicking Computer, and then clicking Properties.

    In the left pane, click Advanced system settings. Administrator permission required If you’re prompted for an administrator password or confirmation, type the password or provide confirmation.

    On the Advanced tab, under Performance, click Settings.

    Click the Advanced tab, and then, under Virtual memory, click Change.

    Clear the Automatically manage paging file size for all drives check box.

    Under Drive [Volume Label], click the drive that contains the paging file you want to change.

    Click Custom size, type a new size in megabytes in the Initial size (MB) or Maximum size (MB) box, click Set, and then click OK.

    This applies to Windows 7, 8, and all earlier versions back to at least XP. The procedure hasn’t changed in over a decade.

    “Lack of free swap space” on Windows Server

    I have several Windows Server 2012 Virtual Machines, which are monitored by zabbix 2.4. The zabbix throws «Lack of free swap space» for some VMs, but there are disk and memory free on these machines, and the Virtual Memory is set to OS Control on Windows.

    What means «Lack of free swap space» on Windows Server? It’s disk space? RAM? Virtual Memory?

    How can I resolve it?

    3 Answers 3

    I have just resolved my item with the same error. It is related to the windows page file and in my case it was configured to be automatically managed by windows.

    In my situation Windows didn’t think it wanted a higher swap space and wasn’t taking out more space but it was at 0 remaining so zabbix was reporting the error. I have chosen to move to a custom page file size — just remember to hit set prior to saving as it won’t always retain after a reboot.

    System -> Advanced System Settings -> Advanced Tab -> Performance Settings -> Advanced Tab and changed to use a manual page file rather than the system allocated page file

    That is one solution for the problem. Unfortunately for us, we have many Windows servers and leave their pagefile (swap space) to be managed by Windows.

    When Windows manages the pagefile, it leaves the pagefile size alone even sometimes filled with 0 bytes free until some program requests more memory and then if it has space on the pagefile drive, it will grow the size of the pagefile providing more free pagefile space.

    This confuses the «simple» Zabbix alarm. It sees, for example, a 1.7GB page file with 0 bytes free and throws an alarm. It didn’t see that Windows was managing the pagefile and the drive had plenty of disk space available for pagefile growth.

    It’d be great if Zabbix could (psuedo code follows): IF «Windows is managing the pagefile» THEN IF pagefile free space % is lower than threshold AND drive containing pagefile has less free space than 2nd threshold THEN throw trigger (send alarm) ELSE #assumes fixed pagefile size on a drive IF pagefile free space % is lower than threshold THEN throw trigger (send alarm) FI

    This trigger complexity is beyond my Zabbix skill rating. If anyone has suggestions on how to implement this it would greatly help. (We chase 4 to 5 production level swap space alarms each day. Correction, ignore. Which scares us and should scare Zabbix developers. Crying wolf is not a good thing.)

  • Open ‘Advanced System Settings’ and navigate to the ‘Advanced’ tab. Click the ‘Settings’ button under the ‘Performance’ section to open another window. Click on the new window’s ‘Advanced’ tab, and click ‘Change’ under the ‘Virtual Memory’ section. There isn’t a way to directly adjust the size of the swap file.

    How do I increase the size of my swap file?

    Just follow these steps:

    1. Make all swap off. sudo swapoff -a.
    2. Resize the swapfile. sudo dd if=/dev/zero of=/swapfile bs=1M count=1024.
    3. Make swapfile usable. sudo mkswap /swapfile.
    4. Make swapon again. sudo swapon /swapfile.

    2 окт. 2014 г.

    How do I increase virtual memory in Windows 10?

    Increasing Virtual Memory in Windows 10

    1. Go to the Start Menu and click on Settings.
    2. Type performance.
    3. Choose Adjust the appearance and performance of Windows.
    4. In the new window, go to the Advanced tab and under the Virtual memory section, click on Change.

    How do I increase physical memory in Windows 10?

    How to increase RAM in Windows 10

    1. STEP 1 – Know your installed RAM. Press the Windows key+I keys together. Then, click on the “System“. After that, click on the “About” on the left-hand side. …
    2. STEP 2 – Increase the virtual RAM. Press Windows key+R to open the Run window on your computer. In the Run window, type “sysdm.

    11 дек. 2020 г.

    How big should swap file be?

    Many years ago, the rule of thumb for the amount of swap space that should be allocated was 2X the amount of RAM installed in the computer. Of course that was when a typical computer’s RAM was measured in KB or MB. So if a computer had 64KB of RAM, a swap partition of 128KB would be an optimum size.

    How much swap space should I allocate?

    If you go by Red Hat’s suggestion, they recommend a swap size of 20% of RAM for modern systems (i.e. 4GB or higher RAM). CentOS has a different recommendation for the swap partition size. It suggests swap size to be: Twice the size of RAM if RAM is less than 2 GB.

    How do I know my swap size?

    Check swap usage size and utilization in Linux

    1. Open a terminal application.
    2. To see swap size in Linux, type the command: swapon -s .
    3. You can also refer to the /proc/swaps file to see swap areas in use on Linux.
    4. Type free -m to see both your ram and your swap space usage in Linux.

    1 окт. 2020 г.

    What is the optimal virtual memory size for 4GB RAM?

    If your computer has 4GB RAM, the minimum paging file should be 1024x4x1. 5=6,144MB and the maximum is 1024x4x3=12,288MB. Here 12GB for a paging file is enormous, so we won’t recommend the upper limit since the system may be unstable if the paging file increases over a certain size.

    Does increasing virtual memory speed up computer?

    It’s a trap!

    No. Adding physical Ram may make certain memory intensive programs faster, but increasing the page file will not increase speed at all it just makes more memory space available for programs. This prevents out of memory errors but the “memory” it is using is extremely slow (because its your hard drive).

    Will increasing virtual memory increase performance?

    Virtual memory is simulated RAM. … When virtual memory is increased, the empty space reserved for RAM overflow increases. Having enough available space is absolutely necessary for virtual memory and RAM to function properly. Virtual memory performance can be improved automatically by freeing up resources in the registry.

    How do I increase physical memory?

    How to Free Up Memory on Your PC: 8 Methods

    1. Restart Your PC. This is a tip you’re probably familiar with, but it’s popular for a reason. …
    2. Check RAM Usage With Windows Tools. …
    3. Uninstall or Disable Software. …
    4. Use Lighter Apps and Manage Programs. …
    5. Scan for Malware. …
    6. Adjust Virtual Memory. …
    7. Try ReadyBoost.

    21 апр. 2020 г.

    Why available physical memory is low?

    Answer: Physical memory is how much RAM you have installed in your computer. … Available memory refers to how much RAM is not already being used by the computer. Because loading the operating system takes up memory, your available memory drops right after your computer boots up.

    Why isn’t my computer using all its RAM?

    If Windows 10 isn’t using all RAM, this can be because the RAM module isn’t properly seated. If you installed new RAM recently, it’s possible that you didn’t lock it properly thus causing this problem to appear. To fix the issue, you need to unplug your PC, disconnect it from the power outlet and open it.

    Should I increase pagefile size?

    If you receive an out of memory error, you may need to increase your page file size for Windows on the fastest drive on your system with available space. The page file instructs the drive to set a minimum and maximum amount for providing memory to that specific drive and any applications run on it.

    Does page file have to be on C drive?

    You do not need to set a page file on each drive. If all drives are separate, physical drives, then you can get a small performance boost from this, though it would likely be negligible.

    Does 16GB RAM need a swap partition?

    If you have a large amount of RAM — 16 GB or so — and you don’t need hibernate but do need disk space, you could probably get away with a small 2 GB swap partition. Again, it really depends on how much memory your computer will actually use. But it’s a good idea to have some swap space just in case.

    • Partition Wizard

    • Partition Manager

    • What Is Swap Usage & How to Reduce It?

    What Is Swap Usage & How to Reduce It? [Partition Manager]

    By Linda | Follow |
    Last Updated May 11, 2021

    What is swap usage? What is an acceptable swap usage percentage? What should I do if the swap usage is too high? In this post, MiniTool Partition Wizard shows you how to reduce the swap usage by adding the swap space.

    If you are a Linux user, you may notice that there is a swap partition on your computer. The function of this partition is similar to virtual memory (paging file) on Windows.

    When the actual memory is not enough, the operating system will take out part of the temporarily unused data from the memory and place it into the swap partition, thereby freeing up enough memory space for the currently running program.

    In Linux, users can use command «~$ free» or «~$ free -h» to display swap utilization. In Windows, the system will not display the swap usage or virtual memory usage. In most case, users may see the swap usage on third-party software like Rainmeter.

    Linux Swap – An Alternative to PC Memory Not Enough

    What Is an Acceptable Swap Usage Percentage?

    I have rainmeter on my desktop… My CPU usage is about 10%, my RAM is at 33%, but my SWAP Usage is at 57%. Is that normal, or could this mean I have an issue somewhere? —reddit.com

    Some people may find that the swap usage on their PCs is very high and they are worried about this. What is an acceptable SWAP Usage percentage? Should I take measures to decrease the swap usage?

    Actually, swap usage percentage is not so much important. Instead, you should check the swap space, making sure it is not too big or too small.

    According to Microsoft, the Windows swap space (virtual memory) should be 1.5 times or twice the physical memory. As for Linux systems, you can refer to RedHat’s saying. The recommended swap space is as follows:

    Amount of RAM in the system Recommended swap space Recommended swap space if allowing for hibernation
    <=2GB 2 times the amount of RAM 3 times the amount of RAM
    2GB – 8GB Equal to the amount of RAM 2 times the amount of RAM
    8GB – 64GB At least 4 GB 1.5 times the amount of RAM
    > =64GB Hibernation not recommended

    How to Reduce Swap Usage

    In most cases, high swap usage may mean that the RAM has heavy load. You can reduce the swap usage by reducing the RAM usage or adding the swap usage.

    In this part, I will show you how add the swap space in Windows and Linux. In Windows, please follow steps below:

    • Open File Explorer, right-click This PC, and select Properties.
    • Select Advanced system settingsin the pop-up window.
    • In the System Properties window > Advanced tab, click Settingsin Performance.
    • Skip to Advanced tab in the pop-up window, and click Changein Virtual memory.
    • Uncheck Automatically manage paging file size for all drives.
    • Click partition C, check No paging file, and click Setto save it.
    • Click Yesto confirm.
    • Select a non-system partition and then check Custom size.
    • Set a proper virtual memory value. Please note that it’s recommended that the value in Initial sizeis the same as that in Maximum size.
    • Click Setand OK to save changes.

    change virtual memory

    In Linux, you can use the following commands to add the swap space:

    • dd if=/dev/zero of=swapfile bs=1M count=1024 (This command creates a swapfile with specified size. bs is the unit bytes, you can also designate the unit to M or G manually. The swapfile size is bs*count.)
    • mkswap swapfile (This command makes the file the swap format. You should change the swapfile path accordingly.)
    • swapon swapfile (This command enables the swapfile. Please change the path accordingly.)
    • Modify /etc/fstab In the file, add command line «swapfile swap swap defaults 0 0«. This makes the swapfile valid permanently. Similarly, please change the path accordingly.

    About The Author

    Linda

    Position: Columnist

    Author Linda has been working as an editor at MiniTool for 1 year. As a fresh man in IT field, she is curious about computer knowledge and learns it crazily. Maybe due to this point, her articles are simple and easy to understand. Even people who do not understand computer can gain something.

    By the way, her special focuses are data recovery, partition management, disk clone, and OS migration.

    Понравилась статья? Поделить с друзьями:
  • High definition video driver для windows 7
  • High definition audio driver для windows 10 ошибка
  • High definition audio driver для windows 10 микрофон
  • High definition audio driver windows 10 передняя звуковая панель
  • High definition audio device драйвер windows 10 x64 microsoft