help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Command history is no longer functioning....


From: Miquel Cabanas
Subject: RE: Command history is no longer functioning....
Date: Wed, 05 Apr 2006 16:54:48 +0200

ough!

can you run octave from strace and save the execution trace to a file?
then you could check what's doing octave behind the scene. For instance,

> strace -o octave.trace.output octave

once inside octave just type a couple of commands (eg history and clear)
and exit. Then you can examine the content of "octave.trace.output" with
a text editor,

1. search for readline and make sure octave finds a readline library
file. For instance, Octave failed to find this library,

  open("/usr/lib/octave-2.1.69/libreadline.so.5", O_RDONLY) = -1
    ENOENT   (No such file or directory)

but found this other one,

  open("/lib/libreadline.so.5", O_RDONLY) = 3

2. search for "octave_hist" and verify whether octave finds and opens it
to read the history of commands when starting,

  open("/home/miquel/.octave_hist", O_RDONLY) = 3
  fstat64(3, {st_mode=S_IFREG|0600, st_size=6583, ...}) = 0
  read(3, "path\nhelp path\nloadpath\nhelp loa"..., 6583) = 6583
  close(3)                                = 0

3. then, move to the end of the trace file, and try finding a set of
lines like,

  fcntl64(4, F_GETFL)                     = 0x1 (flags O_WRONLY)
  fstat64(4, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
    old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|
    MAP_ANONYMOUS, -1, 0) = 0x40e9e000
  _llseek(4, 0, 0xbfffe804, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
  write(4, "    1 path\n    2 help path\n    3"..., 8192) = 8192
  write(4, "ary\n", 4)                    = 4
  write(4, "  396 diary on\n", 15)        = 15
  write(4, "  397 whos\n", 11)            = 11
  ...
  write(4, "  469 history\n", 14)         = 14
  close(4)                                = 0

which indicate that octave is writing the history of commands to the
history file. The last commands should be the ones you typed inside your
octave session.

Miquel

On Wed, 2006-04-05 at 15:26 +0100, Bernard Siow wrote:
> No mention of history_size or history_file in either user or shared
> config files 
> 
> -----Original Message-----
> From: Miquel Cabanas [mailto:address@hidden 
> Sent: 05 April 2006 15:12
> To: Bernard Siow
> Cc: address@hidden
> Subject: RE: Command history is no longer functioning....
> 
> which is the value of history_size within Octave?
> 
> octave:1> history_size
> history_size = 1024
> 
> if it is not 1024, check whether it's been assigned a new value in your
> local ~/.octaverc or in the wide-system /etc/octave/octave*.conf
> 
> check also the history_file variable,
> 
> octave:2> history_file
> history_file = /home/miquel/.octave_hist
> 
> Miquel
> 
> On Wed, 2006-04-05 at 14:57 +0100, Bernard Siow wrote:
> > Thanks for the reply, I do have rw permission on the file and command 
> > history is still not working!
> > 
> > -----Original Message-----
> > From: Miquel Cabanas [mailto:address@hidden
> > Sent: 05 April 2006 14:55
> > To: Bernard Siow
> > Cc: address@hidden
> > Subject: Re: Command history is no longer functioning....
> > 
> > one possibility is that you have changed the file permissions of 
> > ".octave_hist" at your home directory,
> > 
> > $ ls -l .octave_hist
> > -rw-------  1 miquel miquel 6470 2006-04-05 09:25 .octave_hist
> > 
> > you must have write permission to append new commands to this file.
> 
> 



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]