Sponsored Content
Top Forums UNIX for Beginners Questions & Answers High Memory threshold notification script Post 303042508 by MadeInGermany on Friday 27th of December 2019 09:01:53 AM
Old 12-27-2019
There are several further mistakes in your script:
Text message in MEM_LOAD (that you cannot compare with a numeric value),
two useless code lines about PROC and CPU_LOAD,
useless use of echo,
useless use of cat,
unnecessary and unsafe use of a /tmp/ file.
These 2 Users Gave Thanks to MadeInGermany For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unix Script to find and kill a process with high memory utilization

Hi Unix Gurus i am somewhat new to unix scripting so need your help to create a script as below. # This script would find the process consuming memory beyond a certain #limit. if the meemory consumption is more than 100% for a period of 1 # minute for the specific process. the script would... (0 Replies)
Discussion started by: robinforlinux
0 Replies

2. Solaris

How to change CPU threshold high temperature

Hi, I have a NETRA 240 server wich should work on high temperature environment (up to 50 deg celsius). After reaching ~48 deg, the system is shuting down. The HighShutDownThreshold of the CPU is set to 89 deg The PowerOffThreshold of the CPU is set to 96 deg Please help me to change these... (2 Replies)
Discussion started by: Danielz
2 Replies

3. HP-UX

11.31 System Memory too high

Hello, I noticed very high system memory utilization on my new 11.31 Itanium systems. System memory is more than 11GB on 32 GB system. Comparing this to 11.23 it's more than double ... How do I find out what is using it? Is there a way to reduce it? Thank you, Kubo (4 Replies)
Discussion started by: trunecm1
4 Replies

4. Shell Programming and Scripting

help in high memory usage alert script

can any one please help me to shell script high memory usage alert (6 Replies)
Discussion started by: robo
6 Replies

5. Solaris

zone breaching 'capped-memory' threshold

Calling upon all Solaris zone experts. I have a Sun T3-1 that is running a few whole-root zones. I've set the 'capped-memory' setting on all the zones. However, I have a problem on the one zone. Under load it uses more memory that has been allocated to it. zonecfg -z sunrep02 export ... (4 Replies)
Discussion started by: soliberus
4 Replies

6. UNIX for Dummies Questions & Answers

Threshold for swap memory

hi guys the monitoring team is using a tool for monitoring linux boxes and they set an alarm for swap memory to 10%(critical) I really has no idea when swap memory usage is high.... Can someone recommend me a threshold for this? when is warning or critical and this parameters can affect... (3 Replies)
Discussion started by: karlochacon
3 Replies

7. Shell Programming and Scripting

Cron job and shell script to kill a process if memory gets to high

Hello, I'd like to set a cron job that runs a shell script every 30 minutes or so to restart a java based service if the memory gets above 80%. Any advice on how to do this? Thanks in advance! - Ryan (19 Replies)
Discussion started by: prometheon123
19 Replies

8. Solaris

[DOUBT] Memory high in idle process on Solaris 10 (Memory Utilization > 90%)

Hi Experts, Our servers running Solaris 10 with SAP Application. The memory utilization always >90%, but the process on SAP is too less even nothing. Why memory utilization on solaris always looks high? I have statement about memory on solaris, is this true: Memory in solaris is used for... (4 Replies)
Discussion started by: edydsuranta
4 Replies

9. Solaris

High Memory Utilization

Hello Guys, I have one Solaris server with high memory utilization >90%. As per checking, below is the output for memory usage. bash-3.00# ps -efo pmem,uid,pid,ppid,pcpu,comm | sort -r %MEM UID PID PPID %CPU COMMAND 1.7 29496 20668 1 0.0 /opt/app/iw-home/tools/java/bin/java 1.5... (1 Reply)
Discussion started by: myrpthidesis
1 Replies

10. Solaris

How the free memory threshold?

If I understand your question correctly, you are asking for an explanation of Solaris memory manager. You'd better ask Oracle that question because you are talking about Solaris kernel internals. The operating system kernel has no reason to kick a process's memory set out of real memory until... (4 Replies)
Discussion started by: hicksd8
4 Replies
COLLECTD-THRESHOLD(5)						     collectd						     COLLECTD-THRESHOLD(5)

