The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
server monitor script... zedex Shell Programming and Scripting 1 06-01-2008 04:10 PM
Bubbling Load Monitor Applet 2.0.9 (Gnome 2 branch) iBot Software Releases - RSS News 0 01-15-2008 07:40 PM
Bubbling Load Monitor Applet 2.0.8 (Gnome 2 branch) iBot Software Releases - RSS News 0 01-05-2008 05:40 PM
need help doing a script to monitor if files are go through jonathan184 Shell Programming and Scripting 0 05-15-2007 11:47 AM
Need help in wrting Load Script for a Load-Resume type of load. ankitgupta Shell Programming and Scripting 1 11-10-2006 12:46 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-15-2007
locabuilt locabuilt is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 2
load monitor script

I need help in finding a script to monitor loads for 8+ servers on a single console. The goal here is to centralize it and run the script from a single server. Can anyone help on this?


Im running this script on each server to monitor the load.
while true; do w | grep average | grep -v grep ; sleep 4; done

Last edited by locabuilt; 01-15-2007 at 03:40 PM.. Reason: added script that I run to monitor
  #2 (permalink)  
Old 01-16-2007
Radar's Avatar
Radar Radar is offline
Registered User
  
 

Join Date: Dec 2006
Location: Clifton Park, NY
Posts: 86
Quote:
Originally Posted by locabuilt
I need help in finding a script to monitor loads for 8+ servers on a single console. The goal here is to centralize it and run the script from a single server. Can anyone help on this?


Im running this script on each server to monitor the load.
while true; do w | grep average | grep -v grep ; sleep 4; done
Nagios will do what you're asking. BTW, do you really need to grep out the grep?
  #3 (permalink)  
Old 01-17-2007
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,318
otherwise I have something in mind, but it's too complicated and time consuming to be done, it includes tcl/expect and STAF.
  #4 (permalink)  
Old 01-17-2007
Tornado's Avatar
Tornado Tornado is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2006
Location: Melbourne
Posts: 249
No need to use "w | grep average | grep -v grep" uptime gives you what you want
Code:
# uptime
  8:48am  up 144 day(s), 8 min(s),  5 users,  load average: 0.23, 0.19, 0.18
#
You might want to look at Big Brother aswell, not as complicated as nagios to setup
  #5 (permalink)  
Old 01-17-2007
Tornado's Avatar
Tornado Tornado is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2006
Location: Melbourne
Posts: 249
Or for a bit more info try prstat
Code:
# prstat 1 1 | grep average
Total: 96 processes, 194 lwps, load averages: 0.15, 0.16, 0.17
#
OR For even more info instead of just the average line....
Code:
# prstat -ac 1 1
   PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
  4424 named      60M   59M sleep   59    0  16:36.23 4.6% named/7
  8331 root     6096K 3264K sleep   59    0   0:11.21 0.5% syslogd/21
   388 root       73M   72M sleep   59    0  10:14.11 0.1% rpc.nisd/4
   378 root     2984K 2056K sleep   59    0   1:07.15 0.1% rpcbind/1
   813 root     8216K 7632K sleep   59    0   0:00.00 0.0% mibiisa/12
  3179 root     1256K  912K cpu3    49    0   0:00.00 0.0% prstat/1
   642 root     2240K 1280K sleep  100    -   0:31.21 0.0% xntpd/1
   381 root     2976K 1376K sleep   59    0   0:00.00 0.0% keyserv/7
   428 root     4928K 3384K sleep   59    0   0:00.46 0.0% automountd/5
   556 root     1760K  896K sleep   59    0   0:19.45 0.0% prngd/1
   656 root     2536K 1600K sleep   59    0   0:14.06 0.0% nmbd/1
   419 root     1928K 1304K sleep   59    0   0:00.00 0.0% lockd/1
   427 daemon   3392K 2256K sleep   59    0   0:00.00 0.0% statd/5
  1612 sn00     1528K 1104K sleep   59    0   0:00.00 0.0% csh/1
   390 root     2480K 1816K sleep   59    0   0:00.00 0.0% rpc.nispasswdd/1
 NPROC USERNAME  SIZE   RSS MEMORY      TIME  CPU
     1 named      60M   59M   3.0%  16:36.23 4.6%
    64 root      277M  193M   9.8%  13:09.00 0.8%
     7 www        20M   13M   0.7%   0:00.00 0.0%
     1 daemon   3392K 2256K   0.1%   0:00.00 0.0%
    14 sn00       38M   20M   1.0%   0:00.34 0.0%
Total: 95 processes, 193 lwps, load averages: 0.09, 0.12, 0.15
#
  #6 (permalink)  
Old 01-18-2007
maheshwin maheshwin is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 55
uptime will be more benifit , with script which collects all the server loads


#!/bin/sh

loadcnt=$(uptime | awk -F "." '{ print $1 }' | awk -F ":" '{ print $5 }') echo " the current load:"$loadcnt if [ $loadcnt -gt 0 ]; then echo "Alert System Process handling exceeded"
fi;

u can individually execute this script on differetn script using the SSH command

ssh 192.168.23.22 "sh /bin/alertscript.sh" > monitorfile
Closed Thread

Bookmarks

Tags
load average, performance

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On




All times are GMT -4. The time now is 08:09 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0