HP3000-L Archives

July 2005, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
donna garverick <[log in to unmask]>
Reply To:
Date:
Wed, 20 Jul 2005 14:59:28 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (54 lines)
--- Greg Stigers <[log in to unmask]> wrote:

> I'm looking at how to cleanly end jobs
> running POSIX programs (such as my ssh job stream), preferably by
> killing the appropriate pid. But on PS.HPBIN.SYS -A > PSLIST

in my experience (which ain't saying a lot), i've found that most of
these posix applications create a pid file on start-up.  it would be
worthwhile to do a 'find . -name *pid* -print' (having navigated to the
correct directory first) to see if such a file exists.  it would also
be worthwhile to do a google search.  certainly you're not the 1st
person to have gone down this path....

if ssh does not write to a pid file, you might try something like the
following (from the start up for postgres sql):

!xeq sh.hpbin.sys  "-L -c '&
!  postmaster >>../CURRENT/etc/postmaster.log.$$ 2>&1 -i &; &
!  echo $! >../CURRENT/etc/postmaster.pid; &
!  chmod 644 ../CURRENT/etc/postmaster.pid; &

you'll want to adapt the last two lines for ssh.

once you have a pid file.  halting the process is straight-forward
(from one of the samba shutdown jobs):

!if finfo("/SAMBA/CURRENT/var/locks/nmbd.pid","exists")
!      "-c 'kill `cat /SAMBA/CURRENT/var/locks/nmbd.pid`'"
!  purge /SAMBA/CURRENT/var/locks/nmbd.pid

hth        - d

Donna Garverick, HP-CSA   Sr. System Programmer
dgarverick -at- longs -dot- com
925-210-6631              Longs Drug Stores

Come, my friends, 'Tis not too late to seek a newer world.
Tho' much is taken, much abides; and tho'
We are not now that strength which in old days
Moved earth and heaven, that which we are, we are.
"Ulysses", A. Tennyson

>>>MY opinions, not Longs Drug Stores'<<<



__________________________________
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2