comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: nicing idl at startup from idlwave
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: nicing idl at startup from idlwave [message #52143] Mon, 22 January 2007 09:22 Go to next message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Mon, 22 Jan 2007 10:00:30 -0600, Christopher Thom wrote:

> Hi gang,
>
> A quick question -- does anyone know how to start idl from idlwave with a
> lower process priority? I tried setting idlwave-shell-explicit-file-name
> to something like "nice -5 idl" without any success. Looks like this needs
> to be the filename only, I presume since idl is started without recourse
> to the shell.

Probably the easiest is to make a shell script "niceidl" and reference
that directly in shell-explicit-filename. renice also could do the
trick post-facto, and a little elisp could make it much easier to use.
Stick this in your .emacs:

(defun renice-idl (&optional priority)
(interactive "NIDL Priority (nice): ")
(if (idlwave-shell-is-running)
(shell-command
(format "renice %d -p %d"
priority
(process-id (get-buffer-process (idlwave-shell-buffer)))))))
(idlwave-shell-define-key-both [f9] 'renice-idl)

Then hitting f9 will prompt for a nice value to set the IDL process
to. Note that you can only increase 'nice' on most systems (from
0-20). If you really want the same nice value every time you start
IDLWAVE, you can:

(add-hook 'idlwave-shell-mode-hook (lambda () (renice-idl 5)))

JD
Re: nicing idl at startup from idlwave [message #52145 is a reply to message #52143] Mon, 22 January 2007 08:08 Go to previous messageGo to next message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
The first answer is that this is really dependent on the system you are
on. Every Linux machine that I have used only root can do negative
niceness. There may be OS settings to change this around. SO the lack
of success could be nice just leaving you at 0 since you are not root
while running this (I assume).

Cheers,

Brian

------------------------------------------------------------ ---------------
Brian A. Larsen
Dept. of Physics
Space Science and Engineering Lab (SSEL)
Montana State University - Bozeman
Bozeman, MT 59717

On Jan 22, 9:00 am, Christopher Thom <c...@oddjob.uchicago.edu> wrote:
> Hi gang,
>
> A quick question -- does anyone know how to start idl from idlwave with a
> lower process priority? I tried setting idlwave-shell-explicit-file-name
> to something like "nice -5 idl" without any success. Looks like this needs
> to be the filename only, I presume since idl is started without recourse
> to the shell.
>
> cheers
> chris
Re: nicing idl at startup from idlwave [message #52290 is a reply to message #52143] Mon, 22 January 2007 11:15 Go to previous message
Christopher Thom is currently offline  Christopher Thom
Messages: 66
Registered: October 2006
Member
Quoth JD Smith:

> On Mon, 22 Jan 2007 10:00:30 -0600, Christopher Thom wrote:
>
>> Hi gang,
>>
>> A quick question -- does anyone know how to start idl from idlwave with a
>> lower process priority? I tried setting idlwave-shell-explicit-file-name
>> to something like "nice -5 idl" without any success. Looks like this needs
>> to be the filename only, I presume since idl is started without recourse
>> to the shell.
>
> Probably the easiest is to make a shell script "niceidl" and reference
> that directly in shell-explicit-filename. renice also could do the
> trick post-facto, and a little elisp could make it much easier to use.
> Stick this in your .emacs:

duh. shell script. always miss the simple and obvious solutions. thanks
both. I just tried it and it works fine...will keep an eye out for
unexpected side-effects of have a shell layer in there.

btw -- i should have been a little more explicit: "nice -5" is a
somewhat historical usage, which lowers the priority (i.e. = nice -n +5
idl). at least, on my linux/mac machines.

cheers
chris
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: ascii value of a char
Next Topic: Re: ascii value of a char

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:00:32 PDT 2025

Total time taken to generate the page: 0.00519 seconds