1753362 Members
5095 Online
108792 Solutions
New Discussion юеВ

pstat_get_commandline()

 
SOLVED
Go to solution
catastro
Super Advisor

pstat_get_commandline()

Hi to all.
I have several servers running with HP-UX 11.11 and my command line has only capacity for 64 characters until it breaks the line and not able to see anymore the beginning of it.
I have been told that there is an enhacement that makes the command line to have 1020 characters or so, and I am looking about it and don┬┤t find anything on how doing it.
Anyone could help me with this???

 

 

P.S.This thread has been moved from HP-UX>System Administration to HP-UX > languages- HP Forums Moderator

7 REPLIES 7
Steven E. Protter
Exalted Contributor
Solution

Re: pstat_get_commandline()

Shalom,

Same for all servers?

Check your TERM variable.

Are you using a standard one?

echo $TERM

stty -a
env


Look for strangeness.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: pstat_get_commandline()

Hi:

If you are referring to the command line interface 'ps' then add the '-x' switch to see up to 1024 bytes.

Regards!

...JRF...

Re: pstat_get_commandline()

My understanding of this is that the underlying system call (pstat(2)) was changed to allow the ps -x functionality, but the function is not documented and is meant for HP use only.

If you have access to the ITRC knowledge base, document KBRC00006317 will tell you all you need to know.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
catastro
Super Advisor

Re: pstat_get_commandline()

I don├В┬┤t see any estrange thing in these parameters. What do you mean with the ps -x functionality?

server1:root>echo $TERM
vt220
server1:root>stty -a
speed 9600 baud; line = 0;
rows = 24; columns = 80
min = 4; time = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U
eof = ^D; eol = ^@; eol2 = ^@; swtch = ^@
stop = ^S; start = ^Q; susp = ^Z; dsusp
werase = ^W; lnext = ^V
-parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk -crts
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo echoe echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop
server1:root>env
_=/usr/bin/env
TMPDIR=/u7/TMP
MANPATH=/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/u
sr/local/man/%L:/usr/local/man:/opt/upgrade/share/man/%L:/opt/upgrade/share/man:
/opt/pd/share/man/%L:/opt/pd/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/o
pt/pd/share/man/%L:/opt/pd/share/man:/opt/ignite/share/man/%L:/opt/ignite/share/
man:/opt/mx/share/man:/usr/dt/share/man:/opt/samba/man:/opt/gnome/man:/opt/perl/
man:/opt/wbem/share/man:/opt/hparray/share/man/%L:/opt/hparray/share/man:/opt/gr
aphics/common/man:/opt/aCC/share/man/%L:/opt/aCC/share/man:/opt/audio/share/man:
/opt/ansic/share/man/%L:/opt/ansic/share/man:/opt/langtools/share/man/%L:/opt/la
ngtools/share/man:/opt/image/share/man:/opt/imake/man:/opt/cobol/cobdir/man:/opt
/hpnpl//man:/opt/dtcmgr/share/man:/opt/ssh/share/man:/opt/resmon/share/man/%L:/o
pt/resmon/share/man:/opt/openssl/man:/opt/openssl/prngd/man
SSH_TTY=/dev/pts/0
PATH=/conect:/etc/:/usr/sbin:/sbin:/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/opt/per
l/bin:/usr/contrib/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/upgrade/bin:/opt/
fcms/bin:/opt/pd/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/resmon/bin:/opt/mx/b
in:/opt/gnome/bin:/opt/mozilla:/opt/wbem/bin:/opt/wbem/sbin:/opt/ignite/bin:/usr
/sbin/diag/contrib:/opt/graphics/common/bin:/opt/aCC/bin:/opt/langtools/bin:/opt
/imake/bin:/opt/cobol/bin:/opt/hpnpl//bin:/opt/dtcmgr/sbin:/opt/OV/bin/OpC:/opt/
OV/bin:/opt/ssh/bin:
COLUMNS=80
EDITOR=vi
LOGNAME=root
MAIL=/var/mail/root
ERASE=^H
PS1=server1:root>
USER=root
SHELL=/usr/bin/ksh
HOME=/conect
SSH_CONNECTION=10.57.224.72 53132 10.57.212.10 22
SSH_CLIENT=10.57.224.72 53132 22
TERM=vt220
PWD=/conect
TZ=MET-1METDST
LINES=24
James R. Ferguson
Acclaimed Contributor

Re: pstat_get_commandline()

Hi (again):

> What do you mean with the ps -x functionality?

By that I mean add that switch to your 'ps' command to enable the display of ong (larger than 64-character) commandline information for the process displayed. Up to 1024 characters are supported.

As Duncan notes, if your question concerns using 'pstat()'s PSAT_GETCOMMANDLINE, then similar extensability is not documented nor supported for it.

Regards!

...JRF...

Re: pstat_get_commandline()

Maybe an example of ps -x would help:

# ps -ef | grep [n]etfmt
root 664 663 0 13:54:35 ? 0:00 /usr/sbin/netfmt -C -F -f /var/adm/nettl.LOG000 -c /var/adm/con
# ps -efx | grep [n]etfmt
root 664 663 0 13:54:35 ? 0:00 /usr/sbin/netfmt -C -F -f /var/adm/nettl.LOG000 -c /var/adm/conslog.opts

I am an HPE Employee
Accept or Kudo
catastro
Super Advisor

Re: pstat_get_commandline()

Thanks to all of you.
It threw more light to my question with your comments and specially with the document Duncan told me to look at. I have found the solution for it.
Again thanks a lot