nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

remote server monitoring for Solaris

This is a discussion on remote server monitoring for Solaris within the Solaris/OpenSolaris forums, part of the UNIX operating systems category; Hello, I need to gather uptime info from different servers (all Solaris). I have a little script running using 'rup', ...


Go Back   nixCraft Linux Forum > UNIX operating systems > Solaris/OpenSolaris

Linux answers from nixCraft.


Solaris/OpenSolaris Discuss all about the SUN Solairs/OpenSolaris. You are free to talk about any issues related to Solaris administration, networking, services and other stuff, share information or ask doubts.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-10-2005, 03:17 AM
Junior Member
User
 
Join Date: Oct 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
pliu0606
Default remote server monitoring for Solaris

Hello,

I need to gather uptime info from different servers (all Solaris). I have a little script running using 'rup', but management require more information and a recommendation of which server to login to do build. Here is the desire output that I am looking for (text output is fine):

>svrload
10-11-2005
server 1 4 users, load average: 0.06, 0.08, 0.09
server 2 4 users, load average: 0.06, 0.08, 0.07
server 3 4 users, load average: 0.01, 0.01, 0.01

Recommendation: server 3

I have tried to use ruptime, and that did not work.

Please help

Thank you,
Philip
Reply With Quote
  #2 (permalink)  
Old 12-10-2005, 04:19 AM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
OS: Debian GNU/Linux
Posts: 506
Thanks: 0
Thanked 8 Times in 6 Posts
Rep Power: 7
monk has a spectacular aura about monk has a spectacular aura about
Default

Well diffrent solution can be provided


(1) Find out info over secure ssh
Do you have sshd server installed on each Solaris box? If so then you can use command like:

Code:
ssh user@server1 uptime
ssh user@server2 uptime
ssh user@server3 uptime

(2) Command ruptime will only work if you have rwhod system status server
installed on each solaris box. It provides the server function for the rwho and ruptime commands.For this purpose you need to enable in.rwhod daemon. Please note in.rwhod daemon can create significant amounts of network traffic. If your network is small then you can use this.

(3)
Try using rstat command. This is a rpc service that you can call to obtain
statistics from a remote server/host. The rstatd daemon must be running on the remote solaris system.

You can use any three of above choice to produce output as you mentioned. Last two service needs additional software on solaris server. Let me know which one you would like to use...
Reply With Quote
  #3 (permalink)  
Old 14-10-2005, 03:27 AM
Junior Member
User
 
Join Date: Oct 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
pliu0606
Default

Thank you for the information.

How can one rank the result? For example:

server 1 4 users, load average: 0.06, 0.08, 0.09
server 2 4 users, load average: 0.06, 0.08, 0.07
server 3 4 users, load average: 0.01, 0.01, 0.01

Recommendation: server 3 is best server to use.

thank you,
Philip
Reply With Quote
  #4 (permalink)  
Old 14-10-2005, 09:42 AM
rockdalinux's Avatar
Is that all you got?
User
 
Join Date: May 2005
Location: Planet Vegeta
OS: Redhat
Posts: 708
Thanks: 15
Thanked 19 Times in 18 Posts
Rep Power: 10
rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light
Default

Assuming that your output is as follows:

Code:
server 1 4 users, load average: 0.06, 0.08, 0.09
server 2 4 users, load average: 0.06, 0.08, 0.07
server 3 4 users, load average: 0.01, 0.01, 0.01

And above output stored in three variable as you need to process output to find out the best server, here is the code:
Code:
#!/bin/sh
F="server 1 4 users, load average: 0.06, 0.08, 0.09"
F1="server 2 4 users, load average: 0.06, 0.08, 0.07"
F2="server 3 4 users, load average: 0.01, 0.01, 0.01"

# get server load i.e. 0.09, 0.07 and 0.01 in S1, S2, S3
S1=$(echo $F | awk '{ print $9}')
S2=$(echo $F1 | awk '{ print $9}')
S3=$(echo $F2 | awk '{ print $9}')

# now compare S1 load with S2 and S3
T=$(echo "$S1 < $S2 && $S1 < $S3" | bc)
if [ $T -eq 1 ]; then # if result is TRUE, then this is the best server to run application
  echo "Server1 is the best to run"
  exit 0
fi

T=$(echo "$S2 < $S1 && $S2 < $S3" | bc)
if [ $T -eq 1 ]; then
  echo "Server2 is the best to run"
  exit 0
fi

T=$(echo "$S3 < $S2 && $S3 < $S1" | bc)
if [ $T -eq 1 ]; then
  echo "Server3 is the best to run"
  exit 0
fi
__________________
Rocky Jr.
What's wrong? I hope I am not making you uncomfortable...

Never send a boy to do a mans job.
Reply With Quote
  #5 (permalink)  
Old 15-10-2005, 02:49 PM
Member
User
 
Join Date: Sep 2005
Posts: 30
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
charvi
Default

Rocky your script is mind blowing!!!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
VMware ESX server && Solaris 10 on same PC ?? vikas027 Linux software 2 07-09-2009 03:03 AM
Remote access to linux server RamPD Linux software 9 26-05-2008 07:21 AM
Solaris Disk Monitoring vimalgoel Getting started tutorials 0 19-12-2007 04:53 PM
script hangs when a remote server is down vikas027 Shell scripting 2 11-11-2007 03:47 PM
Server monitoring (samba,NFS,telnet,ssh,ftp) warren Linux software 11 26-06-2006 07:10 PM


All times are GMT +5.5. The time now is 11:23 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38