Solved

ps -ef

Posted on 1997-11-16
6
804 Views
Last Modified: 2013-12-06
Whenever one wants to look at what process the system is
running, we usually use the command "ps -ef | grep $LOGNAME"
One of the problems I have is that the output does not show
the entire command that was executed.  The command line
gets truncated after (around) 80 characters or so.  What
options should I set (or what other command can I run) in
UNIX to enable me to look at the process command string in
it's entirety?
0
Comment
Question by:wee_liang
6 Comments
 

Expert Comment

by:sergik
ID: 2007818
Hi!

Try to add to your command line "www" (ps -efwww).
It works good for SunOS 4.1.4 and 5.5.1
0
 

Author Comment

by:wee_liang
ID: 2007819
Sorry that I didn't decribe the Unix OS clearly.  I've tried
this command you suggested ps -efwww on HP OS 9.X and it doesn't
know what that means.

Thanks for your suggestion anyway.

Any others could provide me a solution?
0
 
LVL 4

Accepted Solution

by:
jlms earned 10 total points
ID: 2007820
Check your man page, it should provide a switch to format the output, it is usually -o args, so your command should look similar to:

ps -ef -o args

this works in Solaris and Linux, HP should have something similar.

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 2007821
how about  -l  option? or just use
  man ps
0
 
LVL 3

Expert Comment

by:braveheart
ID: 2007822
It is unlikely that 'ps' is truncating your output at 80 chars.
What is more likely is that your terminal definition needs
altering so that long lines wrap around your screen and continue
on the following line. 'ps -efl' definitely works on HP-UX 10.xxx
0
 

Expert Comment

by:grantk
ID: 2007823
depends on the OS and the version of ps. If you're using
"-ef", you're running on a SysV system, and SysV ps is pretty basic compared to BSD ps. Get a copy of BSD ps and compile it.
For example, I run "lps -auxw" and get everything. The "w" means "wider", so you should use it.


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now