Sponsored Content
Top Forums Shell Programming and Scripting Performance Monitoring script for UNIX servers Post 302893827 by MadeInGermany on Friday 21st of March 2014 09:26:38 AM
Old 03-21-2014
Most people monitor RAM and SWAP, but the resulting figures are rather of academic interest, and alarm thresholds are even problematic.
More relevant is the sum of them, virtual memory (let's call it VMEM).
Here is a quick-and-dirty implementation:
Code:
case `uname` in
Linux)
  # deduct some cached data because it is easily reclaimable
  used=`free | awk '
/^[Mm]em/ {used+=$3; eused+=$3-($6+$7)/f; free+=$4}
/^[Ss]wap/ {used+=$3; eused+=$3; free+=$4}
END {print int(eused*100/(used+free))}
' f=2`
  ;;
SunOS)
  used=`swap -s | nawk '{print int($9*100/($11+$9))}'`
  ;;
esac

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix performance monitoring via Windows/NT

We are trying to Monitor Unix via Window95/98 on an NT network. Is there anyone that could point us in the direction on software that runs in Windows on a Telnet connection that we could use to accomplish this? We have tried a program called Unix Watcher by Etasoft and can' get it to connect. ... (6 Replies)
Discussion started by: btrout
6 Replies

2. UNIX for Dummies Questions & Answers

hardware monitoring on unix servers (Sun and Bull AIX)

Hello, I was given the task to write a shell script that must detect hardware problems on Unix Solaris and AIX servers. Problems that should be detected by this script are for example: abnormally high temperature or voltage etc... So, does anyone know if that kind of information is logged in a... (2 Replies)
Discussion started by: VeroL
2 Replies

3. UNIX for Advanced & Expert Users

Performance Monitoring

Hi all The place I work for is about to to place there database server under heavy load for testing and would like the effect recorded as much as possible. Can anyone point me in the right direction with respect to real time system monitoring. I am aware of of 'sar', vmstat etc and hope to... (2 Replies)
Discussion started by: silvaman
2 Replies

4. UNIX for Dummies Questions & Answers

Performance monitoring

Hello, I am trying to find a way to view current CPU and disk usage. I used to use nmon which worked fine but since an upgrade to our servers this is no longer available. I have tried to get it reinstalled to no avail! Are there any other commands you can use within unix which will allow me... (4 Replies)
Discussion started by: johnwilliams
4 Replies

5. UNIX for Dummies Questions & Answers

Unix performance monitoring counters

Which performance counters you might to define as "The most important counters in checking unix performance" (3 Replies)
Discussion started by: gen4ik
3 Replies

6. UNIX for Dummies Questions & Answers

Unix Performance Monitoring

In the vmstat , there are many columns you can see. Can someone tell me what is the most important column that i need to be watched on, and what value or average value should i watch inorder to determine that im experiencing a cpu bottle neck. What should be my basis. or if you use glance ... (2 Replies)
Discussion started by: kaibiganmi
2 Replies

7. UNIX for Advanced & Expert Users

MOnitoring Software for Unix servers

Guys, I need a monitoring software for my Unix servers. Over the last couple of years, the number has increased to well over 40 servers. All have different applications running on them and it is impossible to go to everyone of them and do checks. I was using Spotlight on Unix. I was... (1 Reply)
Discussion started by: jair
1 Replies

8. Linux

Linux/Unix performance monitoring

This is my first post (yes I'm a newbie).... :D I'm looking for a list of Linux and Unix commands for performance monitoring and a good sight or area on this site that would have man pages and or information on those commands..... Thanks if anyone can take the time to post..... :cool: (14 Replies)
Discussion started by: harrisjl
14 Replies

9. Solaris

Performance Monitoring

Hi all, I am planning to give a presentation on performance measure. I have decided to focus on the commands which are used to know the performance of the server. I have a idea of prstat,vmstat,netstat, and iostat. Could anybody suggest me any other commands which are used for perforamance... (7 Replies)
Discussion started by: priky
7 Replies

10. Red Hat

HELP - Resource/Performance Monitoring Script - Red Hat Enterprise Linux Server

Hi all, ------------------------- Linux OS Version/Release: ------------------------- Red Hat Enterprise Linux Server release 5.5 (Tikanga) Linux <hostname> 2.6.18-194.8.1.el5 #1 SMP Wed Jun 23 10:52:51 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux I have a server that hosts 30+ Oracle... (1 Reply)
Discussion started by: newbie_01
1 Replies
IO::Digest(3)						User Contributed Perl Documentation					     IO::Digest(3)

NAME
IO::Digest - Calculate digests while reading or writing SYNOPSIS
use IO::Digest; # Get a Digest::MD5 object that takes input while $fh being written or read my $fh; my $iod = IO::Digest->new ($fh, 'MD5'); print $fh "fooo"; print $iod->hexdigest DESCRIPTION
This module allows you to calculate digests while reading or writing file handles. This avoids the case you need to reread the same content to compute the digests after written a file. TEST COVERAGE
----------------------------------- ------ ------ ------ ------ ------ ------ File stmt branch cond sub time total ----------------------------------- ------ ------ ------ ------ ------ ------ blib/lib/IO/Digest.pm 100.0 n/a n/a 100.0 100.0 100.0 Total 100.0 n/a n/a 100.0 100.0 100.0 ----------------------------------- ------ ------ ------ ------ ------ ------ AUTHORS
Chia-liang Kao <clkao@clkao.org> COPYRIGHT
Copyright 2004 by Chia-liang Kao <clkao@clkao.org>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> perl v5.18.2 2013-02-16 IO::Digest(3)
All times are GMT -4. The time now is 09:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy