Is there a way to change Specman's log file through the Specman Console? - specman

While debugging with Specman i need to change the log file, which is specman.elog in default.
is there a way to change Specman's log file via the console?

BTW, specman log files file extention is *.elog. When you specify a different file extention (LOG_NAME.log) it will override it, and will make it hard for you to identify the specman log from other logs. If you omit the extention, it will defaultively assign .elog extention.

just to clarify - the " is not required
set log part1
(doing some commands)
set log part2
(doing some more commands)
will result with three log files
specman.elog
part1.elog
part2.elog

Changing log file can be done using 'set log "LOG_NAME.log"'

Related

How to retrieve the value from local exe file

I've got the file "updates.exe", which runs a program. When this file is executed, I might see the next info:
Program Started 101.0.4951.41 version. etc.
How to get the version value '101.0.4951.41' ?
I need to put it to a variable and use it in my further actions.
$CurrentVersion = 101.0.4951.41
Like this.
Thanks!

In what mode are files opened in Scala Files IO?

Python file handling function takes mode as optional parameter which for default is "r" (read).
open(file, mode) #where mode by default is "r"
What is the Scala's analogous default for the same ?
In case of using the concise one-liner method scala.io.Source.fromFile, file is opened in read mode, even if the same method is used to get reference to the buffered source.
Besides, to write TXT files we use Java fallbacks of PrintWriter or FileWriter, which opens files in write mode. Hence the "default" depends on whether we are writing to the file or reading from it.
I figured this by filtering the open files with lsof after opening file in sbt console, any productive additions and/or corrections are appreciated.

AMPL logfile doesn't work

When I write run file for my problem, I want to use log_file command, so after I load data and model, I write following option command:
option solver cplex;
option omit_zero_rows 0;
option presolve 1;
option show_stats 1;
option csvdisplay_header 0;
option log_file AMPL_log.txt;
option cplex_options 'timelimit 900';
solve;
However, when I run it on AMPL, the terminal shows the information
"Error at _cmdno 6 executing "option" command can't open
"AMPL_Log.txt" "
I don't know where I made a mistake in this code.
The error can't open <filename> is often caused by not having permissions to write the file (or, on Windows, if the file is already opened by another application). By default AMPL creates the log file in the current working directory, but you can specify the full path to the location where you have write permissions, e.g. in your home directory:
option log_file '/path/to/log/file';

postgreSQL COPY command error

Hallo everyone once again,
I did various searches but couldn't gind a suitable/applicable answer to the simple problem below:
On pgAdminIII (Windows 7 64-bit) I am running the following command using SQL editor:
COPY public.Raw20120113 FROM 'D:\my\path\to\Raw CSV Data\13_01_2012.csv';
I tried many different variations for the path name and verified the path, but I keep getting:
ERROR: could not open file "D:\my\path\to\Raw CSV Data\13_01_2012.csv" for reading: No such file or directory
Any suggestions why this happens?
Thank you all in advance
Petros
UPDATE!!
After some tests I came to the following conclusion: The reason I am getting this error is that the path includes some Greek characters. So, while Windows uses codepage 1253, the console is using 727 and this whole thing is causing the confusion. So, some questions arise, you may answer them if you like or prompt me to other questions?
1) How can I permanently change the codepageof the console?
2) How can I define the codepage is SQL editor?
Thank you again, and sorry if the place to post the question was inappropriate!
Try DIR "D:\my\path\to\Raw CSV Data\13_01_2012.csv" from command line and see if it works - just to ensure that you got the directory, file name, extension etc correct.
The problem is that COPY command runs on server so it takes the path to the file from the server's scope.
To use local file to import you need to use \COPY command. This takes local path to the file into account and loads it correctly.

'findstr' is not recognized as an internal or external command,

I got the following error while starting JBoss from a command line prompt today:
'findstr' is not recognized as an internal or external command
Please google it, you can find a lot of answers. But do as below to fix it. Add the following value to Right Click My Compuer -> Advanced -> Environment Variables -> System Variables -> Select Path variable -> append the below value.
C:\WINDOWS\system32
It should work with that change.
As others pointed, issue is in wrong settings of PATH variable in Windows.
According to article this is most probably because some stupid installer wrongly modified PATH variable in Windows registry. Registry has 2 different string value types - REG_SZ and REG_EXPAND_SZ. Only the second one allows for expansion of %SystemRoot%.
So check your path by typing set path in command prompt. If you see unexpanded %SystemRoot% and other variables in Path, you are affected (PATH should show only plain directory names, not variables).
You need to edit Path variable in registry: HKEY_CURRENT_USER\Environment and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment. As it is not possible to change the type of key, save the path value somewhere, delete the key and re-create it with type REG_EXPAND_SZ. You need to logout for changes to take effect.
for me it works when I've coped findstr(from windows/system32) to wildfly/bin
Please go throught the simplest steps:-
go to C:\Windows\system32\ and copy findstr.exe file.
paste this file into the location C:\Program Files\Java\jdk1.6.0_24\bin
Run your jboss again you will get out of this.....
Check to see if you %SystemRoot% is evaluating (type set path into a command prompt, you should not see %SystemRoot%, but instead that actual path). If your path variable's (user, or systems) first entry begins with an %(an environment variable) this can cause an issue.
To resolve this, simply swap this first entry with anything else in your path that does not lead with an environment variable.
You can also hard code the directory by replacing 'findstr' with 'C:\Windows\system32\findstr'. This is useful when using systems with restricted user permissions.
I have try to work with play framework but stuck with to run activator.bat file but solution is the same just copy file from windows/system32/findsr and past it to under stuck folder then run the respective file again.
thanks to andrewsiand Suryaprakash
Please beware that current Windows systems use a Capital "S" for the System directory, so:
C:\WINDOWS\System32
%SystemRoot%\System32
Omitting the capital S will result in a neglect of the line in the %PATH%
In my case (not JBoss related) the following helped to fixed this error.
Instead of:
SET path="%path%;C:\some\additional\path"
I used:
SET "path=%path%;C:\some\additional\path"
For IBM ACE solution for
'findstr' is not recognized as an internal or external command,
Go to the path C:\Windows\System32
Find the findstr.exe, copy it and then find the path where you bin file of your application is found. eg C:\Program Files\IBM\ACE\11.0.0.12\server\bin then past it inside the bin file
cancel the console of ace and re-open it.
Then run ACE toolkit command on ace console.
Then press enter, now it can open.