Capturing Process on AIX boxes - IMP

Thread Tools Search this Thread
Operating Systems AIX Capturing Process on AIX boxes - IMP
# 1  
Old 08-31-2009
CPU & Memory Capturing Process on AIX boxes - IMP


we all know what command 'COLUMNS=2047 /usr/bin/ps –eo pid,ppid,uid,user,args' does.It prints 5-column output for the running processes on a AIX box.

Here is simple thing i need:
I need to insert this tabular data in a db2 table.

How do i need?

I have created table with these five options of 'ps -eo' as five colmuns.I have a tool which generates CSV files based on my command/script logic and i use this CSV to load data into table.

Where am i stuck?

I am not sure of how to get this o/p into CSV.
I have created five namespaces to capture each of these five columns and i need to write a piece of code to capture data row by row.


139412 118932 0 root /usr/sbin/inetd

1.I can not throw this o/p into CSV using a static file.Everything has to be in shell variables.I need to echo values using whatever filters/pattern searches.

2.Every row needs to be captured uniquely.

In above example,i first need to capture '139412' uniquely and get the corresponding row for it and then using 'awk' i can get rest 4 columns.

I have tried to explain as much as possible.Let me know if its inconsistent.

I need advice/help on this.


Last edited by ak835; 08-31-2009 at 08:55 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Setup 1 Digi PortServer II with 5 x AIX boxes

Hi everyone, My latest challenge sees me assisting with the setup of one of our classroom labs. We are trying to configure the lab so that the (5) IBM 9115-505 servers (all running AIX7.1) have their serial 0 ports connected to a Digi PortServer II, which is on the classroom LAN, along with the... (4 Replies)
Discussion started by: richardsantink
4 Replies

2. Shell Programming and Scripting

Capturing the return code from background process

Hi All, I was out not working on unix from quite sometime and came back recently. I would really appreciate a help on one of the issue I am facing.... I am trying to kick off the in PARALLEL for all the available codes. The script runs fine in parallel. Let say there are... (1 Reply)
Discussion started by: rkumar28
1 Replies

3. Shell Programming and Scripting

Capturing the killed process logs

I have two set of questions. 1) To skip killing some process automatically. 2) To kill other process and capture their log. I have set of process, some needs to be killed gracefully and others should be skipped. Listed are the process. adm 1522... (1 Reply)
Discussion started by: murali1687
1 Replies

4. Shell Programming and Scripting

Capturing PIDs of same process at different instances

Hi, I'm gonna launch a process from my 'C' code. I'm gonna launch it a few times. I would like to capture the PID of that process each time I launch. I have to copy the each PIDs into a 'C' variable and I have to kill all of them when I exit from the 'C' code. My requirement is int... (3 Replies)
Discussion started by: suryaemlinux
3 Replies

5. Shell Programming and Scripting

Capturing the CPU% used by a process

Hi, I just wonder I need to write a script where I can check if a particular process is consuming X amount of CPU. I was thinking of using the ps command but doesn't seems to work. Any ideas. Thanks. (2 Replies)
Discussion started by: arizah
2 Replies

6. Shell Programming and Scripting

Capturing running process name

i'm looking to have my script capture it's own process name while running. i'm going to use this in the output of the script to track which script produced which output file(s). when i run: ps -ef | grep processname i only get as results a ps -ef listing for the grep inside my... (6 Replies)
Discussion started by: danmauer
6 Replies

7. AIX

Daily checks for AIX business critical boxes.

Hi all, I will like to know what are all sanitary checks which should be done on daily basis on all business critical AIX boxes without fail. (7 Replies)
Discussion started by: deepm
7 Replies

8. UNIX for Dummies Questions & Answers

Capturing the Process ID of a process

hi Everybody I am trying to capture process id of a process which has been started through the execution of a shell script CLASSPATH=. CLASSPATH=${CLASSPATH}:sampleswing.jar java -cp ${CLASSPATH} Sample echo $! > above is the simple script file called When i... (8 Replies)
Discussion started by: appleforme1415
8 Replies

9. Shell Programming and Scripting

capturing process id

I am newbie to unix shells world. I am trying to capture a background process id into a file so that it can be killed later. this process is basically a java program running in background as: java TestApp & this returning process id immediately. So how can i redirect that pid into a file.... (1 Reply)
Discussion started by: bvreddy
1 Replies

10. Programming

text boxes, radio buttons , check boxes in c++ on unix

Hi ! Please tell me how to get radio buttons, text boxes , check boxes , option buttons , pull down menus in C++ on Unix. I think it would be done using curses.h ..but that's all i know. TIA, Devyani. (3 Replies)
Discussion started by: devy8
3 Replies
Login or Register to Ask a Question