- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Process spawn multiple process
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2007 07:13 AM
04-13-2007 07:13 AM
Some script has been written in such a way that it spawns one process in backgroud
Some how there is muliple process created and each process has spawned to multiple and it went to create multiples of process
Can you please let me know how to kill all of them , Since there were some other process run by that user I don't want to kill all the process run by the user
Thanks for help
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2007 07:30 AM
04-13-2007 07:30 AM
SolutionUNIX95=1 ps -fj
and note the Process Group ID(s) of the bad processes. Now use the negative value of the PGID rather than a PID in your kill command.
For example, if the "bad" PGID were 5000 then you would "kill -15 -5000 to kill all the members of that process group. If kill -15 fails then try kill -11.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2007 07:30 AM
04-13-2007 07:30 AM
Re: Process spawn multiple process
~thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2007 07:43 AM
04-13-2007 07:43 AM
Re: Process spawn multiple process
Gurus
Sorry some how the machine was rebooted
Can you please let me know or where can I find out the funda behind UNIX95=1 ps -fj
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2007 07:46 AM
04-13-2007 07:46 AM
Re: Process spawn multiple process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2007 07:48 AM
04-13-2007 07:48 AM
Re: Process spawn multiple process
~hope it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2007 07:48 AM
04-13-2007 07:48 AM
Re: Process spawn multiple process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2007 04:58 AM
04-15-2007 04:58 AM
Re: Process spawn multiple process
Seniors
Here are the some more things i need to justify
i) How can a user run a script , that will spawn multiples of process and make the system fully occupied ( even though ulimit was set )
ii) User has actually started the process but most of the process running with the PPID 1 ( how come this is possible )
I am just looking into things , I hope your input will be more helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2007 05:14 AM
04-15-2007 05:14 AM
Re: Process spawn multiple process
Check man page for 'exit'.
My favourie way to quickly kill a bunch of similar commands is
$ ps -ef | awk '/comman[d]/{system ("kill -15 " $2)}'
The [x] in the awk regexp makes sure you don't shoot yourself in the foot.
Example below..
$ sleep 1000 &
[1] 9330
$ sleep 1000 &
[2] 9331
$ sleep 1000 &
[3] 9332
$ ps -ef | awk '/slee[p]/{system ("kill " i$2)}'
[3] + Terminated sleep 1000 &
[2] + Terminated sleep 1000 &
[1] + Terminated sleep 1000 &
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2007 06:28 AM
04-15-2007 06:28 AM
Re: Process spawn multiple process
Thanks for input
But unfortunately i didnt get sufficient resource on this
Still i need to ask how can a zombi process can create another process ,
if suppose parent process creates some process then its childs can not be zombie(?)
becase parent is still alive and working
Can we conclude zombie process can only killed by reboot
How can one manage with such bombardment of process ( except reboot)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2007 08:20 AM
04-15-2007 08:20 AM
Re: Process spawn multiple process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2007 07:12 PM
04-15-2007 07:12 PM
Re: Process spawn multiple process
Thanks for response
will take scenario
while
do
While < infinite>
do
done
done
a) above parent runs and creates infinite process which is sleeping ( may be zombie )
b) parent got killed becaues of some reason and many of the process has ppid 1
c) there is recursive process creation because of some reason
Can we come out of the above with out reboot
Please suggest if above is not clear
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2007 08:30 PM
04-15-2007 08:30 PM
Re: Process spawn multiple process
You kill zombies by killing their evil parent. Of course you have to decide if the parent is worth more than cleaning up the process table.
>parent got killed because of some reason and many of the process has ppid 1
Then these zombies should be killed when their parent is reset to init.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2007 05:23 AM
04-16-2007 05:23 AM
Re: Process spawn multiple process
If suppose user is allowed to run a script
he can run some script which create potentially zombie background process and at the end make the system down
So UNIX can be made down by a normal user
I feel i am not making any sense above
Please let me know if false
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2007 05:35 AM
04-16-2007 05:35 AM
Re: Process spawn multiple process
> ...suppose user is allowed to run a script
he can run some script which create potentially zombie background process and at the end make the system down...So UNIX can be made down by a normal user...
The kernel imposes limits on a variety of resources. These limits are "fences" to prevent one process or one user from consuming an entire resource (memory, open files, etc.)
In the case of processes, the kernel 'maxuprc' parameter limits the maximum number of concurrent user processes per user while the 'nproc' parameter controls the overal, system-wide ceiling.
While 'maxuprc' doesn't limit 'root', one doesn't let the "normal" user run as root anyway!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2007 05:36 AM
04-16-2007 05:36 AM
Re: Process spawn multiple process
The real fix to your problem is educating your users and developers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2007 05:47 AM
04-16-2007 05:47 AM
Re: Process spawn multiple process
James
normal user was not allowed , but accidentaly the process run by the user has ppid as 1
I always felt admin has control all thing if not i dont have words to say that even superdome can be - by single user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2007 06:02 AM
04-16-2007 06:02 AM
Re: Process spawn multiple process
> normal user was not allowed , but accidentaly the process run by the user has ppid as 1
The fact that a process has a parental pid (ppid) of one (1) simply means that that process is now owned by 'init'. This will be the case seen when the parent of a process dies but its child remains alive --- 'init' inherits the child.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2007 02:50 PM
04-16-2007 02:50 PM
Re: Process spawn multiple process
he can run some script which create potentially zombie background process and at the end make the system down
In general scripts can't create zombies, shells should prevent this. Only applications can. I'm not sure if perl gives the user enough rope to hang himself