Visit Our UNIX and Linux User Community

Memory Utilisation of httpd process

Thread Tools Search this Thread
Operating Systems Linux Red Hat Memory Utilisation of httpd process
# 1  
Old 10-27-2011
Memory Utilisation of httpd process

Hi All,

I have a RHEL 5.4 server which runs an Apache web server(2.2.23 compiled with prefork MPM).I want to find out the memory utilised by the web server.

# ps -ylC httpd | wc -l
# ps -ylC httpd | more
S    48   376  1074  0  75   0  4640  45817 -      ?        00:00:00 httpd

My understanding is that RSS is the amount of real memory used by a process.So am adding the RSS column to arrive at total memory used by all httpd processes.

# ps -ylC httpd |awk '{print $8}' | awk '{sum = sum + $1;} END{print sum}'
# free -m
             total       used       free     shared    buffers     cached
Mem:          1883       1677        205          0        158        990
-/+ buffers/cache:        528       1355
Swap:         4095          0       4095

So the total memory used by my web server is 1190456Kb or 1.19GB. But from "free -m" command i am getting around 1gb cached and 1.6gb used while as the total RAM is just 2GB.

Can someone point where i am wrong? Is this the right way to calculate memory utilised by a webserver?
Any other better methods?


---------- Post updated at 12:32 PM ---------- Previous update was at 12:18 PM ----------

Forgot to add this:

Output of top:

 376 apache    15   0  178m 4784 2076 S  0.0  0.2   0:00.11 httpd
  378 apache    15   0  178m 5436 2160 S  0.0  0.3   0:00.13 httpd
  426 apache    15   0  178m 5448 2136 S  0.0  0.3   0:00.11 httpd

The top command shows something like VIRT using 178m. The documentation says VIRT = RES + Swap

SO each "httpd" process is using 178mb?? swap usage shows zero(as can be seen in "free -m) command.



Previous Thread | Next Thread
Test Your Knowledge in Computers #736
Difficulty: Medium
In 1982, Commodore introduced the Commodore 64 as the successor to the VIC-20.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Memory Utilisation of a server

Hi, I need to find the memory utilisation of a server as mentioned below. Memory should be divided into TOTAL, UZDM, BUFFER, CACHE, AVAILABLE. Can anyone help me to get this? (10 Replies)
Discussion started by: Arasu
10 Replies

2. Linux

HTTPD process user to access NIS

Hi, I have a machine A with a web server apache2 running. By default, apache2 user is wwwrun. Problem is that this user is local. Instead, I would like apache2 user to be able to login via NIS server so it can access NFS resources of two NIS different groups, let's say group1..groupN... (2 Replies)
Discussion started by: asanchez
2 Replies

3. Linux

Reason/components behind high memory utilisation on linux

Hi friends, Problem: High memory utilisation of one linux server, due to which a database crashed on the server. My question to all: How does glance calculate that memory utilisation on the linux server is 98%. I mean what components are part of (31.4gb-599mb)? How can i check that myself? Can... (3 Replies)
Discussion started by: kunwar
3 Replies

4. AIX

THCOUNT (THCNT) higher than ThreadLimit for httpd process?

One issue I could see on AIX 5.3: At one of my customer they have got the ThreadLimit of 2500 set on web server in httpd.conf file. Currently 2000 users have logged in each attaing a single instance of httpd. While in ps -ef for httpd process it is showing thread count (thcount) almost 3000.... (3 Replies)
Discussion started by: aarora_98
3 Replies

5. AIX

CPU and memory utilisation by one process

Hi, We need to monitor one process over time to see at which exact point it starts to consume to much memory and CPU (to correlate this with some other events). I am a newbie in AIX, so please could you tell me which command will give a snapshot of the current state of a process so that I... (1 Reply)
Discussion started by: yallow
1 Replies

6. UNIX for Dummies Questions & Answers

cant start httpd process

httpd status is stopped.cant start it again by : /etc/init.d/httpd restart or /etc/init.d/httpd/start help needed (2 Replies)
Discussion started by: raksha.s
2 Replies

7. Shell Programming and Scripting

Start a new process when memory/cpu utilisation falls

Hi all, I am a newbie to whole shell scripting thing. I deal with computational studies and a lot of softwares which run on linux. At times, I have to schedule my jobs after some process has started. In these case, I have to use at command to schedule my job. However, I would like to know if... (0 Replies)
Discussion started by: johnsmithgr8
0 Replies

8. UNIX for Dummies Questions & Answers

Script for CPU and Memory Utilisation

Hi, I want to check the CPU and Memory Utilisation in the whole machine (not for a single process). Can someone send me a ready made script which captures all information in a log every 5min?? Thanks, Ajith (0 Replies)
Discussion started by: Ajith Praveen
0 Replies

9. UNIX for Dummies Questions & Answers

How to check process/cpu utilisation thru unix shell scripting

Dear Champs, Can anybody help me out to write a shell script , which will check whether the process is running , if running then divide the process into 2 so that next var it can take process parallel . Let ps -ef | grep => shows running note will take a process of next... (0 Replies)
Discussion started by: manas_ranjan
0 Replies

10. UNIX for Advanced & Expert Users

How to check Process Utilisation

Hi, Is there any way in Unix to check for the system usage processwise ?? I mean I wud like to get a listing of running processes along with their CPU / memory utilisation so that I can spot dangerous the space / memory eaters .. Thanks & regards, SNS (2 Replies)
Discussion started by: Sabari Nath S
2 Replies

Featured Tech Videos