Load spike

 
Thread Tools Search this Thread
Homework and Emergencies Emergency UNIX and Linux Support Load spike
# 1  
Old 09-16-2014
RedHat Load spike

Hi,

I would try to find out the load spike of memory utilization in the Servers before 2-3 hours ago., As the alerts are being triggering out by the altering system. I try to find out the utilization via the sar command, but how come I know which user and command is consuming more of memory utilization by the time.
# 2  
Old 09-17-2014
i guess `prstat` can give your result
# 3  
Old 09-17-2014
Hi,

If the server is not actually under load, you will find it difficult to determine what user was working and what command that they were using. Trying to find what was happening "2-3 hours ago." will be better accomplished by looking at the "alerting system" logs.

Regards

Dave
# 4  
Old 09-18-2014
Hi Kg_gaurav,
Thanks for your update. its a RHEL machine.

Hi Dave,
The alerting system just triggers the alert that memory is high and its doens't have the capability to fetch which user it is.

Can this be done using a shell script when memory and cpu increases using top and free commands ?

-Siva
# 5  
Old 09-18-2014
Hi,

Yes, there are several options for this. It does to some extent depend on what the monitoring software does, but you can use something like this.

Code:
!#/bin/bash
######################################################################################
#
# Memory use for Centos per user.
#
######################################################################################
(echo "user rss(KiB) vmem(KiB)";
 for user in $(users | tr ' ' '\n' | sort -u); do
   echo $user $(ps -U $user --no-headers -o rss,vsz \
     | awk '{rss+=$1; vmem+=$2} END{print rss" "vmem}')
 done | sort -k3
) | column -t

Regards

Dave
# 6  
Old 09-22-2014
Hi Dave,

Thanks for your update..
Later I am thinking like if the ram utilization is less than 300M and the load average is more then 4.00 , should take all the top users of memory and CPU utilization through "top" and "ps " command and put under one path.

-Siva
# 7  
Old 09-22-2014
Moderator's Comments:
Mod Comment This user has started a new thread to continue the discussion of this issue: Top utilization of the users through script
Therefore, this thread is closed.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

VPS has load 200, httpd load no activity, netstat nothing

Hello, on my hostserver i see one VPS of mine got load of 200.00 and netstat nothing (not a single blank line on netstat command) after some time, netstat started showing connections, but i see no excessive IP connections. tail -f /var/log/httpd/access_log shows no activity /var/log/messages ;... (1 Reply)
Discussion started by: postcd
1 Replies

2. AIX

wsm does not load

Hi when I try to open wsm from the remote side I am not able to load wsm it gives me the error host cannot find the address xx.xx.xx.xx can anyone help? (0 Replies)
Discussion started by: antointoronto
0 Replies

3. Solaris

Solaris 10 - script creating huge spike in Kernel CPU

I'm running on Solaris 10, and I have a script that's running on several machines. Basically, what it's doing is: * tail -f | grep one or more log files into a temp file * Every minute or so, copy that temp file to a second temp and zero the first * Sed through the 2nd temp to pull out a user... (2 Replies)
Discussion started by: Rorgg
2 Replies

4. Solaris

How to check CPU spike between certain priod of time

Hi, Does anyone know how to check which process has been used the most CPU between certain time period? say I have noticed CPU spike happend between 1:00 to 1:30 now it is 3:00 o'clock already. Is there anyway to find out what process/PID use the most CPU then? Thanks a lot (3 Replies)
Discussion started by: uuontario
3 Replies

5. UNIX for Dummies Questions & Answers

Apache causing CPU to spike when POSTing

Hello all. I've built a SAMP server on Solaris 10 using Apache 2.2.9 and PHP 5.2.6 For the most part everything seems to be working except when I post form data, Apache causes the CPU to max out. Sometimes the script will complete about 40 seconds later. Other times I have to stop Apache to get... (4 Replies)
Discussion started by: RobertSubnet
4 Replies

6. UNIX for Dummies Questions & Answers

Please Help me in my load average

Hello AlL,.. I want from experts to help me as my load average is increased and i dont know where is the problem !! this is my top result : root@a4s # top top - 11:30:38 up 40 min, 1 user, load average: 3.06, 2.49, 4.66 Mem: 8168788k total, 2889596k used, 5279192k free, 47792k... (3 Replies)
Discussion started by: black-code
3 Replies

7. Solaris

Find any spike in CPU usage a hour ago

Folks, I need to find out from the system logs ( or elsewhere ) if the CPU utilization reached say 90% an hour ago from now. Is there a way out. (2 Replies)
Discussion started by: kavera
2 Replies

8. Shell Programming and Scripting

Need help in wrting Load Script for a Load-Resume type of load.

hi all need your help. I am wrting a script that will load data into the table. then on another load will append the data into the existing table. Regards Ankit (1 Reply)
Discussion started by: ankitgupta
1 Replies
Login or Register to Ask a Question