How do i take Logs for windows application? - windows

I am working on an application in Windows 7 environment and the application is not stable yet I wanted to see the crash logs , Please help me to get log files.

Reporting Services writes event messages to the Windows application
log. You can use the message information written to the application
log to find out about events that are generated by the report server
applications running on the local system.
Reporting Services provides three event sources:
Report Server (Report Server Windows service)
Report Manager
Scheduling and Delivery Processor
Source

You can use Log4Net to log errors or alternatively just write your errors to a text file.
Here is a link on how to use log4net Link

Related

run report through form

what is the wrong in this?
i am trying to run 11g report through 11g form but iam getting this message.
[1]: https://i.stack.imgur.com/hHcYY.jpg
the report is working correctly from report builder.
[1]: https://i.stack.imgur.com/9CmS9.jpg
this is the button in form
[1]: https://i.stack.imgur.com/VzKdq.jpg
and this is the connect code.
declare
p_id paramlist;
begin
p_id :=get_parameter_list('tmpdata');
if not id_null(p_id) then
destroy_parameter_list(p_id);
end if;
p_id:=create_parameter_list('tmpdata');
add_parameter(p_id,'paramform',text_parameter,'no');
add_parameter(p_id,'p_1',text_parameter,:block2.t1);
web.show_document('http://mohamed-pc:7001/reports/rwservlet?report=D:\test\pharmacy\med_by_company.rdf&userid=pharmacy/pharmacy#orcl&destype=cache&paramform=htmlcss');
end;
The crash no longer occurs when Reports Server tracing is switched off. This may be due to the size of the trace file and that there was insufficient disk space / memory/cpu available to create it.
The problem does not reproduce when using rwrun / rwrun.sh because rwrun does not run the request via the Reports Server, and therefore no tracing takes place.
It should be noted that Reports Server tracing can have a major impact on performance. It is recommended that Reports Server tracing is only enabled when diagnostic information is required to troubleshoot a problem with a report, an error or a crash. Report Server tracing should not be enabled by default, especially in a production environment.
Running a Report via rwrun Performs Much Faster Than Using rwservlet or rwclient
Switch off Reports Server tracing by commenting out the xml tag
relating to tracing in the Reports Server conf file.
Change <trace traceOpts="trace_all"/>
to <!--trace traceOpts="trace_all"/-->
Stop and start the Reports Server for the change to take effect.
Reports Server Configuration File :
The configuration settings for the Reports Server component of Oracle
Reports Services are stored in the XML file rwserver.conf and
rwbuilder.conf, located in the directory : ORACLE_HOME\reports\conf

Logging for two different environment logs in to a single log file

I am quite new for log4j2 logger and my requirement to write a log from application server and web server.
I am having two different environment on which J BOSS server is deployed.
Now I am having a log file on web server environment which is writing logs for errors and I want to write logs from application server also in same file.
Please suggest.
If you want the logs to be integrated together you should use a solution like Splunk or Elastic Search/Logstash/Kibana (ELK).
When you try to write to a file from 2 different processes your file will get corrupted unless you use file locking. However, your throughput will decrease significantly and it isn't supported for rolling files. So the best approach is to send the logs to a single process where they can be aggregated.

how to generate websphere thread dump without wsadmin on windows server

