LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-14-2004, 11:41 AM   #1
kangaman
LQ Newbie
 
Registered: Oct 2004
Posts: 4

Rep: Reputation: 0
Linux process limit


Hi.

I am looking for some assistance with Linux process limits.
When working in our computer lab on Operating Systems course assignments, students often write bad C programs that time up our time sharing systems -- the sort of "while(1) fork" equivalents. As a result, we added a process limit of 1024 processes to our system by modifying the /etc/security/limits.conf file. We tested that the the limit worked with our own forking program, and everything worked just fine. We were able to run a user up to his process limit. Any future attempts to login through any means of logging into our system for that user would not work. If the user had other windows already open on the system and tried to execute other commands, he would see "out of procesess". Today, we noticed that one student was running a forking program, and had over 7000 processes occupied. We do not understand how this program could get around the process limit. He certainly wasn't trying to get around the limit. Maybe someone could offer some feedback.. We are running a Linux 2.4.26 kernel.

In the process table, all of the processes looked like this:

040 D <u> 27811 1 0 69 0 - 359 down 09:45 ? 00:00:00 a.out
240 S <u> 3911 1 0 69 0 - 359 end 09:47 ? 00:00:00 a.out
040 S <u> 13205 12417 0 69 0 - 357 nanosl 09:48 ? 00:00:00 a.out
040 S <u> 14555 14346 0 73 0 - 357 wait4 09:48 ? 00:00:00 a.out

I would understand if all but 1024 of them were defunct/zombies but that's not the case.

Can anyone shed any light on what I might be missing?

Thanks for any help you can provide...
 
Old 10-14-2004, 01:22 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Which out-paramaters on ps were you using,
and can you add code-tags to the output to
make it more readable?




Cheers,
Tink
 
Old 10-14-2004, 01:39 PM   #3
kangaman
LQ Newbie
 
Registered: Oct 2004
Posts: 4

Original Poster
Rep: Reputation: 0
ps tags

Hi Tinkster,

I was using just "ps -elf". Unfortunately I can't change the tags because what you see is the output that I captured from the
screen. We had to kill all the processes off to get our system back to normal again.
 
Old 10-14-2004, 01:53 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Code:
That's what I meant :}

Makes it more readable, giving the text a mono-spaced font.

Another question: did you look at the guys code?
Maybe he used a different function call than the
others ...


Cheers,
Tink
 
Old 10-14-2004, 02:48 PM   #5
kangaman
LQ Newbie
 
Registered: Oct 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Hi Tinkster,

No problem ... my first time on the site so I had to figure it out..

Code:
040 D user 27811     1  0  69   0    -   359 down   09:45 ?        00:00:00 a.out
240 S user  3911     1  0  69   0    -   359 end    09:47 ?        00:00:00 a.out
040 S user 13205 12417  0  69   0    -   357 nanosl 09:48 ?        00:00:00 a.out
040 S user 14555 14346  0  73   0    -   357 wait4  09:48 ?        00:00:00 a.out

The code isn't any different than any of the other students code really.. just messing up with fork().

Kangaman.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
limit cpu % usage for a process student04 Linux - General 15 03-18-2014 07:22 PM
Process memory limit Costea Linux - Security 9 09-24-2006 01:42 PM
Want to limit Memory to a specific Process tstaples Linux - General 3 01-26-2005 01:59 PM
Descriptor limit for a process akuate Linux - General 0 08-18-2004 11:23 AM
max process limit anoop_chandran Linux - Networking 2 01-16-2002 05:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:48 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