LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Server Stats History (http://www.linuxquestions.org/questions/linux-server-73/server-stats-history-922194/)

thbaig 01-05-2012 07:03 AM

Server Stats History
 
Hi,
OS = Fedora Core, CentOs 5

I am in process to install some applications on my servers.
But before doing that i want to know the load of my current system.

I want to review the last 7-10 days stats for consumption of CPU,Memory,Network and disk IO.

Is there some built in stat mechanism exist or I have to install some software ?

If software, kindly recommend .

thank you

deep27ak 01-05-2012 07:43 AM

Code:

#top
(this will show you the running services with the amount of CPU and memory utilized)

press shift+m

it will show you services using maximum memory

press shift+p
it will show you services using maximum CPU

Code:

#vmstat
This will show you statistics of your CPU and memory

Code:

#free -m
this will show your RAM size and swap memory both free and used

or if you want to download additional tool then look for "collectl"

for network
Code:

#netstat -ntlp
for additional options
Code:

#man netstat
for HDD info
Code:

#df -h
#fdisk -l


thbaig 01-05-2012 07:49 AM

thank you deep27ak
but as I mentioned that I want to get stats over specific period.
How can I do so ?

deep27ak 01-05-2012 08:09 AM

well I don't think there is any such package or tool by default, you might have to download

here are few which I found might be helpful

http://www.thegeekstuff.com/2011/03/sar-examples/
http://www.thegeekstuff.com/2011/12/...itoring-tools/

thbaig 01-05-2012 10:09 AM

thank you deep27ak for this wonderful info

grim76 01-05-2012 01:31 PM

I think sar is part of the sysstat package in centos and fedora. I use that to keep history on the servers. Keep in mind that it will only keep history from when you install it and it will only keep 7 days by default if I recall correctly.

markseger 01-07-2012 07:36 AM

SAR saves a month's worth of data in a continuously rolling set of files with the day of the month in their name. Only problem is by default it only samples once every 10 minutes which is pretty useless. At least change it to a minute or even less.
-mark

thbaig 01-24-2012 05:27 AM

Analyze/Read muultiple sar files at once
 
Hi,
I have successfully configured sar. now I have stat files for over one week.

I found Ksar to read and display sar file, but the problem is ,it only read a single file.

Can I extract 1 week files once to have weekly analysis ?

Is there some tool that I can use to analyze multiple sar files at once to have over x time analysis?

deep27ak 01-24-2012 05:42 AM

I use vnstat for monitoring my box with respect to days and months but it will start monitoring from the day you install the package

follow these pages for more help
http://humdi.net/vnstat/
http://linux.softpedia.com/get/Syste...at-13934.shtml

thbaig 01-24-2012 05:50 AM

thank you Deepak.
But I have one week stats now with sar :( so for vnstat, i have to wait for one more week.

Can you please tell me how can I utilize my multiple sar files ?

deep27ak 01-24-2012 06:08 AM

I am not very sure how to extract a week analysis as I don't use this much

but you can use ksar which will give you a graphical sar graph of all the process and services running including the memory and cpu utilization

you can check this link if you can find anything helpful

http://www.cyberciti.biz/tips/identi...with-ksar.html

grim76 01-24-2012 08:13 AM

You can dump multiple files into one file.

Code:

LC_ALL=C sar -A > /tmp/sar.data.txt
You can specify files by using the -f option for sar.

Code:

LC_ALL=C sar -A -f /var/log/<sar files location>/<sar file name> >> /tmp/sar.data.txt
Then all you need to do is copy the file to where you can use ksar to create the graphs.

thbaig 01-24-2012 09:50 AM

thank you grim.


Quote:

Originally Posted by grim76 (Post 4583097)
You can dump multiple files into one file.

Code:

LC_ALL=C sar -A > /tmp/sar.data.txt
You can specify files by using the -f option for sar.

Code:

LC_ALL=C sar -A -f /var/log/<sar files location>/<sar file name> >> /tmp/sar.data.txt
Then all you need to do is copy the file to where you can use ksar to create the graphs.



All times are GMT -5. The time now is 06:21 AM.