Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On Solaris 10, how do you generally troubleshoot when a system hangs. For example - when i run a command say metastat and hit enter, the system hangs. press control C it comes out and on again running metastat and enter the system hangs. Please let me know how to trouble shoot this and which logs I can check with examples.

Thanks

share|improve this question

3 Answers 3

Truss is a great command for quick troubleshooting, but Solaris has a decisive advantage for this type of work: DTrace. It will take some time to get fully up to speed with it, but never again will you need to wonder "what is it doing?"

share|improve this answer

I would start with the truss command and the log files, you should monitor the follow files (thy record all system problems like disk errors, swap errors, NFS problems, etc):

tail -f /var/adm/SYSLOG
tail -f /var/adm/messages
tail -f /var/log/syslog
share|improve this answer
    
suppose I added a new patch to the sstem using patchadd command, after restart the system hangs... how can I troubleshoot such a situation. I have checked for all dependent patches and installed them already, but still the system hangs. –  user52840 Sep 9 '10 at 14:07
    
In that situation you would of course boot into single-user mode and start your analysis from there. And you can always boot from the CD and mount your root filesystem. It's very hard to make a modern Unix system totally unrecoverable. –  Gaius Nov 7 '10 at 10:50

There is a difference between when a command hangs and when a system hangs:

  • if the system hangs all processes will hang
  • if a command hangs only it is affected

What seems to be your case is a command hang, which can be troubleshot with truss - just run

truss -f command

and you'll see what it is doing and what system call it will hang on. The -f flag will tell truss to also follow child processes.

Since you mention that you are running metastat it is likely to be a disk issue, so looking for information about failed disks in /var/adm/messages would be a place to start.

share|improve this answer
    
does truss require root access ? –  user52840 Sep 9 '10 at 14:05
    
‘truss‘ only require root access when you are trussing a setuid program –  Martin Sep 9 '10 at 14:33

Your Answer

 
discard

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.