1757284 Members
2851 Online
108860 Solutions
New Discussion юеВ

process in top

 
vaman
Frequent Advisor

process in top

I have series of ps processes in top but I am not able to find out from where it is getting triggered, tty field in top shows ?. so how can I foun dout from where this ps is getting generated, & eating considerable cpu.
vaman kulkarni
3 REPLIES 3
Florian Heigl (new acc)
Honored Contributor

Re: process in top

doing a ps -ef | grep pid until the ppid (parent process id) will help You work through to the process that spawned Your cpu eaters.

some systems also have pstree available, which does the very same thing in a nicer, graphical way.
yesterday I stood at the edge. Today I'm one step ahead.
Florian Heigl (new acc)
Honored Contributor

Re: process in top

sorry - I forgot a few words in my post, I meant to say that You if You do ps -ef | grep and then do recusively the same for the ppid until it's 1 (init itself), You have built a process tree which exactly shows what spawned the process in question.

unless it's ppid is 1 , in which case You should try grep processname /sbin/init.d/* .
If it's not there, check out cron jobs or have a look into /etc/inittab.

If this all fails, do a find / -local -name and search the containing directory for any kind of readme info or logfiles.

best luck,
florian
yesterday I stood at the edge. Today I'm one step ahead.
Florian Heigl (new acc)
Honored Contributor

Re: process in top

I'm not really focussed today - the job might also have lost it's controlling terminal, e.g. was started from an X login session that abnormally terminated.
yesterday I stood at the edge. Today I'm one step ahead.