- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Detecting runaway processes.
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
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
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
тАО07-25-2000 05:21 AM
тАО07-25-2000 05:21 AM
Detecting runaway processes.
Am I clear?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2000 05:26 AM
тАО07-25-2000 05:26 AM
Re: Detecting runaway processes.
As far as finding the top processes, use the ps command to find the top 10 processes on the system:
# ps -ef aux |head -10
Best Wishes,
Cheryl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2000 05:40 AM
тАО07-25-2000 05:40 AM
Re: Detecting runaway processes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2000 05:46 AM
тАО07-25-2000 05:46 AM
Re: Detecting runaway processes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2000 05:56 AM
тАО07-25-2000 05:56 AM
Re: Detecting runaway processes.
You might limit your search to processes that are not owned by root, and that have a PPID of 1.
This includes all user processes that fall under the init process after their original parent processes die.
I,ve known situations myself in which a process (netscsape) runs away after the parent process (usually one of the CDE processes) quits abnormally.
Bye,
Rik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2000 05:58 AM
тАО07-25-2000 05:58 AM
Re: Detecting runaway processes.
This is certainly a case-by-case basis. I have this problem on one server hosting an application to which the client telnets.
One solution to finding (and killing) troublesome orphans is:
# MIN=100;
# PIDS=`ps -el|awk -v MIN=$MIN '$3 > MIN && $5 = 1 && $12 ~/\?/ {print $4}'`
# echo $PIDS
This gives back a list of processes that have been inherited by initd. The MIN value of 100 represents the beginning of uid values which represent 'application' users on my server. You can adjust it to your tastes as long as the value does not circumscribe system/root processes.
Instead of echoing $PIDS you could issue a kill for these processes. I would be very careful about this until you are sure of the results.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2000 06:02 AM
тАО07-25-2000 06:02 AM
Re: Detecting runaway processes.
EXEMPT="YOUR_EXEMPT_PROCESSES_HERE_SEPERATED_BY_|"
#eg. EXEMPT="statdaemon|inetd|vxfsd"
RUNAWAY=VALUE_YOU_WANT_FOR_YOUR_THRESHOLD
#eg. RUNAWAY=90
...
ps -ef | egrep $EXEMPT | while read pid tty time_hh time_mm command ; do
if [ "$time_hh" -gt $RUNAWAY ] ; then
my_msg="$pid $tty ${time_hh}:$time_mm $commandn"
echo "my_errormsg=\"${my_errormsg}${my_msg}\"" 1>&6
# send an e-mail if you want
# with mailx -s "RUNAWAY PROCESS" someone_who_cares...
fi
done 6>$TEMPVARS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2000 06:03 AM
тАО07-25-2000 06:03 AM
Re: Detecting runaway processes.
# ps -o pcpu
This will display %CPU for the processes.
It requires UNIX95=XPG4 and at minimum, patch level of PHCO_18446
Patch Description: s700_800 11.00: ps(1) Cumulative patch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2000 03:09 PM
тАО07-25-2000 03:09 PM
Re: Detecting runaway processes.
CPUHOG=$1
ps -ef | grep -e $CPUHOG | while read LINE
do
PID=`echo $LINE | awk '{print ($2)}'`
PPID=`echo $LINE | awk '{print ($3)}'`
if [ $PPID = '1' ]
then
# echo $LINE
kill -9 $PID
fi
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2000 02:04 AM
тАО07-26-2000 02:04 AM
Re: Detecting runaway processes.
run_procs='ps -e|grep processname | grep "?" | cut -c2-6'
mail m username $run_procs
You can kill the processes by substituting "mail m" with "kill -9" command.
Be careful not to kill unix processes, idetify the exact process that you want to kill. This script file can be executed through cron.
Cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2000 01:07 PM
тАО07-26-2000 01:07 PM
Re: Detecting runaway processes.
NDD_NAME[0]=tcp_keepalive_interval.
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2000 06:49 PM
тАО07-26-2000 06:49 PM
Re: Detecting runaway processes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2000 08:18 AM
тАО09-18-2000 08:18 AM
Re: Detecting runaway processes.
I find this thread very helpful. Firstly I found out that the patch PHCO_18446 wasn't installed on our HP-UX 11.00 development system. This gave raise to some confusing discrepancies between the output of "top" and "ps -o comm,pcpu".
Secondlyly I realized, that there seem to be problems with runaway processes when database connections are cancelled.
Here is my problem: I have a multithreaded server process under HP_UX 11.00 that gets requests from an Oracle 8.1.5 database. The database connection is done with the Orcacle Call Interface, using the shared library libclntsh.sl.
On startup dedicated build threads reads data from the database and complete.
When the build threads are completed, and there are only request threads left, I get an %CPU ranging from 50% to 90%. This seems to be the same problem as Jonathans's, if he is using Oracle.
Another strange thing I don't understand: When I observe the process with
"export UNIX95=XPG4; ps -C satellite -o time,etime" I see ELAPSED increasing regularly, but TIME increasing hardly at all. This is what I would expect for a well-behaved server process, that doesn't have any work to do. But how does that fit with a %CPU of 50% ?.
CU, Bernhard.Schmalhofer@fazi.de