Show running process command > 60 chars


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Show running process command > 60 chars
# 1  
Old 04-20-2013
Hammer & Screwdriver Show running process command > 60 chars

Hi.

I use this command to get list of running process:
Code:
ps -ef|grep ICP|grep -v grep

But how do I set the terminal to show full command? It seems that it always truncated to 60 chars no matter what options I put.

e.g output
Code:
oracle9 25011 24998  0 03:00:05 ?         0:00 /usr/bin/sh /bistari/dw/iodds1/oradata/load/ICP/load_incr_ic

whereby there are several other load_incr_ic inside that directory which might belong to someone else's script.

Thank you.
# 2  
Old 04-20-2013
Does it show all processes truncated? Or does it just truncate processes that belong to someone else? Does it always truncate your processes?
# 3  
Old 04-20-2013
What OS are you on, what shell (bash, zsh, ksh...etc.)?

That behavior can be system specific - truncating command lines in ps.
# 4  
Old 04-21-2013
Did you try ps | less to check the length of lines then? Did you try COLUMNS=600 ps?
# 5  
Old 04-21-2013
This does not solve your problem, but removes one grep
Code:
ps -ef | grep [I]CP

should give the same as
Code:
ps -ef | grep ICP | grep -v grep

# 6  
Old 04-21-2013
Should be quoted, to avoid a match in the current work directory (in this case only saves some I/O operations)
Code:
ps -ef | grep '[I]CP'

Most efficient is pgrep.
The limited length of shown arguments is OS-specific.
# 7  
Old 04-22-2013
Thanks all for your response.

But it seems there is no proven solution yet. Smilie

OK, I am telnetting to HP-UX s34klj69 B.11.00 U 9000/800 (th)

It is using sh mode I think.

So, the problem is I want to kill my job if it hangs and runs for a very long time. So, the part of the job command is ICP. So, here is what happens as in the screenshot attached..

Image

Actually the 60 chars thing I found out after been googling about this issue Smilie

Please help.

Thanks.

---------- Post updated at 11:56 AM ---------- Previous update was at 11:56 AM ----------

By the way, how do I sort the grep command to sort the last column i.e. the running command?

Thank you.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check if process is running if not then use command

Hello, Could someone do the following bash ubuntu script for me? I have 5 screen processes of bot: SCREEN -dmS Xbot_instance_1 php core.php -i 1 SCREEN -dmS Xbot_instance_2 php core.php -i 2 SCREEN -dmS Xbot_instance_3 php core.php -i 3 SCREEN -dmS Xbot_instance_4 php core.php -i 4 ... (2 Replies)
Discussion started by: kotch
2 Replies

2. Shell Programming and Scripting

Command to get exact tomcat process I am running ignoring other java process

Team, I have multiple batchjobs running in VM, if I do ps -ef |grep java or tomcat I am getting multiple process list. How do I get my exact tomcat process running and that is unique? via shell script? (4 Replies)
Discussion started by: Ghanshyam Ratho
4 Replies

3. Shell Programming and Scripting

Need generic command to get complete running process details

I am on SunOS and Linux I need generic command to get complete process details from which i will eventually extract socket details (listen address and port) ps -ef | ggrep -i server | ggrep -i mydomaindoes not yield a process that should have both the grep entries along with the listen... (8 Replies)
Discussion started by: mohtashims
8 Replies

4. Shell Programming and Scripting

Command to know all the Current running process and how to kill

All, 1.What is the unix comand used for all current running process (Including All current running processes Parent ->child->subchild process) 2.If child and subchild processes are running then what is the unix command to kill parent and its all child subchild processes in UNIX. Kindly... (7 Replies)
Discussion started by: skp
7 Replies

5. Shell Programming and Scripting

command to see process running at background

Hi , I want to see all the background process that are running in unix box machine...please guide me is there any specific command for that..since I am executing some scripts at background..!!:confused: (1 Reply)
Discussion started by: nks342
1 Replies

6. Shell Programming and Scripting

Running a command in a new process?

Hello I'm using GNU screen for an application that I'm making. I will try to explain: This application opens 2 screen session, A and B. Screen session A has a script running in teh first window. I want to be able to switch from screen session A to screen session B, from the script running in... (1 Reply)
Discussion started by: jondecker76
1 Replies

7. Shell Programming and Scripting

Grep command to show only process name

Can I modify the grep command to show only a process name? Currently I run ps -efa | grep chk_web to get the following: mousr 3395 1 0 09:36:06 pts/10 0:00 sh /var/opt/scripts/chk_web.sh Can this be changed in any way to get only: /var/opt/scripts/chk_web.sh or chk_web.sh. I... (3 Replies)
Discussion started by: runnerpaul
3 Replies

8. UNIX for Dummies Questions & Answers

Command to check if a particular process is running

Hi What is the best command to check if a particular process is running in a linux server or not To check any java process, I use the below command. ps -ef |grep jvm When I execute the above command, it lists me all the processess . The above command should ideally return only the... (6 Replies)
Discussion started by: vr3w3c9
6 Replies

9. SuSE

Which command can be used to show running services?

Hi Dear Guys: I want to get a list of running services. Is there any command having this functionality? (3 Replies)
Discussion started by: crest.boy
3 Replies

10. Shell Programming and Scripting

How to show progress bar for a running process

Hi, I have 2 shell scripts ,one for taking hot backup of oracle Database while other is for progress bar. But I don't have an idea hoe should I incorporate the shell script of progress bar in my hot backup code . Please help. My shell script for hot backup is as below: ... (0 Replies)
Discussion started by: dwiravi
0 Replies
Login or Register to Ask a Question