Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Top 5 cpu and Mem consuming process and files and suggestion for health check Post 303037095 by MadeInGermany on Tuesday 23rd of July 2019 06:53:44 AM
Old 07-23-2019
The basic things to look for:
CPU, memory, disk.
A small monitoring solution:
If you insist of writing shell scripts, look at my Nagios plugins. The plugin scripts can be run standalone (without Nagios), you can adapt the output to suit your needs.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

need help to write script to check the process health and automatically restart it

I am working on a project, which need to constantly watch the process, and check its status, if it was dead, it should be restart automatically. Please kindly refer me to URL which teach how to write this kind of script, or service. Thanks. (1 Reply)
Discussion started by: dragondad
1 Replies

2. UNIX for Dummies Questions & Answers

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

hi, i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies

3. AIX

Command to find TOP 5 Memory consuming process

HI All, Can anyone send me a command to find TOP 5 Memory consuming process. It would be lelpful if I get output something like below processname - pid - memory(in MB) - command I tried few commands from the internet but the result only give the real memory usage or pagging, I want total... (4 Replies)
Discussion started by: bce_groups
4 Replies

4. Shell Programming and Scripting

Shell script to display top 5 process (per cpu consumption)

Hello, I have to create shell script being myself real novice in scripting... I was looking on the Internet for some script examples, but I don't have the basic understanding of the shell. I was trying to do something with “ps” command without success. For exemple total number of... (2 Replies)
Discussion started by: mr_awd
2 Replies

5. Shell Programming and Scripting

What is max MEM% in top command?

HI, When i use the top command in Linux I get the below values. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND What is the maximum MEM% that will occur. I got once 303% . Is it possible to get such a high value. Regards, Ahamed. (2 Replies)
Discussion started by: ahamed
2 Replies

6. Shell Programming and Scripting

Warning in Top 10 cpu consuming processes

I m using following command to find top 10 cpu consuming processes. However whenever i execute the command i get following warning. What can be done to avoid it? # ps -auxf | sort -nr -k 3 | head -10 Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ root ... (6 Replies)
Discussion started by: pinga123
6 Replies

7. Shell Programming and Scripting

Discrepancy in finding the top memory consuming processes

When I run 'top' command,I see the following Memory: 32G real, 12G free, 96G swap free Though it shows as 12G free,I am not able to account for processes that consume the rest 20G. In my understanding some process should be consuming atleast 15-16 G but I am not able to find them. Is... (1 Reply)
Discussion started by: prasperl
1 Replies

8. Emergency UNIX and Linux Support

Can top show more than 100% in %MEM?

Can the %MEM value for a process show more than 100% in top output?Is this ever possible? (5 Replies)
Discussion started by: proactiveaditya
5 Replies

9. Solaris

Physical and Free mem on TOP command

Hi, When I run the free command on solaris, I get the following: "Memory: 60G phys mem, 69G free mem" Q: how cna the free mem be higher then the physical mem?:confused: Amit (3 Replies)
Discussion started by: amitlib
3 Replies

10. UNIX for Beginners Questions & Answers

Compare 2 files with different keywords : use server health-check tool

I have two files to be compared to get the output of the differences. File1 has a lot more lists than File2. After searching a lot on this thread I'am unable to find the exact code that im willing to get. This will be used as 'pre-check'/post-check utility (health check Tool) to compare... (1 Reply)
Discussion started by: GeekyJimmy
1 Replies
COLLECTD-NAGIOS(1)						     collectd							COLLECTD-NAGIOS(1)

NAME
collectd-nagios - Nagios plugin for querying collectd SYNOPSIS
collectd-nagios -s socket -n value_spec -H hostname [options] DESCRIPTION
This small program is the glue between collectd and nagios. collectd collects various performance statistics which it provides via the "unixsock plugin", see collectd-unixsock(5). This program is called by Nagios, connects to the UNIX socket and reads the values from collectd. It then returns OKAY, WARNING or CRITICAL depending on the values and the ranges provided by Nagios. ARGUMENTS AND OPTIONS
The following arguments and options are required and understood by collectd-nagios. The order of the arguments generally doesn't matter, as long as no argument is passed more than once. -s socket Path of the UNIX socket opened by collectd's "unixsock plugin". -n value_spec The value to read from collectd. The argument is in the form "plugin[-instance]/type[-instance]". -H hostname Hostname to query the values for. -d data_source Each value_spec may be made of multiple "data sources". With this option you can select one or more data sources. To select multiple data sources simply specify this option again. If multiple data sources are examined they are handled according to the consolidation function given with the -g option. -g none|average|sum When multiple data sources are selected from a value spec, they can be handled differently depending on this option. The values of the following meaning: none No consolidation if done and the warning and critical regions are applied to each value independently. average The warning and critical ranges are applied to the average of all values. sum The warning and critical ranges are applied to the sum of all values. percentage The warning and critical ranges are applied to the ratio (in percent) of the first value and the sum of all values. A warning is returned if the first value is not defined or if all values sum up to zero. -c range -w range Set the critical (-c) and warning (-w) ranges. These options mostly follow the normal syntax of Nagios plugins. The general format is "min:max". If a value is smaller than min or bigger than max, a warning or critical status is returned, otherwise the status is success. The tilde sign (~) can be used to explicitly specify infinity. If ~ is used as a min value, negative infinity is used. In case of max, it is interpreted as positive infinity. If the first character of the range is the at sign (@), the meaning of the range will be inverted. I. e. all values within the range will yield a warning or critical status, while all values outside the range will result in a success status. min (and the colon) may be omitted, min is then assumed to be zero. If max (but not the trailing colon) is omitted, max is assumed to be positive infinity. -m If this option is given, "Not a Number" (NaN) is treated as critical. By default, the none consolidation reports NaNs as warning. Other consolidations simply ignore NaN values. RETURN VALUE
As usual for Nagios plugins, this program writes a short, one line status message to STDOUT and signals success or failure with it's return value. It exits with a return value of 0 for success, 1 for warning and 2 for critical. If the values are not available or some other error occurred, it returns 3 for unknown. SEE ALSO
collectd(1), collectd.conf(5), collectd-unixsock(5), <http://nagios.org/> AUTHOR
Florian Forster <octo at verplant.org> 5.1.0 2012-04-02 COLLECTD-NAGIOS(1)
All times are GMT -4. The time now is 09:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy