How to find the actual process name


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to find the actual process name
# 1  
Old 12-09-2008
How to find the actual process name

Dear All
I have created customisation appliaction for my application process which look likes below,
364688 ach_outbound -proc nla_acho_equ_01 -format EQUENS0001 [fat] DEQ WAIT
1167452 listener -p 42662 hostget_server -proc at_vld 11874 at_vld [fat] IDLE
1560634 listener -p 11870 menu [fat] IDLE
1843302 rate_server [fat] DEQ WAIT

so now my concern is how can i fetch middle column between process id and [fat] i.e.
my o/p shuould look like
ach_outbound -proc nla_acho_equ_01 -format EQUENS0001
listener -p 42662 hostget_server -proc at_vld 11874 at_vld
listener -p 11870 menu
rate_server
# 2  
Old 12-09-2008
One way:
Code:
root@isau02:/data/tmp/testfeld> cat bla
364688 ach_outbound -proc nla_acho_equ_01 -format EQUENS0001 [fat] DEQ WAIT
1167452 listener -p 42662 hostget_server -proc at_vld 11874 at_vld [fat] IDLE
1560634 listener -p 11870 menu [fat] IDLE
1843302 rate_server [fat] DEQ WAIT
root@isau02:/data/tmp/testfeld> sed 's/^[0-9]* \([^\[]*\).*/\1/' bla
ach_outbound -proc nla_acho_equ_01 -format EQUENS0001
listener -p 42662 hostget_server -proc at_vld 11874 at_vld
listener -p 11870 menu
rate_server

# 3  
Old 12-09-2008
thank you so much.....it's working...fine..but can we right the same in awk...
# 4  
Old 12-09-2008
I bet you can.
# 5  
Old 12-09-2008
thank you so much for your support...i did it
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How can I check actual memory usage each Process?

I can't check actual memory usage in the Redhat 5.5... The used memory is 14214 Mb of Total 15919 by Free -m command. I sum the RSS value on PS aux command result and the value is 5428.66Mb. Yes It's quite different actual usage memory and RSS value. So I added Shared memory value... (5 Replies)
Discussion started by: tom8254
5 Replies

2. Programming

Find parent process (not process ID)

Hi: I have a program written in FORTRAN running on AIX platform. It is because missing of documentation and without root password, therefore we want to modify the program so that we can find out which script/program that call this FORTRAN program. I have google for few days, all of them are... (3 Replies)
Discussion started by: cstsang
3 Replies

3. AIX

Problem with nmon, actual CPU usage per process

Hi all, I am currently having trouble to get nmon to print me the actual CPU usage for an interval for a process. According to the manual, something like # time nmon -t -C cron -s 5 -c 2 -F outfile real 0m0.98s user 0m0.03s sys 0m0.04s should print out at least the process... (15 Replies)
Discussion started by: zaxxon
15 Replies

4. Solaris

Cant find Unix process with ps -ef

Hi All, Heres a little background. We have essbase installed on a solaris server. We are running a report script. The script starts and runs ok.. 1. after some time if i do the ps -ef i can see the process, and it generally completes successfully. 2. Most of the times, when i do the ps with... (2 Replies)
Discussion started by: noufalshaw
2 Replies

5. UNIX for Dummies Questions & Answers

Process Killed : Need to find why ?

Hi reader, I'm making a tool out of korn shell script that is running on a HP-UX server. But everytime i invoke the tool, it gets killed after a while (mid-process). I have tried re-running it a couple of times but each invocation ending up the same way .. following is a snippet of the o/p... (8 Replies)
Discussion started by: clakkad
8 Replies

6. Programming

How to find if a process a daemon ?

I have a scenario where I need to find if a process is a daemon process or not. This check needs to be done from within the process. I know there are no direct API's to do so. I have explored these options. 1. ctermid() - this can be unsuccessful as per the man pages 2. int devtty; if ((devtty... (7 Replies)
Discussion started by: vino
7 Replies

7. UNIX for Dummies Questions & Answers

how to find which process is stopped

One of my linux machines has a 'stopped' process which i need to find. How do i find the process that is iin 'stopped' mode. I am running red hat linux enterprise. Frank I have now answered this myself with the following command: ps -e j |grep Z (2 Replies)
Discussion started by: frankkahle
2 Replies

8. UNIX for Dummies Questions & Answers

find a process age

I can write a script to use ps and interigate the output, but is there a command that works similar to the find command for files where I can request a list of all the running processes over 1 day old ? thanks! (8 Replies)
Discussion started by: MizzGail
8 Replies

9. Shell Programming and Scripting

how to find the chid process id from given parent process id

how to find the chid process id from given parent process id.... (the chid process doesnot have sub processes inturn) (3 Replies)
Discussion started by: guhas
3 Replies

10. Shell Programming and Scripting

find eof, then process

Newbie question. I want to create a shell script that will only move/copy a file if it's determined that the eof string exists. This is to control files being uploaded via FTP. I don't want to move incomplete files, so my only thought is to check for eof, or compare file size every 15-30 seconds on... (12 Replies)
Discussion started by: mfilby
12 Replies
Login or Register to Ask a Question