Operating System - HP-UX
1834862 Members
1990 Online
110070 Solutions
New Discussion

Re: Terminal Server Problems - need script help

 
Jim Lynn
Contributor

Terminal Server Problems - need script help

We have terminal servers where the process gets hung up and needs to be killed and restarted. These devices would have a process that runs against a terminal server port - so we could grep on that and then use the port name again to restart it. Anyone have good scripting knowledge ?
for an example a problem with a station that is named pps_t01 and it is linked to /dev/ttyp0 and a grep of the process returns this :

root 81058 1 0 Feb 23 - 1:06 /etc/ioland -C -F -T -h -K60 -p a0xxx01 10001 ptyp0 ttyp0
root 384590 81058 0 Jun 04 - 0:27 /etc/ioland -C -F -T -h -K60 -p a0xxx01 10001 ptyp0 ttyp0

then a kill of the processes and to restart would be :

etc/ioland -C -F -T -h -K60 -p a0xxx01 10001 ptyp0 ttyp0

So I would need to connect the link to the port - kill the process and run the command to start it...
I'm really new
1 REPLY 1
James R. Ferguson
Acclaimed Contributor

Re: Terminal Server Problems - need script help

Hi Jim:

If is read this correctly, once you have done your 'grep', pipe to 'cut' like this"

# ... |cut -d" " -f9-

Hence:

# echo "root 81058 1 0 Feb 23 - 1:06 /etc/ioland -C -F -T -h -K60 -p a0xxx01 10001 ptyp0 ttyp0" | cut -d" " -f9-

...returns:

etc/ioland -C -F -T -h -K60 -p a0xxx01 10001 ptyp0 ttyp0

Regards!

...JRF...