Process, PID and total memory consumed on AIX.


 
Thread Tools Search this Thread
Operating Systems AIX Process, PID and total memory consumed on AIX.
# 1  
Old 01-29-2015
Process, PID and total memory consumed on AIX.

Hi,

Below is the code snippet I use on Linux (Centos) to retrieve the Process Name, PID and memory consumed on Linux (Centos) host:-

Code:
top -b -n 1 | awk -v date="$tdydate" -v ip="$ip" 'NR>7 {print date","ip","$12,","$1,","$10}'

Any idea how the same can be retrieved on an AIX host? This doesn't seem to work on AIX.

Please provide the pointers available (if any).

Thanks.
Moderator's Comments:
Mod Comment Please use CODE tags when showing sample input, sample output, and sample code segments.

Last edited by Don Cragun; 01-29-2015 at 02:49 AM.. Reason: Add CODE tags.
# 2  
Old 01-29-2015
Quote:
Originally Posted by Vipin Batra
Code:
top -b -n 1 | awk -v date="$tdydate" -v ip="$ip" 'NR>7 {print date","ip","$12,","$1,","$10}'

Any idea how the same can be retrieved on an AIX host? This doesn't seem to work on AIX.
This won't work mainly because of the absence of the "top" program in AIX.

I suggest using the ps command instead which - depending on options chosen - can offer BSD-like as well as SystemV-like functionality in AIX.

A possible start might look like:

Code:
ps -Alo pid,args,vsz

which displays the PID, the complete command to invoke the process and the virtual memory allocated (notice that the units are memory pages, not bytes).

You will perhaps find other (and more detailed) useful information going over the man page of ps and there the chapter about arguments to the -o option.

I hope this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Logging the memory consumed by a process with c/C++ without using proc

I need to log the size of physical/virtual memory consumed by any given given process using c/c++ code running on solaris and aix without using the proc filesystem. Please advise. (1 Reply)
Discussion started by: Manisha Paul
1 Replies

2. AIX

How much total and free memory I have in my aix 5.3 server?

good morning, how I can know how much total and free memory I have in my AIX 5.3 server, and this is shown in megabytes or gigabytes? Thank you very much. (4 Replies)
Discussion started by: systemoper
4 Replies

3. Shell Programming and Scripting

How can I obtain the consumed memory of a process?

Hi!!! how can I obtain the consumed memory of a process? nowadays i'm using ps -efo pid, pmem, comm,args .... but the information is in percentage, is that correct? so, i want to know how can obtain the consumed memory of a process in mb? thanks in advance! Richard (3 Replies)
Discussion started by: rcrutz_18
3 Replies

4. UNIX for Dummies Questions & Answers

determine total memory used by some user/process

HI guys, :confused:i would like to know how can i determine the total/approx memory used by a single user. Example Top output is below =========================================================================== top - 20:00:50 up 24 days, 2:48, 2 users, load average: 0.43, 0.40, 0.37... (3 Replies)
Discussion started by: cromohawk
3 Replies

5. AIX

AIX: PID 0 Process

Hi All, I searched other threads and could not find any relevant post about this. I searched for process 0 in SUN OS and could find the sched/swapper process listed. root 0 0 0 Apr 25 ? 0:06 sched but i couldnt not find the swapper process (PID 0) in AIX. Is that... (4 Replies)
Discussion started by: quintet
4 Replies

6. HP-UX

Order process by consumed memory

Hi! I am new to HP-UX. :o By using the command glance, I found the user memory usage was very high. I would like to know is there any command can show the process which consume most available memory ? (Just like the command top, but order by memory, not CPU) (1 Reply)
Discussion started by: alfredo
1 Replies

7. AIX

How to check free/total Memory in AIX

Friends , i have a question how to check the total memomry and free memory in AIX, We have vmstat ,svmon and topas commands.Which command among the will give the true figure. (6 Replies)
Discussion started by: vimalbhan
6 Replies

8. UNIX for Dummies Questions & Answers

how can i get The total size of the process in virtual memory om GB or MB

Hello all im using the ps -ef "args vsz" | some.exe but the result is in kb , is there some kind of way or flag ( didnt found in the ps man ) to convert me this data to GB or MG in human readable format ? Thanks (1 Reply)
Discussion started by: umen
1 Replies

9. UNIX for Advanced & Expert Users

the amount of memory consumed per user

Hi, under UNIX AIX how determine the amount of memory consumed per user ? Many thanks before. (1 Reply)
Discussion started by: big123456
1 Replies

10. Solaris

1. To know the Memory consumed by a process at a time

hello I am new to the UNIX I want to know what command is used 1.To know the Memory consumed by a process at a time . 2.To know the How many CPU's in a server. 3.To know the RAM size. 4.To know the Hard Disk size. (3 Replies)
Discussion started by: maheshkoushik
3 Replies
Login or Register to Ask a Question