Wednesday, February 10, 2010

Process Monitor Facility

Came across this while I was trying to understand about Sun Cluster. This simplifies the way processes are managed in a cluster node. Without this, I have to manage my process with a pid file and have to check the status of the process using either 'kill -0' or '-f /proc/$pid' in my scripts. And this even monitors the children processes which I was not able to with shell scripts. It is a really useful command.

In normal solaris we have the Service management facility(SMF) which is really wonderful. What I really like in SMF is it remembers the enable/disable option the user selects across restarts.

pmfadm man page

The pmfadm utility provides the administrative, command-line interface to the process monitor facility.

The process monitor facility provides a means of monitoring processes, and their descendents, and restarting them if they fail to remain alive. The total number of failures allowed can be specified, and limited to a specific time period. After the maximum number of failures has occurred within the specified time period, a message is logged to the console, and the process is no longer restarted.

If an action program has been specified, it is called when the number of failures allowed has been reached. If the action program exits with non-zero status, the process nametag is removed from the process monitor facility. Otherwise, the process is restarted with the original parameters passed into pmfadm.

Processes that are started under control of the process monitor are run as the uid of the user that initiated the request. Only the original user, or root, can manipulate the nametag associated with those processes. Status information, however, is available to any caller, local or remote.

All spawned processes, and their descendent spawned processes, of the process that initially started are monitored. Only when the last process/sub-process exits does the process monitor attempt to restart the process.


Solaris Service Management Facility - Quickstart Guide
UNIX operating systems have traditionally included a set of services: software programs not associated with any interactive user login that listen for and respond to requests to perform certain tasks, such as delivering email, responding to ftp requests, or permitting remote command execution. These traditional services were usually individual applications that executed as a single process that started at boot time and executed continuously while a system was up and running, servicing any requests that were received.

Today, administrators must contend with a collection of services that has grown to such a point that it has exceeded the utility of this original model. Sun has created the Service Management Facility (SMF) to simplify management of these system services. SMF is a new feature of the Solaris Operating System that creates a supported, unified model for services and service management on each Solaris system. It is a core part of the Predictive Self-Healing technology available in Solaris 10, which provides automatic recovery from software and hardware failures as well as administrative errors.

Disabling colors in ls command

The output of ls has different colours for different type of files. In some backgrounds, these names are not visible properly. In those cases you can request ls to display it in default foreground colour using 'ls --color=never'. All the output of ls (file names and other details) are displayed in the default foreground color.

Test web page

Microsoft in web photo racism row

http://news.bbc.co.uk/2/hi/technology/8221896.stm



Debian vs. Shuttleworth

http://www.dtschmitz.com/dts/2009/08/debian-vs-shuttleworth-1.html
Which came first? The Debian or the Shuttleworth.
Much has been made of Mark Shuttleworth's efforts to get Debian to 'release on time' vs. 'release when ready'. According to Mark this would make things easier for the derivative folks like Ubuntu and upstream developers.

Tuesday, February 9, 2010

Sun exception

The first time I am seeing an exception in Sun's website

http://docs.sun.com/app/docs/doc/820-2563/relnotes-6-products?a=view

Exception

An exception occured, and has been logged.

Name:

java.lang.IllegalArgumentException

Error code:

Message:

Doctype nickname is null

Stack trace:

 at eng.pubs.docbase.ResultDoctype.getInstance(ResultDoctype.java:33)
at eng.pubs.docbase.DocBaseConnection.getDocNode(DocBaseConnection.java:684)
at eng.pubs.servlet.DocServlet.doDoc(DocServlet.java:542)
at eng.pubs.servlet.DocServlet.doDocBaseRequest(DocServlet.java:246)
at eng.pubs.servlet.DocBaseServlet.doRequest(DocBaseServlet.java:122)
at eng.pubs.servlet.TextServlet.doGet(TextServlet.java:158)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:796)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:917)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
at com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.java:160)