1830239 Members
2095 Online
109999 Solutions
New Discussion

Re: process table

 
SOLVED
Go to solution
jerry1
Super Advisor

process table

Would anyone out there happen to have a
script or would know how to capture particular
account processes and log them.

ps -ef gives you the current snapshot of what
is running but how would you capture particular
process in real time to a log file without
have dups entires.

Doing a:

ps -ef|grep -v |grep -i >>pslog

doesn't give you realtime data.

acctcom does not have the info needed either.
6 REPLIES 6
Wing Tung Leung
New Member

Re: process table

What do you exactly want to log? Memory usage? CPU? If having a snapshot each second is "real time" enough you could combine the ps command and PID for listing the wanted data.

If you want to log memory usage whenever it changes, you need something to trace all your memory allocation/free calls. Like strace on GNU/Linux systems.
jerry1
Super Advisor

Re: process table

I would like to see what processes as oracle
are being run minus the ones I already know
are okay. So if you have 50 oracle processes
running at any one time. I would exclude the
ones I know are okay based on the string
of the process name running and capture
the other processes as they run. But, a process that I don't know about may only run for a second or two or a minute or two.
If I am taking a snapshot every 5 or 15 minutes or even 1 minute. I will miss those processes in between. See the dilemma.
It's almost like I would have to be listening
or looking somewhere for the next process
that the kernel is going to run and determine
if I want to log or not log that process to
a file.
Is there a process table or directory somewhere that can be utilized to at least
capture this info?
Olivier Drouin
Trusted Contributor

Re: process table

like the other thread said... /proc would be your best bet. You have access to every process running in realtime with their command line and
mucho interesting stuff.

Maybe process accounting but I dont know that very well.

You will miss some of them with crontab.
Paul Cross_1
Respected Contributor
Solution

Re: process table

Have you tried process accounting? I don't know how configurable it is, but you could probably script something from the output.
http://www.tldp.org/HOWTO/Process-Accounting/
jerry1
Super Advisor

Re: process table

Whoops, I am in the wrong forum. This question needs to be in the HP sysadmin
forums. No wonder /proc was not there.

Mario Stargard
Advisor

Re: process table

You could use auditing. Might be hard to fish out the details you need, but it'll all be there.

Mario