Debugging Memory Problems with MemoryScape : tvdsvr Command and Options
tvdsvr Command and Options
NOTE >> If you are altering a startup preference, you will also need the information located within tvdsvr Replacement Characters”.
Format
tvdsvr {-server | -callback hostname:port | -serial device}
[other options]
Description
The tvdsvr debugger server allows MemoryScape to control and debug a program on a remote machine. To accomplish this, the tvdsvr program must run on the remote machine, and it must have access to the executables being debugged. These executables must have the same absolute path name as the executable that MemoryScape is debugging, or the PATH environment variable for tvdsvr must include the directories containing the executables.
You must specify a -server, -callback, or -serial option with the tvdsvr command. By default, MemoryScape automatically launches tvdsvr using the -callback option, and the server establishes a connection with MemoryScape. (Automatically launching the server is called autolaunching.)
If you prefer not to automatically launch the server, you can start tvdsvr manually and specify the -server option. Be sure to note the password that tvdsvr prints out with the message:  
pw = hexnumhigh:hexnumlow
MemoryScape will prompt you for hexnumhigh:hexnumlow later. By default, tvdsvr automatically generates a password that it uses when establishing connections. If desired, you can set your own password by using the -set_pw option.
Options
The following options name the port numbers and passwords that MemoryScape uses to connect with tvdsvr.
-callback hostname:port
(Autolaunch feature only) Immediately establishes a connection with a MemoryScape process running on hostname and listening on port, where hostname is either a host name or TCP/IP address. If tvdsvr cannot connect with MemoryScape, it exits.
If you use the -port, -search_port, or -server options with this option, tvdsvr ignores them.
-callback_host hostname
Names the host upon which the callback is made. The hostname argument indicates the machine upon which MemoryScape is running.
-callback_ports port-list
Names the ports on the host machines that are used for callbacks. The port-list argument contains a comma-separated list of the host names and TCP/IP port numbers (hostname:port,hostname:port...) on which MemoryScape is listening for connections from tvdsvr. This option is most often used with a bulk launch.
-debug_file console_outputfile
Redirects TotalView Debugger Server console output to a file named console_outputfile.
Default: All console output is written to stderr.
-port number

Sets the TCP/IP port number on which tvdsvr should communicate with MemoryScape. If this port is busy, tvdsvr does not select an alternate port number (that is, it won’t communicate with anything) unless you also specify -search_port.
Default: 4142
-search_port

Searches for an available TCP/IP port number, beginning with the default port (4142) or the port set with the -port option and continuing until one is found. When the port number is set, tvdsvr displays the chosen port number with the following message:
port = number
Be sure that you remember this port number, since you will need it when you are connecting to this server from MemoryScape.
-server

Listens for and accepts network connections on port 4142 (default).
Using -server can be a security problem. Consequently, you must explicitly enable this feature by placing an empty file named tvdsvr.conf in your /etc directory. This file must be owned by user ID 0 (root). When tvdsvr encounters this option, it checks if this file exists. This file’s contents are ignored.
You can use a different port by using one of the following options: -search_port or -port. To stop tvdsvr from listening and accepting network connections, you must terminate it by pressing Ctrl+C in the terminal window from which it was started or by using the kill command.
-set_pw hexnumhigh:hexnumlow
Sets the password to the 64-bit number specified by the hexnumhigh and hexnumlow 32-bit numbers. When a connection is established between tvdsvr and MemoryScape, the 64-bit password passed by MemoryScape must match this password set with this option. tvdsvr displays the selected number in the following message:
pw = hexnumhigh:hexnumlow
We recommend using this option to avoid connections by other users.
If necessary, you can disable password checking by specifying the “-set_pw 0:0” option with the tvdsvr command. Disabling password checking is dangerous; it allows anyone to connect to your server and start programs, including shell commands, using your UID. Therefore, we do not recommend disabling password checking.
-verbosity level

Sets the verbosity level of tvdsvr-generated messages to level, which may be one of silent, error, warning, or info.
Default: info
-working_directory directory
Makes directory the directory to which MemoryScape will be connected.
Note that the command assumes that the host machine and the target machine mount identical file systems. That is, the path name of the directory to which MemoryScape is connected must be identical on both the host and target machines.
After performing this operation, the tvdsvr is started.