in reply to Other Script Processes

Are you wanting to see how many "different" people are running a particular script? This can be done by looking through the running processes (ps) and getting the unique users running the script (you could write a nice perl script to do this). If, that is what you are talking about. A little more clarification could help.

---
echo S 1 [ Y V U | perl -ane 'print reverse map { $_ = chr(ord($_)-1) } @F;'
Warning: Any code posted by tuxz0r is untested, unless otherwise stated, and is used at your own risk.

Replies are listed 'Best First'.
Re^2: Other Script Processes
by powerhouse (Friar) on Nov 17, 2007 at 02:29 UTC
    Yes, I need to know how many different people are on our website. We just launched this program and already have over 10k members, so the problem is that there are people on this website all the time.

    Therefore If I make a change to the core files, and someone is loading the file they get an error. I want to minimize that so it would be very helpful if I can figure out how many people are on the main scripts which there are two of them the index.cgi script and the members.cgi script, both of them load the same core files. So if I can figure out how many different people are on them I can try to upload the files when there are none, or just a few. I can pass a message to all visitors that says "we are updating a core file if you get an error please wait 2 minutes and try again. sorry for the inconvenience... blah blah... whatever..." Anyhow, I try to keep each file a small file, like 2k lines or less, then I just pull each file in from the main core file. That way when I upload it uploads really fast, so it does not cause much interuption.

    I appreciate everything.
    thx,
    Richard

      If I'm not mistaken, rename is atomic on unix, so instead of copying your new file over the old one, move it over.

      For example, upload the new index.cgi as index.cgi.new, then issue mv index.cgi.new index.cgi.

        Ok, so If I am updating the core file, vars.conf which has all that magic in it, then name it vars2.conf then just use unix to overwrite it and it should not interfere with users loading pages?

        Is that correct?
        thx,
        Richard