- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Lot of sh children process (Oracle user) use CPU
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
Discussions
Discussions
Forums
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
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
тАО02-16-2004 04:04 AM
тАО02-16-2004 04:04 AM
I have a host with oracle applications and one instance. When i launch top command, i get several children process using CPU :
CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
1 ? 7089 app1159 152 20 532M 152M run 342:10 92.83 92.67 java
5 pts/0 27091 app1159 255 39 2288K 576K run 7633:17 44.54 44.46 sh
4 pts/9 25448 app1159 255 39 2288K 576K run 6193:32 44.36 44.28 sh
7 pts/4 19012 app1159 255 39 2288K 576K run 10306:25 44.10 44.02 sh
7 pts/6 16509 app1159 255 39 2288K 584K run 5488:15 43.82 43.75 sh
5 pts/5 3637 app1159 255 39 2288K 576K run 6533:23 43.28 43.20 sh
4 pts/tc 13957 app1159 255 39 2208K 508K run 5315:31 43.20 43.12 sh
If I do, ps -ef | grep 25448, I get for example :
appora 25448 1 255 Feb 5 pts/9 6194:22 /usr/bin/sh
I don't know how to identify what it is used by Oracle (to kill process).
Thanks for help
Laurent
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2004 04:09 AM
тАО02-16-2004 04:09 AM
Re: Lot of sh children process (Oracle user) use CPU
25448 is the pid of this shell process. If it spawned child processes, then you would see 25448 as the ppid (parent process id) for other processes. Your ps -ef would have gotten those processes too.
Since it is not showing any child processes, it's most likely that these are scripts run by the user 'appora'.
But before killing these sessions, I would run tusc on the processes to make sure. You can also run 'glance' and see the process status for each of these processes.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2004 04:10 AM
тАО02-16-2004 04:10 AM
Re: Lot of sh children process (Oracle user) use CPU
This will get you a process list
I'm attaching a pattern match process killer.
It will wipe out oracle if you are not careful.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2004 06:40 AM
тАО02-16-2004 06:40 AM
SolutionSo let's start by finding all the sh processes and sorting by CPU time:
UNIX95= ps -C sh -o pcpu,pid,ppid,ruser,args | sort -rn | more -e
That will list the biggest CPU hogs at the top (the column headings will be at the bottom of the list). Now, sh shells that consume huge amounts of CPU time (more than a fraction of 1%) are usually broken connections. If you have a lot of PC users, these may be crashed sessions that have not been setup correctly in /etc/profile. The most common problem is that someone removed the last line in /etc/profile that reads:
trap 1 2 3
What this does is to restore 'normal' processing to the shell whenever it is asked to terminate (including a crashed telnet session). The beginning of /etc/profile has: trap "" 1 2 3 which turns OFF trap processing including SIGHUP (hangup). Then when the session is trashed by the PC user, the shell goes into an infinite loop trying to talk to a non-existent terminal.
Once you fix the trap processing (verify that traps are normal by typing trap at the shell prompt. There should be nothing returned. If instead you see:
$ trap
trap -- '' QUIT
trap -- '' INT
trap -- '' HUP
then trap restoration in /etc/profile or .profile has been broken.
As for the existing shell processes that are consuming massive CPU time, look for the children of these shell sessions. Probably the fastest is to search for the PID (in this case, grep is OK since we want PID and PPID values). If the process ID is 1234 then:
ps -ef | grep 1234
If these processes have no child processes where the parent (PPID) is the shell's ID, then use kill -15 to terminate the shells. If this does not work, you'll have to use kill -9 and then go to work looking for the messed up trap setting and get it fixed. This often happens when a newbie shell writer turns off traps to prevent escapes by the user but also eliminates the HUP trap.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2004 09:17 PM
тАО02-16-2004 09:17 PM
Re: Lot of sh children process (Oracle user) use CPU
I copy /etc/profile on /myhome but must I let the first line trap "" 1 2 3 in .profile?
It is set to cancel signals during loading of my profile.
Now, if I type trap, i get :
trap -- '' QUIT
trap -- '' INT
trap -- '' HUP
trap -- 'echo '\''logout'\' EXIT
The .profile for user is get from /etc/skel/.profile (without settings about trap)
Thanks
Laurent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2004 12:27 AM
тАО02-17-2004 12:27 AM
Re: Lot of sh children process (Oracle user) use CPU
Bill Hassell, sysadmin