UnixServerAdmin

Server Administration & Management

Tracing what a Linux process is doing

From time to time you will get hanged process or you are unsure of what a process is doing at that moment.

You can trace what a process is doing by running:

# strace -p PID

Where PID is the process ID. Whis will show you what that process is doing in real time.

This is usefull for detecting  exploits or the source of a hang process.

To detach from that process simply press CTRL + C.

Advertisements

January 26, 2011 - Posted by | Tips & Tricks, Unix/Linux | ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: