Page 2 of 2

Re: Reinitializing LXTerminal without Rebooting

PostPosted: July 13th, 2017, 9:28 am
by asheets
Not what I was expecting.... back to the drawing board...


evansste wrote:After running the short program overnight, LXterminal stopped working, as expected. <snip>

Re: Reinitializing LXTerminal without Rebooting

PostPosted: July 15th, 2017, 5:06 am
by bandersnatch
Hi Guys,

It's only a hunch but I suspect that the problem lies with the octave-cli script rather than in LXTerminal.
I agree with the comment from asheets that the shell script hangs due to a resource lack/conflict but
I reckon that this is caused by Octave/the Octave script...
Analysing the shell/process structure from the OS level might not give you enough information

Two approaches come to mind:
1/ Embed debugging logging in the Octave script to log execution of the script to a file.
With any luck you will see exactly where/why the script is hanging....
Start with coarse-grained logging & add more fine-grained logging when you know approximately where things are clogging up...

2/ Just out of curiosity, you could also set up Octave on an (e.g.) XP virtual machine (VMWARE/Virtual box.. whatever)
& see if you get the same problem with hanging after 24 hours.
If this also hangs then the problem is definitely in Octave/the Octave script & not LXTerminal/Lubuntu
If the script runs stably under XP then the problem is truely with lubuntu & we are "back to the drawing board"..;^)

You can also use the XP system monitor to track/graph the memory/io/processor usage of the script over days/weeks..
These graphs provide a quick and easy way of monitoring/examining the resource usage & trends of your Octave script.
If you see a curve that keeps rising then you can be sure that things will eventually come to a grinding halt.

The idea is to use the powerful monitoring tools in XP to tune your Octave script so that it remains stable in your lubunti enviroment..
The XP kernel is heavily influenced by VMS, and has hugely extended kernel monitoring features compared to the original Unix kernel...

Keep us posted on your progress ;^)

STFB.

Re: Reinitializing LXTerminal without Rebooting

PostPosted: July 15th, 2017, 6:29 am
by evansste
Hello everyone.

Duplicating this scenario is extremely easy, and knowing what I did, specifically, may allow you to see the problem right away.

First, open octave. I always use the console, so I open LXterminal and type "octave-cli".

Then modify your .octaverc file by adding "exit;" to it. When finished, mine contains the following lines:

cd /home/evansste/octdir
page_screen_output(0);
page_output_immediately(1);
exit;

Finally, type the following at the Octave prompt:

while 1;system('lxterminal -e octave-cli');pause(3);end

Once you hit "enter", Octave will open a new LXterminal every three seconds. The new terminal will immediately close. If you run this for a while, LXterminal will no longer work correctly. Opening a new LXterminal will mean opening a window that is blank. For me, I let it run overnight. The next morning, LXterminal wasn't working correctly.

The above is all I needed to do in order to re-create the situation. Maybe this will help you understand what the problem is.