1829456 Members
1747 Online
109992 Solutions
New Discussion

Re: list new processes

 
SOLVED
Go to solution
Cristian_4
Regular Advisor

list new processes

is there a way to list the new processes that are being kicked in a server

something like "tail -f file" and you get the last addition to the file
5 REPLIES 5
xyko_1
Esteemed Contributor

Re: list new processes

Hi,

ps aux | tail

in a loop will report you the last processes initiated in a time interval (the interval between 2 iteractions of the loop).

Try to execute this command twice on a terminal and see what I'm trying to tell you and if it solves your problem.

Regards,
Xyko



Cristian_4
Regular Advisor

Re: list new processes

thanks, but there are some processes that execute so fast that i cant see them with a loop of 1 second, that's why i need something like the tail of a file
Rick Beldin
HPE Pro

Re: list new processes

If you need granularity less than 1 second, you'll probably have to write a program, not a script, although perl might have some functions that can do usleep() type of activities.

You might want to monitor /proc directly for changes.

A kernel module that does ps-like monitoring on a regular basis might be the best way, using timer interrupts.
Necessary questions: Why? What? How? When?
xyko_1
Esteemed Contributor
Solution

Re: list new processes

Cristian,

doing some research on the net (google) I found something that may help you.

But it's important to know that all accounting process will use computer resources.

Try

http://www.gnu.org/software/acct/

or

http://savannah.gnu.org/projects/acct/

and tell us if this solves your problem.

Regards,
Xyko
Cristian_4
Regular Advisor

Re: list new processes

thanks!

acct was the solution =)