CPU is high

Hi ,

We found CPU is high due to python process .Is this something that Oracle team should look on or Unix team has to work on it ?Could you please advise use of python process ?

top - 12:03:03 up 43 days, 15:11,  5 users,  load average: 1.53, 1.33, 1.23
Tasks: 126 total,   3 running, 123 sleeping,   0 stopped,   0 zombie
Cpu(s): 93.9%us,  6.1%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4043784k total,  3292548k used,   751236k free,   142624k buffers
Swap:  6094840k total,    72148k used,  6022692k free,  2718364k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 17862 root      25   0 68168 9736 3276 R 98.7  0.2   2581:49 python
22656 oracle    15   0 2286m  43m  39m S  0.3  1.1   0:00.85 oracle
    1 root      15   0 10372  696  588 S  0.0  0.0   0:25.05 init

Regards,
Maddy

Hello Maddy123,

Please do a ps -ef | grep "17862" and see the complete details about process which is running. Also seems this process is running from long time, check it if any script which ran previously is still running in hung state or so. Also it seems the process is root owned so you can contact your UNIX folks (In case you are not an unix admin) and check with them if it can be killed(at worst case) if it is in hung state.

NOTE: Don't try to kill any process in PR or any environment without complete analysis.

Thanks,
R. Singh

Python is a is a scripting language like ksh, perl, PHP, etc.. See this link. Therefore, it depends on which python script is in fact running. Use ps -o [options] and add options to the ps command to display detailed information about the script. See the man page of "ps" for details about possible options. I suggest starting with "args" (complete command with all arguments), "time" (cumulative CPU time), "vsz" (virtual memory consumption in 4k-pages) and work from there.

The following outcomes are possible (note, the list is not complete):

1) process has gone wild
If the process normally should not consume so much CPU but for now does you have to kill it and perhaps start over. This can be regarded as a bug and the programm should be modified to avoid such situations in future.

2) this is the way the process works
depending on what the process is supposed to do it may need that much CPU. If this is the case the only thing which helps is a bigger system with more CPU resources.

I hope this helps.

bakunin

Hi Ravinder/bakunin ,

Thanks of you suggestions.

I found something below when i do ps -ef

[root@bdb01 ~]# ps -ef | grep "17862"
root     17862     1 92 Mar04 ?        2-15:35:23 /opt/opsware/agent/bin/python /opt/opsware/agent/pylibs/cog/uninstall/agent_uninstall.pyc
root     22894 17301  0 09:29 pts/0    00:00:00 grep 17862

Can you suggest me how to see complete details of the process ?

Can you guide me how to check for script ?

We approached them but they do not know about this python .

Hi bakunin ,
Use ps -o [options] and add options to the ps command to display detailed information about the script.
I am unable to find the exact command of ps -o using man command .

The process is still running with high CPU

Regards,
Maddy

This is perhaps so because "ps -o" is not a command. "ps" is a command and my suggestion was to use its "-o" option (and some arguments to this option too) to display details about the process. Refer to the man page of "ps" (issue "man ps") for details about which arguments the "-o" option expects and what they mean.

I hope this helps.

bakunin

It is HP OPSware, a software that can install or patch or uninstall packages on the system. In this case it obviously wanted to uninstall something (maybe itself).
Its parent pid is 1 (init) so its former parent exited.
It is obviously not related to your Oracle environment.
IMHO killing it won't cause any harm.

Hi bakunin,

Thanks for your suggestions.

MadeInGermany,

Are you saying that python is

Can you tell me what is IMHO and should i kill this? if so how to do that.Please guide me.

Regards,
Maddy

In My Humble Opinion you should kill 17862 , and it won't cause any harm.

Sorry in advance if this will sound harsh - it is not meant that way.

The best guidance one could offer you is to get someone knowledgeable to do it for you. Some operating systems try their utmost to protect everybody from the consequences of their doing. This usually helps users a little bit and effectively cripples the work of the administrator, because some of what the admin typically does is potentially harmful. It is a separate discussion if this philosophy has merit or not and i will not carry it out here.

However, UNIX is diametrally different: the system will not second-guess if what one attempts to do might have effects the builder of the OS hasn't foreseen - if a user is allowed to do something it is carried out - NO QUESTIONS ASKED! Because the root-user (aka administrator) of such a system is allowed to do everything (literally - this includes wiping out the system completely!) everything someone with such a privilege does is an absolute security hazard.

UNIX is like a gun with a very loose trigger: very efficient in the hand of an expert and in a duel you want to have this (not the one where, upon pulling the trigger, a security warning comes up are you sure you really want to shoot?) but on the other hand a tool for shooting yourself into the foot if you aren't trained well.

We could tell you how to do this or that, but in fact a single misplaced space or a misread instruction may turn valuable advice into a recipe for disaster. No offense, but you don't come across as someone acting in his comfort zone of knowledge here and i suggest you get someone who is comfortable doing what you attempt to do here. If you want to go somewhere by airplane you wouldn't ask a professional pilot "please guide me what to do to fly" - you would hire a pilot and let him fly the plane for you, no?

The best guidance therefore in my opinion is: hands off and hire/get someone to do this.

I hope this helps.

bakunin

Please run ps with the option to show the parent processes so we can see what (if any) parent process is controlling PID 17862.

Thanks.

See above, the parent is "init".

bakunin

See post #4.
And my #6.

Thanks all for your suggestion.Will follow your instructions and come back if i need any clarifications.

Regards,
Maddy