June 15, 2010

Use clinfo for scripting in Sun Cluster environment

Posted in Sun Cluster at 9:01 am by alessiodini

Yesterday i have founded this simple command that can be used for check if current node is booted in cluster.

From man page:
man clinfo
Reformatting page. Please Wait… done

Maintenance Commands clinfo(1M)

NAME
clinfo – display cluster information

SYNOPSIS
clinfo [ -nh ]

[…]
EXIT STATUS
The following exit values are returned:

0 Successful completion.

1 An error occurred.

This is usually because the node is not config-
ured or booted as part of a cluster.

For example , running it in active cluster member:

>clinfo
>echo $?
0

I think it will be very useful for my future scripts 😉

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: