![]() Visit the NICE/2 Homepage! |
|
NICE/2 By Sharon Dagan <idagan@il.ibm.com>
What is NICE/2? Have you ever started a long XCOPY command that ate too much CPU? Have you ever wanted to make Netscape/2 more responsive? NICE/2 is here to rescue. With NICE/2 you can dynamically change the priority of many processes in OS/2. As opposed to programs such as SPE that start a process in a given priority, NICE/2 enables you to change the priority of processes and threads after they have been started.
Simply put \nice\dll in your LIBPATH and \nice\bin in your PATH.
NICE/2 is divided into three components: Server, GUI client and command line client. To start using NICE/2, the server must be running. To start the server, issue the command: niced.exe -start This will attempt to start the server. If everything went ok, niced.exe quietly returns. If the server could not be started, niced.exe reports the error and aborts the operation. To find out if the server is running or not, issue: niced.exe This will tell you if the server is running or not. To stop the server, issue: niced.exe -stop This will attempt to stop the server. This might take a few seconds. If the server was successfully stopped, niced.exe quietly returns. If an error occurred while stopping the server, niced.exe reports the error but still stops the server. If you intend to use NICE/2 a lot, start the server in your STARTUP.CMD or STARTUP folder. NICE/2 takes only a fraction of OS/2 resources, so there's really no good reason against it. After the server has been started, use either the GUI or the command line to interact with NICE/2. Lets say you want to change the priority of Netscape and make it a bit more responsive.
NICE/2 is provided with several utilites to ease the use of NICE/2. The utlities provided are not part of the core NICE/2 build tree and don't use any of the NICE/2 API's - they can be used 'stand-alone'.
NICE/2 is provided with a SDK for C/C++ and REXX. Use this SDK to extend NICE/2 or integrate it with your own programs and scripts. The C/C++ SDK has been built with VisualAge C++ v3.0 but should work with EMX/GCC too. The C/C++ SDK includes head er and lib files (nice.h, nice.lib) and a sample program (sample.c, sample.mak). The C/C++ SDK includes the following functions:
NICE/2 also includes a REXX SDK to ease integration of NICE/2 with scripts. The NICE/2 REXX SDK is comprehansive and includes the NICE/2 REXX DLL (rxnice.dll) and two sample files (sample1.cmd, sample2.cmd). The REXX SDK includes the following functions:
Known Problems If you have a problem not listed here and you susspect a bug, please take a few minutes and download the debug version of NICE/2. With this version, the NICE/2 server writes a detailed log file that could help you (and me) diagnose the problem. Here is a list of known problems:
|
|
---|
|
|
Some of the errors NICE/2 returns: |
|
||
|
|
0 -1 -2 -3 -4 -5 -6 -7 303 304 307 309 640 |
NO_ERROR ERR_USAGE ERR_INSTANCE ERR_ENGINE_STARTED ERR_ENGINE_STOPPED ERR_WINSETHOOK ERR_NOT_PM_PROCESS ERR_HWND_NOT_FOUND ERROR_INVALID_PROCID ERROR_INVALID_PDELTA ERROR_INVALID_PCLASS ERROR_INVALID_THREADID ERROR_TIMEOUT |
no error check swithces niced.exe already running NICE/2 server already running NICE/2 server not started internal error - please report PID is not a PM process internal error - please report invalid PID ('-p') invalid DELTA ('-d') invalid CLASS ('-c') invalid TID ('-t') timeout expired |
|