11.01.2013 Views

IBM AIX Continuous Availability Features - IBM Redbooks

IBM AIX Continuous Availability Features - IBM Redbooks

IBM AIX Continuous Availability Features - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

{<br />

int count;<br />

count = count +1;<br />

printf("printf called %d times\n",count);<br />

}<br />

@@uft:$1:*:sleep:entry<br />

{<br />

int count1;<br />

count1 = count1 +1;<br />

printf("sleep called %d times\n",count1);<br />

}<br />

@@syscall:*:read:exit<br />

when (__pid == $1)<br />

{<br />

printf("read entered\n");<br />

}<br />

@@syscall:*:read:entry<br />

when (__pid == $1)<br />

{<br />

printf("read exited\n");<br />

}<br />

@@END<br />

{<br />

printf("Tracing ends now\n");<br />

}<br />

4. We execute the pvue.e script with the probevue command passing the process ID to be<br />

traced as parameter:<br />

# probevue ./pvue.e 262272<br />

We obtain the tracing output shown in Example 3-40.<br />

Example 3-40 Start Vue script providing pid<br />

# ./pvue.e 262272<br />

Tracing starts now<br />

printf called 1 times<br />

sleep called 1 times<br />

printf called 2 times<br />

/*<br />

* Although the sleep precedes the printf in the loop, the reason we got the printf<br />

in the trace was because the program was in the middle of the first sleep when we<br />

started tracing it, and so the first thing we traced was the subsequent printf.<br />

*/<br />

sleep called 2 times<br />

printf called 3 times<br />

sleep called 3 times<br />

printf called 4 times<br />

sleep called 4 times<br />

printf called 5 times<br />

sleep called 5 times<br />

read exited<br />

read entered<br />

printf called 6 times<br />

^CTracing ends now<br />

#<br />

120 <strong>IBM</strong> <strong>AIX</strong> <strong>Continuous</strong> <strong>Availability</strong> <strong>Features</strong>

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

Saved successfully!

Ooh no, something went wrong!