Book Image

Oracle Solaris 11 Advanced Administration Cookbook

By : Alexandre Borges
Book Image

Oracle Solaris 11 Advanced Administration Cookbook

By: Alexandre Borges

Overview of this book

Table of Contents (17 chapters)
Oracle Solaris 11 Advanced Administration Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Troubleshooting Oracle Solaris 11 services


In this last section of the chapter, you're going to learn how to troubleshoot a service that's presenting an error and how to fix a corrupted repository.

Getting ready

To following the recipe, it'll be necessary to have a virtual machine (using VirtualBox or VMware) with Oracle Solaris 11 installed and 4 GB RAM.

How to do it…

The main role of an administrator is to keep everything working well. The best way to analyze the system is by running the following command:

root@solaris11-1:~# svcs –xv

For now, there isn't a problem in the system, but we can simulate one. For example, in the next step, we will break the gedit_script service by taking out a semicolon from its script, as follows:

root@solaris11-1:~# vi /lib/svc/method/gedit_script.sh
#!/sbin/sh
. /lib/svc/share/smf_include.sh
case "$1" in
'start')
DISPLAY=:0.0
export DISPLAY
/usr/bin/gedit &
;-----------------à Remove this semicolon!
'stop')
pkill -x -u 0 gedit
;;
*)
echo $"Usage: $0 {start...