Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Anyone got a idea how to install the trace command on RHEL5 to monitor variable access? I already googled it and search via yum but nothing seems to work.

share|improve this question
up vote -1 down vote accepted

The command you link to is a built in TCL command. Do you have TCL installed?

yum install tcl

Edit: Try the following program:

  proc tellme {id a e op} {
    puts "  $id a=$a e=$e op=$op\
                ax=[info exists ::$a] ex=[info exists ::${a}($e)]"

  proc do {args} {
    puts "<$args>"
    uplevel $args

  trace var a wu {tellme array}
  trace var a(1) wu {tellme element}

  puts [trace vinfo a]
  puts [trace vinfo a(1)]

  do set a(0) zero
  do set a(1) one
  do set a(2) two
  do unset a(0)
  do unset a(2)
  do unset a

  # output is:
  #   {wu {tellme array}}
  #   {wu {tellme element}}
  #   <set a(0) zero>
  #     array a=a e=0 op=w ax=1 ex=1
  #   <set a(1) one>
  #     array a=a e=1 op=w ax=1 ex=1
  #     element a=a e=1 op=w ax=1 ex=1
  #   <set a(2) two>
  #     array a=a e=2 op=w ax=1 ex=1
  #   <unset a(0)>
  #     array a=a e=0 op=u ax=1 ex=0
  #   <unset a(2)>
  #     array a=a e=2 op=u ax=1 ex=0
  #   <unset a>
  #     array a=a e= op=u ax=0 ex=0
  #     element a=a e=1 op=u ax=0 ex=0

(From )

share|improve this answer
yes, installed it, but it didn't include the trace command for an unknown reason. – Henrik P. Hessel Mar 14 '10 at 13:14

You may be getting your UNIXes mixed up ... on Linux the command strace performs a system trace - that may be what you're looking for. Try a yum install strace

Alternatively you may be looking for traceroute to perform a network trace. Install that with a yum install traceroute

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.