I have websphere application server v 7 over windows server and I want to generate thread dumps because i have thread hungs, but when I try to get the java cores with wsadmin appears an error, so I want to generate java core files like linux using kill -3 .
Is there something like this in Windows server ?.
Like ObiWanKenobi mentioned, your best bet would probably be through the deployment manager administrative console. From IBM's support site:
Set the com.ibm.websphere.threadmonitor.dump.java property to true:
Application Servers:
From the administrative console, click Servers > Application Servers > server_name.
Under Server Infrastructure, click Administration > Custom Properties.
Click New and add the following property:
Name: com.ibm.websphere.threadmonitor.dump.java
Value: true
Click Apply.
Click OK and save the configuration changes.
Restart the Application Server for the changes to take effect.
Node Agent:
From the administrative console, click System Administration > Node Agents > nodeagent.
Under Additional Properties, click Administration Services
Under Additional Properties, click Custom Properties
Click New and add the following property:
Name: com.ibm.websphere.threadmonitor.dump.java
Value: true
Click Apply.
Click OK and save the configuration changes.
Restart the Node Agent for the changes to take effect.
In short, there is no good answer.
The closest would be to use something like SendSignal. See the Can I send a ctrl-C (SIGINT) to an application on Windows? question for more information. Unfortunately, SendSignal doesn't work reliably on all versions of Windows (see my Send ctrl-break to java process on 64-bit Windows ala sendsignal on 32-bit question).
If you're willing to write some custom code, you could write a Java program that uses the attach API to load a Java agent that calls the Dump API. (I suspect that IBM Support Assistant has this capability built-in, but it's been too long since I tried to be authoritative on this point.)
You can make the JVM to do a thread dump when there are 'hung' threads messages in the SystemOut.log:
Add com.ibm.websphere.threadmonitor.dump.java=true under JVM's Administration > Custom Properties.

Viewing TeamCity service messages

I'm troubleshooting a build step in TeamCity 9.0.4. The problem seems to lie within the service message output. Is it possible to view these after the build has completed? They are not included in the build log.
The documentation on service messages simply says In order to be processed by TeamCity, they should be printed into a standard output stream of the build.
https://confluence.jetbrains.com/display/TCD9/Build+Script+Interaction+with+TeamCity
(To some extent the service messages can be viewed by manually rerunning the build step and monitoring standard output, but this is not always feasible.)
The documentation for service message implies that you need to write service messages to standard out/error rather than to a log file. If you write it to standard out, teamcity will automatically pick it up and show it in the **build logs ** tab
What this means is that if you have a
shell script, use echo for your service messages
java class, use System.out.println
and so on
Different languages also have different plugins for this , for ex perl has TapHarness.pl to write teamcity messages to the console.
EDIT:
If you want to just view service messages , you can find them in the build logs on the teamcity agent that the build ran on. If you do not find them in the build logs , either the build log has rolled over or you need to increase the verbosity or debug level of your logs(depends on the language).
There was a problem which is solved nowdays:
TeamCity now parses service messages inside other service messages, but only if original message was tagged with tc:parseServiceMessagesInside. Example:
##teamcity[testStdOut name='test1' out='##teamcity|[buildStatisticValue key=|'my_stat_value|' value=|'125|'|]' tc:tags='tc:parseServiceMessagesInside']
A link to JetBrains bug tracker:
https://youtrack.jetbrains.com/issue/TW-45311

What is good/free software for monitoring IIS in Windows Vista?

I always forget to check what's going on in IIS on our webservers, and am wondering: is there some stupid applet or something that always runs locally that I can click on to check event logs and IIS logs on a remote machine?
Mark
You can set up samurize to follow the output of the logging on the local and remote machines but it requires some setup.
You can use a remote shell utility such as OpenSSH to connect to remote machines securely.
One at a time. Compmgmt.msc -> connect to another computer.
But one at a time is boring. Monitoring dozens of machines? I've been using logparser from MS for my log monitoring needs. I run a query that dumps errors and warnings to a csv file a few times a day.
So far, I've only used it to aggregate event logs across the dozen servers in our QA environment, but it appears to take many forms on log input, including IIS. A pseudo log file query (don't have samples with me)
logparser "Select [eventtype], [message] into output.csv FROM \\server1\system, \\server2\system" -i EVT
This shows: You can aggregate multiple servers. You tell it the input format - it supports a dozen log types. You can dump it into a csv file. It looks sort of like SQL. This article in security focus has an IIS log sample.
I'm not an applet type of guy, so I haven't though much about desktop widgets to do this.

Resources