lvdvelde
5th November 2003, 12:57
Hi everyone,

does anybody know if it's possible to change the viewing order of the log files, displayed by ttstperrlog?

I added this logfile in $BSE/log - sorted by name it should be displayed somewhere half the way, but it's the last file in the list.

Thanks in advance,

Lex

OmeLuuk
6th November 2003, 12:49
The sort order is equal to the sort order of ls -lf: -f Interpret each argument as a directory and list the name
found in each slot. This option disables -l (ell), -r, -s,
and -t, and enables -a; the order is the order in which
entries appear in the directory.

lvdvelde
7th November 2003, 10:42
Hey OmeLuuk,

that's not exactly what I meant. I put an extra log file in the directory $BSE/log.

Now when I start ttstperrlog, it opens with a list of all available log files. The logfile I added, shows up as the last file in the list. Now I was wondering if it would be possible to tell ttstperrlog in some way to display all available logfiles sorted by name. That seems more logical, right?

That's all.

Greetings, Lex

OmeLuuk
7th November 2003, 10:42
Maybe I was not clear enough...

What I mentioned is that the order in which the files are presented are not determined by the file-name, size, last access date but by the sequence of creation.

If you want your files on top you must recreate your log directory:mv $BSE/log $BSE/logged
cd $BSE/log
cp -p $BSE/logged/log.mylogfile1st .
cp -p $BSE/logged/log.mylogfile2nd .
cp -p $BSE/logged/log.mylogfile3rd .
for i in ../logged/log* ;
> do
> cp -p $i .
> doneNot only will your 1st, 2nd and 3rd logfile be on top but the rest of the logfiles will be presented in sorted order.

lvdvelde
7th November 2003, 10:47
That sounds logical. I'll "refresh" the log-dir in the way you say.
Thanks a lot!

Lex

OmeLuuk
7th November 2003, 10:49
Do not forget to (re)set directory permissions on the newly created log dir... and be sure you have permissions to read and copy all the logfiles.

lvdvelde
7th November 2003, 10:52
I'll recreate the directory after working hours, cause the logfiles are in use right now. Somewhere this weekend.
Permissions are no problem.

lvdvelde
7th November 2003, 11:05
By the way, isn't it possible to do the same by using the "touch" command - I mean, changing the file creation date?
The log file I added is actually a symbolic link.

Lex

OmeLuuk
7th November 2003, 11:08
Another issue that I just noticed.
Initially I recreated log dir like posted before.
Then I deleted the logfile log.mylogfile1st.
I created a new logfile (echo OmeLuuk>log.mylogfilelast) and that one took the leading position of the log.mylogfile1st.

So the recreation of the logfiles are fine as long as you do not reuse the "directory slot" of the files... And in the log directory the logfiles are getting written, when they expand their max size, then they are renamed and a new file is opened with the old name ("sinking on the list").

When mentioning the "directory slot" it is obvious not the file creation date (since the files were copied with the -p(reserve file attributes) option, these were retained). It is the order in which files are mentioned in the "directory file". So "touch" would not change that.

If you would like the logfiles to appear in an ordered fashion, you may log a case to ask Baan to reconsider this mechanism. If they are to change it, it would be more effective to use the sort order with the last modified files presented on top. I am not sure what this would mean for logical linked files...

I am not sure if there is a mechanism in the portingset available to present a directory in an ordered fashion (and thus whether a prio 50 case would make it). And I only noticed that this is the way it works on my HP 11 machine.