23.07.2014 Views

Lustre 1.6 Operations Manual

Lustre 1.6 Operations Manual

Lustre 1.6 Operations Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

23.3 Troubleshooting with strace<br />

The operating system makes strace (program trace utility) available. Use strace<br />

to trace program execution. The strace utility pauses programs made by a process<br />

and records the system call, arguments, and return values. This is a very useful tool,<br />

especially when you try to troubleshoot a failed system call.<br />

To invoke strace on a program:<br />

$ strace <br />

Sometimes, a system call may fork child processes. In this situation, use the -f<br />

option of strace to trace the child processes:<br />

$ strace -f <br />

To redirect the strace output to a file (to review at a later time):<br />

$ strace -o <br />

Use the -ff option, along with -o, to save the trace output in filename.pid,<br />

where pid is the process ID of the process being traced. Use the -ttt option to<br />

timestamp all lines in the strace output, so they can be correlated to operations in<br />

the lustre kernel debug log.<br />

If the debugging is done in UML, save the traces on the host machine. In this<br />

example, hostfs is mounted on /r:<br />

$ strace -o /r/tmp/vi.strace<br />

23-12 <strong>Lustre</strong> <strong>1.6</strong> <strong>Operations</strong> <strong>Manual</strong> • September 2008

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!