ps command syntax


 
Thread Tools Search this Thread
Operating Systems HP-UX ps command syntax
# 1  
Old 02-07-2011
ps command syntax

I use hp HP-UX.
I want to get vsz of the process .
What is the syntax ...
Code:
/run>ps -help
ps: illegal option -- h
ps: option requires an argument -- p
usage: ps [-edaxzflP] [-u ulist] [-g glist] [-p plist] [-t tlist] [-R prmgroup] [-Z psetidlist]


Last edited by vbe; 02-07-2011 at 09:40 AM.. Reason: code tags
# 2  
Old 02-07-2011
You need to tell the shell you want UNIX95 syntax:
Code:
UNIX95= ps -efo vsz,ruser,pid,ppid,args...

# 3  
Old 02-08-2011
Quote:
Originally Posted by vbe
You need to tell the shell you want UNIX95 syntax:
Code:
UNIX95= ps -efo vsz,ruser,pid,ppid,args...

Hi,
"-o" option is not support . Please advice other :

Code:
/run>ps -eo vsz
ps: illegal option -- o
usage: ps [-edaxzflP] [-u ulist] [-g glist] [-p plist] [-t tlist] [-R prmgroup] [-Z psetidlist]
/run>uname -a
HP-UX XXXXXX B.11.11 U 9000/800 2311410363 unlimited-user license

# 4  
Old 02-09-2011
To use the XPG4 version of "ps" in HP-UX you need to precede the command with "UNIX95= ". The space after the equals sign is important.

Code:
UNIX95= ps -eo vsz

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Syntax when using the 'exec' command

Hey gang, I'm confused about the 'exec' command. I get the basics. I can redirect stdout and stderr to one log file with: exec >> $logFile 2>&1 However, that code requires admin rights. In other scripts, when faced with this, I'll call 'sudo' and then pass a hashed password like this: ... (8 Replies)
Discussion started by: hungryd
8 Replies

2. Shell Programming and Scripting

Alias command syntax

Hi all, I want to add a shortcut "xmll" to my .cshrc file. By using "xmll" I want the following command to be executed: find . -type f -name 'T*.xml' > xml_list.txt BUT: alias xmll 'find . -type f -name 'T*.xml' > xml_list.txt' doesn't work. What is the correct syntax? Thank... (7 Replies)
Discussion started by: friend
7 Replies

3. UNIX for Dummies Questions & Answers

to take backup what is the command tell syntax

to take backup what is the command tell syntax (1 Reply)
Discussion started by: sunilamarnadh
1 Replies

4. UNIX for Dummies Questions & Answers

Syntax for own UNIX command

hi All, how can i make my own commamnds for unix shell scripts. lets xmple.. 1-i want to use "down arrow key" for previous runned unix commands. then how to acheive it. 2-Generally TAB --- complete filename or command up to the point of uniqueness ..but here its not working .. I m new to... (1 Reply)
Discussion started by: pradeepcarya
1 Replies

5. Shell Programming and Scripting

awk command syntax

I want the output to show 2 lines following this line. How do I amend my awk command. Please guide. Thanks (3 Replies)
Discussion started by: Tirmazi
3 Replies

6. UNIX for Dummies Questions & Answers

bind command syntax

Can anyone tell me what the syntax is for the bind command in bash? I'm using OS X and the book i have ias written in 2005 ('Learning the bash shell') I'm guessing it was for an earlier version. It says something about single and double quotes, but I'm not sure exactly in what order they're... (2 Replies)
Discussion started by: Straitsfan
2 Replies

7. Shell Programming and Scripting

until command syntax error

Hi there. I spent too much time away from Unix, now I can't remember how to issue a simple until command in ksh :mad: could you tell me what is wrong with the following code sample: export v = "1" until do echo 'executing repeat_until' v = `expr $v + 1` done I've... (3 Replies)
Discussion started by: 435 Gavea
3 Replies

8. UNIX for Dummies Questions & Answers

Command syntax

Here's my situation. I am trying to move all files from one directory to another. I have the following requirements: 1) Move all files in /myfiles/wip matching pattern "*.tif" to /work/in that are at least 10 minutes old (or older). 2) When the files are moved, they need to be moved into... (2 Replies)
Discussion started by: dsimpg1
2 Replies

9. UNIX for Dummies Questions & Answers

command syntax

Hi, Does anyone knows the command syntax for the following Unix commands: at mount The OS is the Chorus/Mix 4.3 BSD Unix. The "at" command does the following: at a precise date and hour it executes a desirede command. Many thanks !!! Regards, Pedro Pereira (3 Replies)
Discussion started by: pmap
3 Replies

10. UNIX for Dummies Questions & Answers

Syntax for tar command

I am trying to extract a file using tar. I cd'ed to the directory I wanted to start in. I had the tar file in the same directory. I executed tar xvf filename . It appeared that it was extracting into the directory the tar file was created from instead of into the directory I was in. How do I... (1 Reply)
Discussion started by: baunocj
1 Replies
Login or Register to Ask a Question