Show running process command > 60 chars


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Show running process command > 60 chars
# 8  
Old 04-22-2013
From ps - HP-UX
Code:
           -f             Show columns user, pid, ppid, cpu, stime, tty,
                          time, and args, in that order.

...

           args           The command line given when the process was
                          created.  This column should be the last one
                          specified, if it is desired.  Only a subset of the
                          command line is saved by the kernel; as much of
                          the command line will be displayed as is
                          available.  The output in this column may contain
                          spaces.  The default heading for this column is
                          COMMAND if -o is specified and CMD otherwise.

Regards,
Alister
# 9  
Old 04-22-2013
In HP-UX, you can try -x option to show command line in extended format.
Code:
ps -efx

As Alister mentioned above, you can display args alone using -o option:
Code:
UNIX95=1 ps -ae -o args

Make sure you set UNIX95 variable to use the XPG4 environment instead of the HP-UX environment.

Pipe the O/P to sort command to get sorted args result.
# 10  
Old 04-22-2013
Quote:
Originally Posted by alister
From ps - HP-UX
Code:
           -f             Show columns user, pid, ppid, cpu, stime, tty,
                          time, and args, in that order.

...

           args           The command line given when the process was
                          created.  This column should be the last one
                          specified, if it is desired.  Only a subset of the
                          command line is saved by the kernel; as much of
                          the command line will be displayed as is
                          available.  The output in this column may contain
                          spaces.  The default heading for this column is
                          COMMAND if -o is specified and CMD otherwise.

Regards,
Alister
Thanks but I still can't find which option to use Smilie

---------- Post updated at 01:28 PM ---------- Previous update was at 01:27 PM ----------

Quote:
Originally Posted by Yoda
In HP-UX, you can try -x option to show command line in extended format.
Code:
ps -efx

As Alister mentioned above, you can display args alone using -o option:
Code:
UNIX95=1 ps -ae -o args

Make sure you set UNIX95 variable to use the XPG4 environment instead of the HP-UX environment.

Pipe the O/P to sort command to get sorted args result.
Thanks..

but..

Code:
$ ps -efx|grep ICP|grep -v grep
ps: illegal option -- x

Smilie
# 11  
Old 04-22-2013
I do have it:
Code:
$ ps -efx | grep tivoli
    root  4605  4603  0  Mar 14  ?        450:44 /opt/tivoli/ep/_jvm/bin/PA_RISC2.0/tca -Xmx384m -Xminf0.01 -Xmaxf0.4 -Djava.net.preferIPv4Stack

OS version:
Code:
$ uname -s -r -v -m
HP-UX B.11.23 U 9000/800

ps version:
Code:
$ what /usr/bin/ps
/usr/bin/ps:
        $Revision: 92453-07 linker linker crt0.o B.11.16.01 030415 $
         ps.c $Date: 2005/05/30 03:42:36 $Revision: r11.23/4 PATCH_11.23 (PHCO_32475)
         $Revision: @(#) ps R11.23_BL2005_0530_2 PATCH_11.23 PHCO_32475

What version are you using? Also check your man pages.

---------- Post updated at 01:19 ---------- Previous update was at 01:13 ----------

Never mind, I did some research and discovered that -x option is only available starting with HP-UX 11.11
# 12  
Old 04-22-2013
Thanks yoda..

As expected, mine is lower..

Code:
$ uname -s -r -v -m
HP-UX B.11.00 U 9000/800

Code:
$ what /usr/bin/ps
/usr/bin/ps:
         ps.c  $Revision: 82.1.1.2 $ $Date: 99/04/29 00:13:07 $
         PATCH_11_00: ps.o 99/04/29

So, is there any other options for me? Smilie

---------- Post updated 04-23-13 at 09:22 AM ---------- Previous update was 04-22-13 at 02:33 PM ----------

Ermm.. Isn't there a solution for this? Smilie

Thank you.
# 13  
Old 04-22-2013
From https://www.unix.com/unix-dummies-que...om-forums.html
Quote:
(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post or send a private message where your goal is to get an answer more quickly.
If you cannot extract the information that you need from ps because the kernel does not provide it, then it's time to reconsider the approach.

It may be possible to restrict matches based on uid, gid, or some other attribute, but you have neglected to describe the situation.

Regards,
Alister
# 14  
Old 04-23-2013
Try
Code:
UNIX95=1 ps -eo pid,user,time,args

For filtering, pipe this to awk,
for example to
Code:
awk '$2=="oracle9" && /[I]CP/'


Last edited by MadeInGermany; 04-23-2013 at 01:57 AM..
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