Re: Unix help

Dave Ahn (ahn@indigo2.rad.bgsm.edu)
Tue, 20 May 1997 02:54:14 -0400 (EDT)


> OK, I'm playing around with starting DESCHALL on one of my ISP's server
> (no, I'm not going to leave it running w/o their permission, I'm kinda
> just playing). Anyway, is there a way I can make it run for a given
> amount of time and then exit? Also, I'm trying to figure out just what
> kind of sparc they have so I can get the best client. How can I tell?

This is trivial to implement. You can write a 4 line shell script
to put deschall in the background, sleep for XX seconds, then use
kill `ps ...|grep ...|cut ...` to kill deschall.

Something like:
#!/bin/sh
./deschall-client&
sleep 3600
kill `ps -fu my_uid | grep "./deschall-client" | grep -v grep | cut -b 10-14`

Note that this only works when exactly one client is running under your
uid. If you have multiple clients running, put the 'kill ...' line in a
'for ... in ...' loop.

Alternatively, you can write a small C program to accomlish the same thing.

As for getting the best client, do a 'uname -a' to get the system id string.
Strangely, the different sparc binaries seem to have little performance
differences. In fact, the 'ultrasparc' client runs fastest on my
non-ultrasparc.

Dave.

-- 
Dave Ahn,  ahn@vec.bgsm.edu             "When you were born you cried, and the
           ahn@indigo2.rad.bgsm.edu      world rejoiced.  Try to live your life
Virtual Endoscopy Center                 so that when you die you will rejoice,
Bowman Gray School of Medicine           and the world will cry."  -1/2 jj^2