Q: SMF mostly manages system daemons and services. A sys admin can set up SMF to manage services for a non-privileged user, by wrapping the service with a script that calls su(1M), but is there a way for non-privileged users to manage their own services with SMF on a self-service basis, the way they can manage their own crontabs with cron(1M) (subject to /etc/cron.d/cron.deny)?
A:
$ id uid=37436(lianep) gid=10(staff) lianep@s260 $ grep lianep /etc/user_attr lianep::::auths=solaris.smf.manage,punchin;profiles=punchin $ svcadm restart sendmail Or, configure an individual service to allow a specific non-root user to modify or manage it. There's an excellent example of this in Glenn Brunette's Restricting Service Administration in the Solaris 10 Operating System (a Sun Blueprints article in PDF).
You can also read more about the available
However, Q: Is there a way to have SMF automatically kill and restart a daemon that exceeds a memory utilization threshold, for example, due to a memory leak?
A:
project(4) for this workload, and use smf(5) to bind the daemon to the project. Then you can either use rcapd(1M) to keep the process' memory use in bounds, or use the process.max-address-space resource control which instructs the kernel to send a fatal signal to the process when the resource control is exceeded.
Then, if the daemon is killed, smf(5) will restart the service.
Q: Is there a way to execute an arbitrary script to test a service, and use the return code from the script to measure the health of a service? There are times when a process is resident in memory, but it fails to handle requests correctly. When these situations arise, it would be nice to get SMF to restart the faulted service.
A:
Service-specific monitoring is not yet available in Q: To predict that a hardware component is going to fail, you will be analyzing some sort of hardware logs. What sort of statistical analysis do you apply on these logs? (k-means?) 2. If you are using a statistical model to determine if the component is failing, what sort of models (such as Weibull) do you use to determine if the component has actually crossed the threshold number of errors? A: The Solaris Fault Manager is responsible for collecting and persisting error event and other data required for problem diagnosis. The Fault Manager also offers facilities to dispatch the error event telemetry to pre-subscribed diagnosis engines. The algorithm used for diagnosis depends upon the nature of the problem, expected component FIT rates, and available error detectors and sensors. Diagnosis algorithms may range from simple, e.g. SERD (Soft Error Rate Discrimination), to more complex, e.g. Continuous System Telemetry Harness (see: http://research.sun.com/sunlabsday/docs.2004/talks/1.03_Gross.pdf). Q: Does the Solaris Fault Manager work on all Sun4u architectures? For example, does it work with UltraSPARC IIIi based systems? A: The Solaris Fault Manager is platform neutral and runs on all SPARC and x86 variants of the Solaris OS. However, instrumentation of low-level error detectors and diagnosis engines is currently only available for SPARC USIII, USIII+, USIIIi and forward processor and memory and Sun4u PCI components. (Note: "Diagnosis engines" refer to software components designed to facilitate diagnosis of a given error telemetry.) We have plans to offer the same level of error handling, diagnosis and recovery for our AMD Athlon 64 and Opteron processor-based offerings in an upcoming Solaris Update Release. You should hear more about specific release dates very soon. We are also continuing to invest in Predictive Self-Healing-aware drivers and software stacks such as ZFS. These products will migrate over time to support the error event generation and diagnosis facilities supported by the Fault Manager. Q: How do we change run levels using SMF? I tried "svcadm milestone milestone/multi-user-server:default" to go to run level 3 from run level S, but it isn't working.
A:
To change your run level, continue using the same command as you have in previous releases, I've covered some more details about milestones in my blog: http://blogs.sun.com/roller/page/lianep?anchor=smf_milestones_runlevels_and_system.
We've also made the |
| |||||