1752608 Members
4529 Online
108788 Solutions
New Discussion юеВ

unable to get pty

 
Go to solution
Ahmed Zaher
Advisor

Re: unable to get pty


Dear Dennis,

Thanks for your response and sorry to be late.

the the result of "ps -fu" command for user named "noc" is attached.

Thanks in advance.
Dennis Handly
Acclaimed Contributor

Re: unable to get pty

>"ps -fu" command for user named "noc"

You need to use this exact command, so -H works.
UNIX95= ps -Hfu noc

noc seems to have a bunch of old (May 27):
/usr/dt/bin/dtexec -open ...
Ahmed Zaher
Advisor

Re: unable to get pty


Dear Dennis,

It seems that my system doesn't support this option.

I got this error "ps: illegal option -- H".


Please advise.
Dennis Handly
Acclaimed Contributor

Re: unable to get pty

>It seems that my system doesn't support this option.

Are you using a real shell? Did you type the line exactly how I showed:
UNIX95= ps -Hfu noc

You can also add "-x" to get more of the command lines.
Ahmed Zaher
Advisor

Re: unable to get pty


Dear Dennis,

Thanks for your interest.

Really, I ran the command without "UNIX95=",
so kindly tell me what does it mean?

The results of "UNIX95= ps -Hfu noc" and "UNIX95= ps -Hxfu noc" are attached.

Thanks in advance.
Dennis Handly
Acclaimed Contributor

Re: unable to get pty

>so kindly tell me what does it mean?

It basically temporarily exports UNIX95 during the ps(1) command. Exporting this causes commands to conform to UNIX 95 Standard and makes available extra ps(1) options like -A, -C, -c, -g, -j, -n, -o, -s, -U, -H and -x.

The reason you don't export it permanently is there are all sorts of side effects for other commands. :-)

>The results of ... are attached.

Please provide a simple .txt file with both outputs.
Ahmed Zaher
Advisor

Re: unable to get pty


Dear Dennis,

The file is attached.

Regards,
Dennis Handly
Acclaimed Contributor

Re: unable to get pty

(I guess we needed that -x.)
You have a bunch of these old processes whose parent is init, 1:
/usr/dt/bin/dtexec -open -1 ... /home/noc/xnmevents.sh

Do you know that that xnmevents.sh script does?
Is this something to do with OpenView?

You seem to have one that its still active:
noc 11291 11289 /usr/dt/bin/dtexec ... /home/noc/xnmevents.sh
noc 11292 11291 /bin/sh /home/noc/xnmevents.sh
noc 11293 11292 /opt/OV/bin/xnmevents

Perhaps you can fix it so when xnmevents.sh dies, it kills its parent?
Ahmed Zaher
Advisor

Re: unable to get pty


Dear Dennis,

The script just execute the "xnmevents" command which launch the OpenView Alarm Browser.

But I don't know how to kill this process when the "xnmevents.sh" dies.

any way, Is there any way to kill these processes manually?

Please advise.
Dennis Handly
Acclaimed Contributor

Re: unable to get pty

>The script just execute the "xnmevents" command which launch the OpenView Alarm Browser.

Any reason you need this since it causes so many problems?

>But I don't know how to kill this process when the "xnmevents.sh" dies.

I suppose you could have a trap for signal 1 (SIGHUP) and then wait N seconds and then kill your parent, since he is unmutual?

>Is there any way to kill these processes manually?

Well, that should be easy. If there is more than one, and it is old, just use kill on that dtexec process.
If that fails, use "kill -9".