- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to find out list of spawned program ?
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
05-20-2008 11:01 PM
05-20-2008 11:01 PM
How to find out list of spawned program ?
I am trying to change password of an user using expect command. My change password script(cp.sh) is as follows,
-----------------------
#!/bin/sh
#\
exec expect -f "$0" ${1+"$@"}
spawn passwd "testram"
expect "assword:"
send "testpwd\r"
expect "assword:"
send "testpwd\r"
expect eof
-----------------------
The above script works perfectly. But I scheduled this script periodically. It is works most of the cases. But some cases I got the following error message.
-----------------------
pawn passwd user1^M
too many programs spawned? could not create pipe: too many open files
while executing
"spawn passwd "user1""
(file "cp.sh" line 4)^M
-----------------------
From the above error message, it is clear that there are large number of programs spawned. I don't know what are the programs are spawned in the system at that time. Is there any way/command to find out the list of spawned programs ? And also please review my change password script. Is there any spawn cleanup require for that script cp.sh ?
Thanks,
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2008 11:33 PM
05-20-2008 11:33 PM
Re: How to find out list of spawned program ?
For yourself you can use:
$ UNIX95= ps -Hfu $LOGNAME
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2008 01:21 AM
05-21-2008 01:21 AM
Re: How to find out list of spawned program ?
The following command didn't show the 'spawn passwd' in the list,
#UNIX95= ps -Hfu $LOGNAME
I removed "\r" from my change password script(cp.sh) and tried. If I removed "\r" from the end of password, the spawn will not quit and it will wait for '\r'. So, the "spawn passwd test" is currently active. Now, I tried the above command to identify the process. But it didn't show the corresponding entry. Did I missed anything ?
Thanks,
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2008 02:12 AM
05-21-2008 02:12 AM
Re: How to find out list of spawned program ?
Then there isn't a UNIX process for that.
You could add "-x" to the end if you want longer command lines.
>Did I missed anything?
Sorry, I'm not familiar with expect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2008 04:41 AM
05-21-2008 04:41 AM
Re: How to find out list of spawned program ?
The fact that your failure only occurs periodically along with the message "...to many open files" suggests that you have too low a kernel value for either 'maxuprc' or for 'nproc'. If you are running as root, 'maxuprc' doesn't apply.
You can use 'glance' or 'sar -v' to evaluate yor watermarks.
Regards!
...JRF...