Uptime Baby!

Jason jkenner@mindspring.com
Wed, 18 Oct 2000 18:34:46 -0700


sinck@ugive.com wrote:
> 
> \_ If the machine is running unattended, it cleans out any processes that
> \_ for one reason or another fail to terminate.
> \_
> \_ Netscape is perhaps the most heinous example of this (though that
> \_ wouldnt be running unattended...) .. a crashed netscape can persist
> \_ even after you exit from X!
> 
> You're running what kind of software on your production box?  SW that
> doesn't clean up after itself.  Yi.
> 
> Netscape [browser] on a production box?  Double Yi.  That's almost as
> bad as the fabled opengl screensaver on a NT server box....

I only own the two machines here at home, both of which are
workstations. However, I have run across Netscape installed on many
webservers, and have successfully run it over PPP with Xwindows
(_extremely_slowly_) which validated that it was in fact what it
seemed to be.

Apparently many techs at these ISPs prefer browsing thru their servers
from the server itself, I guess. The only reasonable explanation I can
think of for this is that its the only machine in the room. They must
feel safe having the at least one layer of unix security protecting
them (although NS does have that file serving bug.. eek), and I've
never seen anyone run netscape as root or anything.. These people must
not have considered the fact that when netscape "crashes", it doesnt
always do so obviously (but it does start wasting CPU cycles right
away) and that later in the session, when you quit, netscape will
close its windows nicely and then keep using all free CPU time.

On my home box, I've replaced /usr/local/netscape with:

slick:~$ cat /usr/local/bin/netscape
#!/bin/bash
#
renice 10 $$ 
#because it always hangs in the most annoying CPU-wasting loops when I
step away

if (ps | cut -c 22-1000 | cut -d" " -f 1 | grep -q netscape)
then
        #There is a netscape running already
        if (test "$1")
        then
                #The user called netscape from the commandline, to
open a page
                netscape-remote $@&
        else
                #Open a remote window with the users homepage
displayed
                netscape-remote `cat ~/.netscape/preferences.js | grep
user_pref | grep "\"browser.startup.homepage\"" | cut -d"\"" -f 4` &
        fi
else
        #There isnt a netscape running yet!
        #Save only cookies I want
        if (test -x ~/.netscape/filtercookies)
        then
                ~/.netscape/filtercookies
        fi
        #Get a netscape running!
        /usr/local/netscape/netscape -geometry +1+61 $@&
fi
slick:~$ cat /usr/local/bin/netscape-remote
#!/bin/bash
#
/usr/local/netscape/netscape -geometry +1+61 -remote
'openURL('$@',new-window)'
slick:~$ 



This still doesnt function properly with JavaAIM, but I am getting
there...


-- 
jkenner @ mindspring . com__
I Support Linux:           _> _  _ |_  _  _     _|
Working Together To       <__(_||_)| )| `(_|(_)(_|
To Build A Better Future.       |                   <s>