The UNIX and Linux Forums  
Hello and Welcome from to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Capturing the Process ID of a process appleforme1415 UNIX for Dummies Questions & Answers 8 05-17-2007 04:37 AM
Sun boxes topcat8 UNIX for Dummies Questions & Answers 3 07-06-2004 11:45 AM
capturing process id bvreddy Shell Programming and Scripting 1 09-16-2002 05:08 PM
HP-UX boxes - am I mad? Menace HP-UX 3 06-23-2002 04:06 PM
text boxes, radio buttons , check boxes in c++ on unix devy8 High Level Programming 3 07-07-2001 06:58 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-31-2009
ak835 ak835 is offline
Registered User
  
 

Join Date: Apr 2008
Location: Mumbai,India
Posts: 69
Arrow Capturing Process on AIX boxes - IMP

Guys

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.

e.g

PID PPID UID USER COMMAND
139412 118932 0 root /usr/sbin/inetd

Complexities:
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.

Regards
Abhi

Last edited by ak835; 08-31-2009 at 07:55 AM..
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:28 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0