`ps` command truncating text

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers `ps` command truncating text
# 1  
Old 09-27-2002
`ps` command truncating text

I have some processes that show a long file path as part of the process name and the process name gets truncated off.

Does anyone know how to get the full output from the `ps`command so that I can see the whole process name?
# 2  
Old 09-27-2002
It might not matter but what OS?

Try first setting your term window to wrap and possibly 132 characters. If none of this works - you could send the output to a file and vi it (if your really wanting to see the output).
# 3  
Old 09-27-2002
The OS is HP-UX 11.0.

I've tried sending the output to a file and it still gets truncated. I've noticed in the man page that there is a -o option that will allow me to specify certain columns but it only works with XPG4. I don't know what XPG4 is or how I use it.
# 4  
Old 09-27-2002
I jumped on a HP server and saw the same problem. I set my TERM to vt100 and then the line wrapped.

sh or ksh

$ export TERM=vt100
$ TERM=vt100; export TERM

setenv TERM vt100
# 5  
Old 09-27-2002
How long is the pathname?
Only a subset of the command line is saved by the kernel; as much of the command line will be displayed as is available.
As for XPG4...
Refer to the UNIX95 variable under EXTERNAL INFLUENCES for addition information on XPG4 behavior.
UNIX95 specifies to use the XPG4 behavior for the command.
# 6  
Old 09-27-2002
The command line is apparently longer than 40 characters. I can't see just how long the command line is because it is running from a large batch in the middle of the night and I don't know exactly the commands that are being called. (That's what I'm trying to find out).

Thank you for your reply. I guess I'll have to figure out another way.
# 7  
Old 09-27-2002
Originally posted by keelba
The command line is apparently longer than 40 characters.
If you are only getting 40 characters, something else is wrong. I am getting 60 characters. I actually expected a few more characters. /usr/include/sys/pstat.h sets PST_CLEN at 64. I assume that includes a terminating null, so I should be able to see 63 characters. I don't know where my other 3 characters went. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sendmail command truncating to list

Hey Folks - I'm trying to pass a list of To address using sendmail command but upon executing the script the to list gets truncated and not able to send the last sender : -bash-4.3$ ./akt.sh Date : 03-JUL-18 aaaaa.sss#bgttecre.bom trcikant.shrivas#bgttecre.bom abc#xyz.bom pqr#lmn.bom lion... (0 Replies)
Discussion started by: vyomdev
0 Replies

2. Solaris

How to avoid truncating in ps output ?

Hello, This is Solaris 10 (x86) bash-3.2# cat /etc/release Solaris 10 5/09 s10x_u7wos_08 X86 Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 30 March... (5 Replies)
Discussion started by: solaris_1977
5 Replies

3. UNIX for Dummies Questions & Answers

awk truncating first field output?

Hello, I'm writing an Awk script to take a command line argument (student's name) and output their relevant student#, name, and marks. For some reason, awk arbitrarily removes the first digit from the student number and doesn't show me the proper output. Here is my code: #! /usr/bin/awk -f... (6 Replies)
Discussion started by: trashmouth12
6 Replies

4. Shell Programming and Scripting

nawk is truncating output

Legends, I have 2 files f1 and f2. when i use nawk to compare the difference(subtraction) from 4th column of the file, it truncates the output. can you please help to resolve this. subtraction is (4th col of f1 - 4th col of f2). but it gives only below lines out of 116. I want to print all... (7 Replies)
Discussion started by: sdosanjh
7 Replies

5. Shell Programming and Scripting

plink truncating commands

I'm using plink.exe on WinXP to run some commands on Z/OS BASH. My commands are interspersed with echo commands so that I can parse the output and work out what is where. The first hundred or so commands run fine, but then one of them gets truncated. For example: Input: echo :end_logdetail:... (6 Replies)
Discussion started by: PhilHibbs
6 Replies

6. Shell Programming and Scripting

Truncating a mail file

Hi, I have a Unix mail file that I need to truncate, based on the date of the messages. For those not familiar with the format, it is a single file for each user, with the first line of the mail message looking like the following: From user@sitename.com Thu Apr 21 05:40:33 2011 Each... (3 Replies)
Discussion started by: joed
3 Replies

7. UNIX for Dummies Questions & Answers

Truncating file based on date

Hi, I need to truncate a file based on date.Suppose i have a log file which is getting updated every date,i need to keep 7 days worth of data(like sysdate-7) and rest i want to truncate it.Can some help me? (5 Replies)
Discussion started by: Param0073
5 Replies

8. UNIX for Dummies Questions & Answers

Truncating the last character

Hi all , I am creating the file which holds the create query to run in the sql prompt: so when i am creating: create table XXX( SD Varchar2(10), DF Varchar2(10),) I am getting one comma at the last ,before i am inserting the closing bracket i need to delete that? kindly provide me the... (1 Reply)
Discussion started by: ithirak17
1 Replies

9. Shell Programming and Scripting

Truncating a variable

I have a variable that is a full path name and I just want the file name with out the extension. I have figured out how to do this using some temp files but I would really like to avoid that if possible. I know I can do echo ${TMPNAME%.*} to drop the extension is there a similar way to drop... (3 Replies)
Discussion started by: whdr02
3 Replies

10. UNIX for Dummies Questions & Answers

Truncating a number using sed/awk

Hi all, I'm trying to truncate a number like the following: 0001060407013900501048239559900600504083525826350002050354795057 I would like to create an output which puts carriage returns every so many characters, giving an output such as: 0001 060407 0139 0 05 010482395599 0060... (4 Replies)
Discussion started by: michaeltravisuk
4 Replies
Login or Register to Ask a Question