NAME
collectd-threshold - Documentation of collectd's Threshold plugin SYNOPSIS
LoadPlugin "threshold" <Plugin "threshold"> <Type "foo"> WarningMin 0.00 WarningMax 1000.00 FailureMin 0.00 FailureMax 1200.00 Invert false Instance "bar" </Type> </Plugin> DESCRIPTION
Starting with version 4.3.0 collectd has support for monitoring. By that we mean that the values are not only stored or sent somewhere, but that they are judged and, if a problem is recognized, acted upon. The only action the Threshold plugin takes itself is to generate and dispatch a notification. Other plugins can register to receive notifications and perform appropriate further actions. Since systems and what you expect them to do differ a lot, you can configure thresholds for your values freely. This gives you a lot of flexibility but also a lot of responsibility. Every time a value is out of range, a notification is dispatched. This means that the idle percentage of your CPU needs to be less then the configured threshold only once for a notification to be generated. There's no such thing as a moving average or similar - at least not now. Also, all values that match a threshold are considered to be relevant or "interesting". As a consequence collectd will issue a notification if they are not received for Timeout iterations. The Timeout configuration option is explained in section "GLOBAL OPTIONS" in collectd.conf(5). If, for example, Timeout is set to "2" (the default) and some hosts sends it's CPU statistics to the server every 60 seconds, a notification will be dispatched after about 120 seconds. It may take a little longer because the timeout is checked only once each Interval on the server. When a value comes within range again or is received after it was missing, an "OKAY-notification" is dispatched. CONFIGURATION
Here is a configuration example to get you started. Read below for more information. LoadPlugin "threshold" <Plugin "threshold"> <Type "foo"> WarningMin 0.00 WarningMax 1000.00 FailureMin 0.00 FailureMax 1200.00 Invert false Instance "bar" </Type> <Plugin "interface"> Instance "eth0" <Type "if_octets"> FailureMax 10000000 DataSource "rx" </Type> </Plugin> <Host "hostname"> <Type "cpu"> Instance "idle" FailureMin 10 </Type> <Plugin "memory"> <Type "memory"> Instance "cached" WarningMin 100000000 </Type> </Plugin> <Type "load"> DataSource "midterm" FailureMax 4 Hits 3 Hysteresis 3 </Type> </Host> </Plugin> There are basically two types of configuration statements: The "Host", "Plugin", and "Type" blocks select the value for which a threshold should be configured. The "Plugin" and "Type" blocks may be specified further using the "Instance" option. You can combine the block by nesting the blocks, though they must be nested in the above order, i.e. "Host" may contain either "Plugin" and "Type" blocks, "Plugin" may only contain "Type" blocks and "Type" may not contain other blocks. If multiple blocks apply to the same value the most specific block is used. The other statements specify the threshold to configure. They must be included in a "Type" block. Currently the following statements are recognized: FailureMax Value WarningMax Value Sets the upper bound of acceptable values. If unset defaults to positive infinity. If a value is greater than FailureMax a FAILURE notification will be created. If the value is greater than WarningMax but less than (or equal to) FailureMax a WARNING notification will be created. FailureMin Value WarningMin Value Sets the lower bound of acceptable values. If unset defaults to negative infinity. If a value is less than FailureMin a FAILURE notification will be created. If the value is less than WarningMin but greater than (or equal to) FailureMin a WARNING notification will be created. DataSource DSName Some data sets have more than one "data source". Interesting examples are the "if_octets" data set, which has received ("rx") and sent ("tx") bytes and the "disk_ops" data set, which holds "read" and "write" operations. The system load data set, "load", even has three data sources: "shortterm", "midterm", and "longterm". Normally, all data sources are checked against a configured threshold. If this is undesirable, or if you want to specify different limits for each data source, you can use the DataSource option to have a threshold apply only to one data source. Invert true|false If set to true the range of acceptable values is inverted, i.e. values between FailureMin and FailureMax (WarningMin and WarningMax) are not okay. Defaults to false. Persist true|false Sets how often notifications are generated. If set to true one notification will be generated for each value that is out of the acceptable range. If set to false (the default) then a notification is only generated if a value is out of range but the previous value was okay. This applies to missing values, too: If set to true a notification about a missing value is generated once every Interval seconds. If set to false only one such notification is generated until the value appears again. PersistOK true|false Sets how OKAY notifications act. If set to true one notification will be generated for each value that is in the acceptable range. If set to false (the default) then a notification is only generated if a value is in range but the previous value was not. Percentage true|false If set to true, the minimum and maximum values given are interpreted as percentage value, relative to the other data sources. This is helpful for example for the "df" type, where you may want to issue a warning when less than 5 % of the total space is available. Defaults to false. Hits Value Sets the number of occurrences which the threshold must be raised before to dispatch any notification or, in other words, the number of Intervals that the threshold must be match before dispatch any notification. Hysteresis Value Sets the hysteresis value for threshold. The hysteresis is a method to prevent flapping between states, until a new received value for a previously matched threshold down below the threshold condition (WarningMax, FailureMin or everything else) minus the hysteresis value, the failure (respectively warning) state will be keep. Interesting true|false If set to true (the default), the threshold must be treated as interesting and, when a number of Timeout values will lost, then a missing notification will be dispatched. On the other hand, if set to false, the missing notification will never dispatched for this threshold. SEE ALSO
collectd(1), collectd.conf(5) AUTHOR
Florian Forster <octo at collectd.org> 5.1.0 2012-04-02 COLLECTD-THRESHOLD(5)
All times are GMT -4. The time now is 10:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy