FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 04-26-2010, 04:43 PM
Alan McKay
 
Default System Resources Graphing

On Mon, Apr 26, 2010 at 12:13 PM, Brian Mathis <brian.mathis@gmail.com> wrote:
> Take a look at the "sysstat" package which will collect data over
> time. *There's a java-based desktop app called "kSar" that can use
> this data to generate graphs.

I use kSar as well as Munin. Munin's only problem is that it has a
hard coded 5 minute granularity - which is perfectly fine for 99% or
more of what you need. I run this script on my systems which keeps
sar logs with finer granularity that I can check into with kSar if I
need to. But I almost never need to.

Run this every hour from cron to keep sar files for each hour

01 * * * * /root/sadc.sh

You may choose to only turn this on at times when you need that kind
of granularity - below is pretty extreme with 10 second granularity.
But even at that I do not find it impacts performance in any noticable
fashion.

#!/bin/bash

# DATEFORMAT="%Y.%m.%d %H:%M:%S"
HOSTNAME=`hostname | awk -F. '{print $1}'`
DATEFORMAT="%Y.%m.%d %H:%M:%S"
# SAINTERVAL x SACOUNT = 3600
SAINTERVAL=10 # seconds
SACOUNT=360 # iterations
TIMESTAMP=`date +"${DATEFORMAT}"`
LOGFILEMAX=80 # max number of files to store
((LOGFILEMAXMINUTES=60*LOGFILEMAX))
LOGDIR="/var/log/sa/sadc"
mkdir -p $LOGDIR
if [ ! -d $LOGDIR ]
then
echo "ERROR: $LOGDIR does not exist"
exit 1
fi
LOGFILE=`echo "${LOGDIR}/sadc_${HOSTNAME}_${TIMESTAMP}" | sed "s/ /_/g" `

# are we 32 or 64 bit?

BASEARCH=`uname -i`
case $BASEARCH in
i386)
SADC="/usr/lib/sa/sadc"
;;
x86_64)
SADC="/usr/lib64/sa/sadc"
;;
*)
echo "ERROR: unknown architecture [$BASEARCH]"
exit 2
esac

$SADC -d -I -F $SAINTERVAL $SACOUNT $LOGFILE

# get the date from LOGFILEMAXMINUTES minutes ago and then touch
# a file so it has that date. We'll then use this file
# in the "find" command to find all files older than
# it, so we can remove them

MAXFILESTAMP=`date -d "$LOGFILEMAXMINUTES minutes ago"`
MAXFILENAME=syscheckmaxfile
MAXFILE="${LOGDIR}/${MAXFILENAME}"
touch -d "${MAXFILESTAMP}" $MAXFILE

pushd $LOGDIR
RMFILES=`find . ! -name $MAXFILENAME -type f ! -newer $MAXFILE`
for afile in $RMFILES
do
rm -f $afile
done
popd
:

--
“Don't eat anything you've ever seen advertised on TV”
- Michael Pollan, author of "In Defense of Food"
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-26-2010, 04:45 PM
Alan McKay
 
Default System Resources Graphing

> I have sysstats already but want a graphing. *ksar sounds appealing.
> I do not have physical access to this server so I need to access ksar
> through http on the server. *Does it support that? *Googling for the
> answer on how to do this but not finding what I want yet.

No, kSar is a desktop app and is IMO a PITA to use - I keep it in my
pocket only when I need very fine granularity.

Most of the other ones mentioned have web front ends - Munin being the
one I went with but I evaluated most of the other ones mentioned.



--
“Don't eat anything you've ever seen advertised on TV”
- Michael Pollan, author of "In Defense of Food"
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-26-2010, 04:46 PM
Alan McKay
 
Default System Resources Graphing

On Mon, Apr 26, 2010 at 12:45 PM, Alan McKay <alan.mckay@gmail.com> wrote:
> No, kSar is a desktop app and is IMO a PITA to use - I keep it in my
> pocket only when I need very fine granularity.

p.s. this happens mainly in 2 cases :
- the SW design team doing sandbox tests, trying to eke out more
performance from code
- a system in production gets bogged down but the intervals are small
enough that munin does not pick them up.

They both happen from time to time, but not often.


--
“Don't eat anything you've ever seen advertised on TV”
- Michael Pollan, author of "In Defense of Food"
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-26-2010, 04:58 PM
Les Mikesell
 
Default System Resources Graphing

On 4/26/2010 11:38 AM, Matt wrote:
>> Take a look at the "sysstat" package which will collect data over
>> time. There's a java-based desktop app called "kSar" that can use
>> this data to generate graphs.
>
> I have sysstats already but want a graphing. ksar sounds appealing.
> I do not have physical access to this server so I need to access ksar
> through http on the server. Does it support that? Googling for the
> answer on how to do this but not finding what I want yet.

Physical access shouldn't be necessary. Snmp based tools expect to work
over the network and you can run local graphic programs remotely through
an ssh tunnel. If you have to use only http, you could run cacti on the
server itself, monitoring itself - and it is one of the easier systems
to set up.

--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-26-2010, 05:13 PM
Brian Mathis
 
Default System Resources Graphing

kSar runs on your local desktop and connects via SSH to the remote
server and collects the sysstat data. It's good for checking or
reviewing server stats once in a while. If you need sustained
graphing and reporting, then look into one of the other monitoring
tools mentioned here.


On Mon, Apr 26, 2010 at 12:38 PM, Matt <lm7812@gmail.com> wrote:
>> Take a look at the "sysstat" package which will collect data over
>> time. *There's a java-based desktop app called "kSar" that can use
>> this data to generate graphs.
>
> I have sysstats already but want a graphing. *ksar sounds appealing.
> I do not have physical access to this server so I need to access ksar
> through http on the server. *Does it support that? *Googling for the
> answer on how to do this but not finding what I want yet.
>
> Matt
>
>
>> There are also other options, such as SNMP monitoring, Cacti, etc...
>>
>>> Is there a package I can get that will graph system resources such as
>>> CPU and disk I/O to an html file or something?
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-27-2010, 04:13 AM
Rajagopal Swaminathan
 
Default System Resources Graphing

Greetings,

On Mon, Apr 26, 2010 at 9:39 PM, Matt <lm7812@gmail.com> wrote:
> Is there a package I can get that will graph system resources such as
> CPU and disk I/O to an html file or something?
>


Try Zabbix. It may be seem to be an overkill.

All the same, it is very extensible and have tried it in couple of
scenarios of remote and local monitoring of diverse devices and
processes. and oh SVN checkout may be a good bet.

There are, of course, rpms are CentOS are available in a repo
(AndrewFarley) Available

HTH,

Regards,

Rajagopal
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-27-2010, 08:20 AM
James Hogarth
 
Default System Resources Graphing

Had zabbix at my last place... hated it...


Use nagios + pnp4nagios now with sar running for detailed bits with a custom nagios plugin using sar for performance data. Works very nicely


James


On Apr 27, 2010 5:14 AM, "Rajagopal Swaminathan" <raju.rajsand@gmail.com> wrote:

Greetings,



On Mon, Apr 26, 2010 at 9:39 PM, Matt <lm7812@gmail.com> wrote:
> Is there a package I can get that...
Try Zabbix. It may be seem to be an overkill.



All the same, it is very extensible and have tried it in couple of

scenarios of remote and local monitoring of diverse devices and

processes. and oh SVN checkout may be a good bet.



There are, of course, rpms are CentOS are available in a repo

(AndrewFarley) Available



HTH,



Regards,



Rajagopal


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.c...


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-28-2010, 03:27 AM
Jobst Schmalenbach
 
Default System Resources Graphing

http://oss.oetiker.ch/mrtg/

http://www.nagios.org/


Jobst




On Mon, Apr 26, 2010 at 11:09:41AM -0500, Matt (lm7812@gmail.com) wrote:
> Is there a package I can get that will graph system resources such as
> CPU and disk I/O to an html file or something?
>
> Matt
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos

--
Time flies like the wind. Fruit flies like a banana.

| |0| | Jobst Schmalenbach, jobst@barrett.com.au, General Manager
| | |0| Barrett Consulting Group P/L & The Meditation Room P/L
|0|0|0| +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 09:30 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org