... * Show the total number of services available by running *svcs -a | wc -l*. * Check if any services failed by running *svcs \-x*. The list should be empty on a healthy system. * Look for the sendmail service - *svcs \| grep sendmail*. You'll get the FMRI: svc:/network/smtp:sendmail * Find all processes related to this service - *svcs \-p sendmail*. Get the process IDs. * Kill both sendmail processes by running *pfexec kill ID*, where the ID is the number you got in previous step. * The processes will be restarted automatically. Verify they are running again by using *svcs \-p sendmail*. There should be new process IDs. Explain what just happened - SMF takes care of restarting the service for you, which is why we see new process IDs. * Get more info about the service by running *svcs \-l sendmail*. Point out the dependencies: sendmail cannot run without svc:/network/service, etc. * Point out the other information: the log file location, etc. * View the logfile, copying the location from the svcs \-l output. * Disable sendmail (after all, we're just running on a laptop, not a server :-) ) with *svcadm disable sendmail*. * Use *svcs \-x sendmail* to view the service state. Note the Reason will be "Disabled by an administrator". * Use *svcs \-p sendmail* to show that the processes are gone. * Use *svcadm enable sendmail* to restore your system to its original state.
Note, *mysql* also works well with this demo.
h4. Demo Cleanup
None |