Forum OpenACS Q&A: Re: Monitoring Package: How do I get the top stats to work?
If I start up a tclsh and type "exec top -bn1" it does what I want it to do. If I run the same command from within the OpenACS Shell I get the same error: "top could not be run - TERM environment variable not set".
Using the the OpenACS shell I set TERM to vt100 and all of a sudden I am able to run top with the batch flag so the package can do its magic: guess the package was written for more prehistoric forms of top (I assume newer versions of top require the TERM variable to do some fancy interactive formatting).
So now my question is:
Where/how do I set the environment variables of the nsd process on startup so this continues to work after a restart AOLServer?
You should be able to set env vars in the nsd-postgres wrapper script that starts up aolserver.