Displaying VERY long process names with ps -ef


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Displaying VERY long process names with ps -ef
# 1  
Old 02-07-2006
Displaying VERY long process names with ps -ef

Hi,

I'm trying to display all process on an AIX server with the string SLRServer in them. Normally "ps -ef|grep SLRServer" would be sufficient, however in this instance the process name is enormous and the part which contains this string has been truncated, as you can see in the example below


Code:
 jxadmin  254056  499742   1   05 Feb      - 29:10 /usr/websphere5/waslive5/AppServer/java/bin/java -Djava.net.preferIPv4Stack=true -Dwas.status.socket=47863 -
Xbootclasspath/p:/usr/websphere5/waslive5/AppServer/java/jre/lib/ext/ibmorb.jar:/usr/websphere5/waslive5/AppServer/java/jre/lib/ext/ibmext.jar -classpath /usr/websphere5/waslive5/AppServer/properties:/usr/websphere5/waslive5/AppServer/properties:/usr/websphere5/waslive5/AppServer/lib/bootstrap.jar:/usr/websphere5/waslive5/AppServer/lib/j2ee.jar:/usr/websphere5/waslive5/AppServer/lib/lmproxy.jar:/usr/websphere5/waslive5/AppServer/lib/urlprotocols.jar:/usr/websphere5/waslive5/AppServer/lib/j2ee.jar:/usr/websphere5/waslive5/AppServer/lib/servlet.jar:/u01/app/oracle/product/9.2/jdbc/lib/classes12.zip:/u01/app/oracle/product/9.2/jdbc/lib/nls_charset12.jar:/u01/app/oracle/product/9.2/jdbc/lib/nls_charset12.zip -Xms256m -Xmx768m -Dws.ext.dirs=/usr/websphere5/waslive5/AppServer/java/lib:/usr/websphere5/waslive5/AppServer/classes:/usr/websphere5/waslive5/AppServer/classes:/usr/websphere5/waslive5/AppServer/lib:/usr/websphere5/waslive5/AppServer/lib/ext:/usr/websphere5/waslive5/AppServer/web/help:/usr/websphere5/waslive5/AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime -Dserver.root=/usr/websphere5/waslive5/AppServer -Ddb2j.system.home=/usr/websphere5/waslive5/AppServer/cloudscape -Duser.install.root=/usr/websphere5/waslive5/AppServer -Dcom.ibm.itp.location=/usr/websphere5/waslive5/AppServer/bin -Dwas.install.root=/usr/websphere5/waslive5/AppServer -Dibm.websphere.preload.classes=true -Dchordiant.security.connectionPoolFlag=true -Dchordiant.customobject.configuration=CustomObjectConfiguration -Dchordiant.service.socketGatewayServicePort=8507 -Dchordiant.ctiServices.vruSocketServerPort=8206 -Dcom.chordiant.instance=1 -DHotSpotOption=client -Detc=/usr/websphere5/waslive5/AppServer/installedApps/waslive5Network/slrapplication.ear/config -Dchordiant.administration.directory=/usr/websphere5/waslive5/AppServer/installedApps/waslive5Network/slrapplicatio

I've looked through the man pages for ps but can't find any way of increasing the amount of characters which are displayed.

Has anyone got any ideas how I could do this?

Gareth
# 2  
Old 02-07-2006
Does using ps -efx make any difference?

On our UNIX without the x it truncates to screen width, with x it uses full name, although I've never tried it with a process name that big!
# 3  
Old 02-07-2006
Try this.

Code:
ps -Ao pid,args -ww

If that doesnt work, then use
Code:
ps auxww

# 4  
Old 02-07-2006
Thanks for your suggestions but sadly none of these have worked. I get syntax errors on two of them. "ps auxww" does run but still truncates the output.

I guess the syntax issue's down to the O/S version or shell. I'm on AIX 5.2, & ksh.

Code:
# ps -efx|grep SLRS
ps: illegal option -- x
Usage: ps [-ANaedfklmM] [-n namelist] [-F Format] [-o specifier[=header],...]
                [-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] [-c classlist]
Usage: ps [aceglnsuvwxU] [t tty] [ProcessNumber]

Code:
# ps -Ao pid,args -ww
ps: illegal option -- w
ps: illegal option -- w
Usage: ps [-ANaedfklmM] [-n namelist] [-F Format] [-o specifier[=header],...]
                [-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] [-c classlist]
Usage: ps [aceglnsuvwxU] [t tty] [ProcessNumber]

