LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-18-2016, 07:56 AM   #1
ITareliteralyMyInitials
LQ Newbie
 
Registered: Aug 2015
Posts: 17

Rep: Reputation: Disabled
Too many processes how to find the reason


Hi all ,

I have been using Zabbix to monitor a number of my servers, recently I have started getting alarms from Zabbix that there is 'Too many processes' on one of them , (>350).

When I checked my server it looked like it had rather 54ish processes using this command :

Quote:
ps aux | less
So my questions are :
-What does the alarm mean ?
-How can I tell if i have a problem ?
-How can I fix the problem ?
 
Old 02-18-2016, 08:04 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by ITareliteralyMyInitials View Post
So my questions are :
-What does the alarm mean ?
That the server has more process running that the ceiling of the alarm settings.
Quote:
Originally Posted by ITareliteralyMyInitials View Post
-How can I tell if i have a problem ?
Trust your monitoring tool. It will tell you. Its its job.
Frankly speaking if its only for a short duration that you have that much process i would not take is as a problem.
Quote:
Originally Posted by ITareliteralyMyInitials View Post
-How can I fix the problem ?
Raise the number of process within the zabbix monitor.

You could also build your own script that prints the output of ps aux to a file to see if those numbers and the once of zabbix match. Also have in mind that zabbix check once a minute (iirc the default value). You could just live with the message. Disable the check. Or if this server runs an webserver you might want to restrict the number of possible childs in the config.
 
Old 02-18-2016, 09:37 AM   #3
ITareliteralyMyInitials
LQ Newbie
 
Registered: Aug 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Hi zhjim , Thanks for you answer above,
I however still would be almost in the same place , I would like to understand why is the alarm fired up , my server CPU consumption is very low , and when i googled a bit i found some opinions saying that there is not limitation on the processes number for Linux, I would like to understand why is it a negative thing, and whats happening on the server that makes this bad.
knowing that in this case the servers is running a Mysql DB server.
 
Old 02-18-2016, 09:44 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
the number of processes are limited, you cannot have more than a few thousands (in general). But probably your zabbix is simply misconfigured, that's all.
 
Old 02-19-2016, 05:14 AM   #5
ITareliteralyMyInitials
LQ Newbie
 
Registered: Aug 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Acctually i just saw that when i am using the command

Quote:
ps aux | less
I am getting only the processes started by Root.

When i use for example :

Quote:
ps -A -o pid
I get much more processes around 700 ... but have no idea how to understand if this is bad for the server

Last edited by ITareliteralyMyInitials; 02-19-2016 at 05:37 AM. Reason: Corrected the number of processes
 
Old 02-19-2016, 05:27 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
ps aux will give you all the processes. 7000 is a bit too much, but probably not.
You can try
Code:
ps -e -o command | sort | uniq -c | sort -n
and check the output. (this will print the commands executed together with the number of that processes
 
Old 02-19-2016, 05:36 AM   #7
ITareliteralyMyInitials
LQ Newbie
 
Registered: Aug 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
In addition to the above , When i use command

Quote:
top
I see in the top that 1 is running and 700 are idling, which i suppose is good ..
Then i don't understand in which case the alam for 'too many processes' is at all useful
 
Old 02-19-2016, 07:04 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
if you have too many processes (like several thousands) they will get no time (because the time slice will be too small). So your system will slow down.
 
Old 02-19-2016, 08:26 AM   #9
ITareliteralyMyInitials
LQ Newbie
 
Registered: Aug 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Hi Pan64 ,

I also see that the CPU utilization is very low , so probably what you said doesn't apply to my case right ?
 
Old 02-19-2016, 09:35 AM   #10
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Normaly even idle process need some life time. And if they would all wake up at the same time, down goes performance. Might want to check why there are 700 idle processes. What spawns all those (assumed) childs? Whats their process name?
 
Old 11-06-2017, 10:44 PM   #11
sathishmurali46
LQ Newbie
 
Registered: Nov 2017
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by ITareliteralyMyInitials View Post
Hi all ,

I have been using Zabbix to monitor a number of my servers, recently I have started getting alarms from Zabbix that there is 'Too many processes' on one of them , (>350).

When I checked my server it looked like it had rather 54ish processes using this command :



So my questions are :
-What does the alarm mean ?
-How can I tell if i have a problem ?
-How can I fix the problem ?


hi, dude, i am also using Zabbix for your environment, i am getting to many processes warning from Zabbix can tell me how to check in Linux server, when we get mail regarding too many processes what are the things we need to check and its command

Last edited by sathishmurali46; 11-06-2017 at 10:46 PM. Reason: grammer mistake
 
Old 11-07-2017, 12:40 AM   #12
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,794

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
What counts is the LWPs (light weight processes = threads), shown with
Code:
ps -fLeH
SysV options start with a dash. (I am less familiar with the BSD options like ps aux, not starting with a dash.)
-L is LWP
-H is hierarchy, you can easily see parent-child relationship
-f is full
-e or -A is all (not only own processes associated with a terminal)
Process limits apply to LWPs and per user. Shown with
Code:
ulimit -a
(limit in csh/tcsh)
Yes there should be a process limit. Some Distros have none. RedHat/Centos had 1024 that was sometimes too low, now 4096. Set in /etc/security/limits.d/
Your 350 is certainly a threshold in Zabbix.

Last edited by MadeInGermany; 11-07-2017 at 12:41 AM.
 
Old 11-07-2017, 01:18 AM   #13
sathishmurali46
LQ Newbie
 
Registered: Nov 2017
Posts: 2

Rep: Reputation: Disabled
Getting mail from Zabbix regarding too many process

Hi friends

We are monitoring your server through Zabbix we don't administrator password, so we get alert mail like too many processes in the mail in the particular IP of the Linux server.

I am asking what are the things we need to check on the Linux side for the too many process mail
can you help me with and along with the command

what I actually I do for too many processes means
1.we look on to the top command
2.sar 5 5

other than this kindly tell what i need to do
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find out the reason for crash? thomas2004ch Linux - Software 4 11-16-2011 07:50 AM
Help! imapd is spawning multiple processes, all of a sudden, for no reason! fishsponge Linux - Server 1 02-26-2009 10:55 AM
how to find out the reason for a system crash Jordan&&&& Linux - Newbie 6 02-24-2008 06:10 AM
How can I find out the reason of unexpected reboot (redhat3+2.6.11)? yuzuohong Linux - General 2 05-24-2005 05:49 PM
how to find out the reason when the system stops shigeru Linux - General 3 07-01-2004 08:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration