P. 1
RHEL Tuning Guide

RHEL Tuning Guide

|Views: 106|Likes:
Published by chasitb

More info:

Published by: chasitb on May 28, 2012
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less






To run valgrind, use

# valgrind [ --tool=toolname ] commandname

Memcheck is the default --tool.

For example:

valgrind --tool=memcheck ls -l

Errors are reported before the associated operation actually happens. If you are using a tool (Mem-
check, Addrcheck) which does address checking and your program attempts to read from address
zero, the tool will emit a message to this effect, then the program will die with a segmentation fault. valgrind Processing Options

valgrind has many processing options that you may find useful:


Chapter 6. Detecting and Preventing Application Memory Problems


Writes the commentary to filename.pidpidnumber This is helpful when running valgrind
on a tree of processes at once, as each process writes to its own logfile.


Reports how many times each error occurred. When execution finishes, all the reports are printed
out, sorted by their occurrence counts. This makes it easy to see which errors have occurred most


Searches for memory leaks when the program being tested exits.

--error-limit=no flag

Disables the cutoff for error reports (300 different errors or 30000 errors in total—after sup-
pressed errors are removed).


These cutoff limits are set in vg_include.h and can be modified.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->