"ps -o" Not valid: XPG4 Only. What does that mean?


 
Thread Tools Search this Thread
Operating Systems HP-UX "ps -o" Not valid: XPG4 Only. What does that mean?
# 1  
Old 02-15-2008
"ps -o" Not valid: XPG4 Only. What does that mean?

When I tried to specify columns with ps
Code:
ps -o"pid,stime"

I get the following error:
Code:
ps: illegal option -- o

The man page says that -o is XPG4 only. All the other options that also say "XPG4 only" don't work either. What is XPG4? is it a compiler option of some sort that must not be checked? or is there also going to be a XPG4 version of each program on the HP Unix box?

Thanks,
Gold Fish
# 2  
Old 02-15-2008
it's a different version of ps in /usr/xpg4/bin
# 3  
Old 02-15-2008
Quote:
Originally Posted by Tytalus
it's a different version of ps in /usr/xpg4/bin
When I do
Code:
$ cd /usr/xpg4/
bash: cd: /usr/xpg4/: No such file or directory

I don't have root access to the machine so I can't fix this... was this due to bad configuration on the admin's part? or this just an unusual configuration option to not compile the xpg4 versions?

Is there anyway for me to get the source for the xpg4 versions to compile in my home direcotry? I haven't found anything in my google searches. In fact, almost every other version of ps I've used allows "-o", so if I could just find SOME version that I can compile in my home directory.

Gold Fish
# 4  
Old 02-15-2008
hmmm - been a long time...try setting the ENV variable

UNIX95=

(that's UNIX95=<space>)

e.g.:

Code:
UNIX95= ps -o comm,sz,vsz,time,user,uid

# 5  
Old 02-15-2008
Quote:
Originally Posted by Tytalus
hmmm - been a long time...try setting the ENV variable

UNIX95=

(that's UNIX95=<space>)

e.g.:

Code:
UNIX95= ps -o comm,sz,vsz,time,user,uid

Whoo, nice! That worked!
I've done a bit of googling on UNIX95 to try and understand it. The solution seen most often is
alias ps="UNIX95= /usr/bin/ps"

Another solution I tried was using a perminate variable:
$export UNIX95=
$ps -o comm
which worked... Is this a better solution? or is this going to have unforseen(potentially bad) effects on the other HP Unix core utilities?

Thanks,
Gold Fish
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies

2. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. Shell Programming and Scripting

Help with error "por: 0403-012 A test command parameter is not valid."

Hi, im asking for help with the next script: echo ^; then if then printf "\033 query1.sh: export TERM=vt100 export ORACLE_TERM=at386 export ORACLE_HOME=/home_oracle8i/app/oracle/product/8.1.7 export ORACLE_BASE=/home_oracle8i/app/oracle export... (8 Replies)
Discussion started by: blacksteel1988
8 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. AIX

"rmt0" is not a valid backing device - VIO

hello to all, i am trying to assing a tape drive to a virtual partition through VIO but i get the message "rmt0" is not a valid backing device. the oslevel of my VIO is AIX 6.1.3.0. when i run the command lsdev |grep rmt i get the following result: rmt0 Available 08-08-00-0,0 ... (6 Replies)
Discussion started by: omonoiatis9
6 Replies

7. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

8. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
Login or Register to Ask a Question