I looked into the -ww switch which wasn't recognised but found eww instead so I tried "ps gewws" but yet again it truncated the long commands.

Looks like this might not actually be doable but I'm still open to other suggestions.

Gareth
# 5  
Old 02-07-2006
The online AIX manual pages says

Code:
The following options are not preceded by a - (minus sign):

w 	 Specifies a wide-column format for output (132 columns rather than 80). 
If repeated, (for example, ww), uses arbitrarily wide output. 
This information is used to decide how much of long commands to print.

# 6  
Old 02-07-2006
Another thought. If you have a /proc system, parse the contents of /proc/<pid>/cmdline into a more meaningful statement.

The contents of /proc/<pid>/cmdline look like a single line with no space between the arguments. They are separated by a NUL.

See Listing 7.3 of The /proc File System
# 7  
Old 02-07-2006
Well neither ww not -ww work with args on my server. Having said that, I'm using putty and the text is being being wrapped around anyway so maybe the 80/132 column isn't relevant here. Even using eww though it doesn't display all the command so it looks like there is a limit despite the manual's comments.

Gareth
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. SCO

Long file names within shell script

I am downloading a zip file that contain files that are very long. I am trying to process them, but cannot. I can move the files from one directory to another at the shell prompt, but not within a shell script, I get a stat error. The files look somewhat like this; ... (5 Replies)
Discussion started by: trolley
5 Replies

2. Web Development

Too long in displaying the data in a Web Browser

this is my another one question as well as my sample program. Because of the big data the gets from the database.,it takes time to display the output in a web browser.,is there any way to display the output as faster as it can..?my time is wasting because of too long to display.:confused: ... (3 Replies)
Discussion started by: Jeneca
3 Replies

3. UNIX for Advanced & Expert Users

script regarding listing long group names

Hello, When listing the file systems (using ls -ltr) , if the group names are longer the group name is getting truncated. Can someone help with the script which would display the truncated group name? I appreciate if someone could help in this regard. (1 Reply)
Discussion started by: mike12
1 Replies

4. Shell Programming and Scripting

need help with displaying only names using ls -l

Hi I am kind of stuck I need help with printing only the names of the folder in the format LAST NAME, F so last name and the first character of first name using ls -l command in the /home directory currently they are in the format firstname.lastname please advice (4 Replies)
Discussion started by: classic
4 Replies

5. Shell Programming and Scripting

Find and rename long file names (html)

Hi Guys, I need a help. I have 1130 zip files. Each one of them has files including 1 html file with long file name (includes special charactors, Alphabetic and numbers). I have copied all 1130 zip files to my linux system and extracted using below command. Find . -name "*.zip" -exec... (7 Replies)
Discussion started by: Rajmani
7 Replies

6. Shell Programming and Scripting

ps -ef does not displaying the running process

Hi, I am using the monitor shell script to check the particular process is running or not.If it is not running this monitor shell script will automatically start the process.I am using the ps -ef command to check the process availablity.But the problem is some times the ps -ef | grep "Process... (8 Replies)
Discussion started by: sureshbabuc
8 Replies

7. Solaris

mkisofs and long file names

Well im using mkisofs to create iso images in Solaris 10 and then i use cdrw -i to burn the images to the cd the problem which i noticed recent ( im new to mkisofs) i noticed its break the long file names making them shorter i searched in its help and i find two parameters one -l and one... (2 Replies)
Discussion started by: XP_2600
2 Replies

8. UNIX for Dummies Questions & Answers

Displaying file names before a particular creation date

Hi!! I wanna display file names which are created before/after a particular date. I wud be glad if anybody can help me out in that. Thanx Dhruv (1 Reply)
Discussion started by: dhruv_saksena
1 Replies

9. Windows & DOS: Issues & Discussions

Dos window, long file names prob

At the dos command prompt, does anyone remember how to make it recognize long file names? ie, windows long file names for folders, my documents, if i'm at the :> prompt and want to change to that directory, how do i make it skip the space? I've tried cd "my document" cd my\documents cd 'my... (4 Replies)
Discussion started by: kymberm
4 Replies

10. UNIX for Dummies Questions & Answers

linux question, pardon, on long file names

Sorry, hope no one minds the linux question here, I use both unix and linux, and have come across a problem. On my linux box i have a dual boot, and i've set it up so i can access my windows data partition while in linux mode (mount the vfat partition), but linux doesn't recognize long file names,... (2 Replies)
Discussion started by: kymberm
2 Replies
Login or Register to Ask a Question