Here are a few Solaris specific commands.

  • truss - The truss command can be used to trace a process's system calls. It is sometimes helpful when diagnosing a program problem, especially in cases where the trouble program produces little output. If a program is unable to stat a file for example you would see this in the truss output. The syntax is simple, "truss ls" for example will display all the system calls involved in executing the "ls" command. Some common command line switches are -o output-file and -f. The -f switch tells truss to also trace child processes. To run truss on a currently running process simply "truss -p pid"

  • Snoop - Snoop is tool for examining network traffic. This is a handy tool when trying to troubleshoot some network issues. Snoop -v will produce an extremely verbose output stream on a busy server. Often is is desirable to be more selective when running snoop. The command "snoop -v -d hme1 -x 0 port 162" will display packets received by the hme1 interface on port 162. This would be useful if you were expecting snmp traps to be received by the hme1 interface. With snoop you could say with certainty that the trap arrived. Sometimes it is possible with snoop to determine which windows boxes are currently infected with the latest windows rpc worm. For example, if the latest worm tries to connect to port 445 on every network device it can find you may detect this with snoop, "snoop -v -x0 port 445".
  • Swap - The swap command provides a means of managing and monitoring system swap space. If you manage a Sun server running oracle or java, or worse oracle and java, you've probably experienced sudden memory and swap shortages. A poorly written java program or out of control oracle process can consume all your server's virtual memory pretty quickly. In these cases it is possible to add swap on the fly by creating a swap file with mkfile then adding the file with the command "swap -a /path/to/file". This will sometimes buy enough time to get the oracle dba's or java developers to have a look at the problem. Worst case you can fall back on the old reliable, "kill -9".

    Other usefull swap command options include, -l status of swap devices, -s summary of swap usage uncluding memory, -d delete a swap device.

  • devfsadm - Used to manage /dev and /devices. If you're Sun box is attached to a SAN you may be able to add disks on the fly by making a lun available to the Sun server then running devfsadm -C.

  • luxadm - This command is used to manage Sun's A5000/A5200 disk arrays among other things. Common optional parameters are probe, display, insert_device and remove_device.



You are visitor number 1258