Anonymous_User Absent Member.
Absent Member.
293 views

Search for a string in a log


I am tring to serach for the followig string
"java.lang.OutOfMemoryError: Java heap space"
in a log file. The ":" in the string may be causing the search to fail.
Can someone please help? The log files are created by an application and
I am trying to search for the entire string so an altert can be sent.


--
elazarus
------------------------------------------------------------------------
elazarus's Profile: https://forums.netiq.com/member.php?userid=4396
View this thread: https://forums.netiq.com/showthread.php?t=46867

0 Likes
4 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Search for a string in a log

It may help help if you mention which program you are using for the
search. As this is a log file I presume you're using grep, but grep works
with nothing different than what you typed:

Code:
----------
grep 'java.lang.OutOfMemoryError: Java heap space' /path/to/file.log
----------

I tried the string, sans quotes, in a web browser as well (when a webpage
had that text) and that also worked perfectly.

If you're trying to use grep without any quotes then that's your problem
most-likely.

Good luck.
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Search for a string in a log


Using APP Manager. Does ":" character cause problems? Thanks for the
help


--
elazarus
------------------------------------------------------------------------
elazarus's Profile: https://forums.netiq.com/member.php?userid=4396
View this thread: https://forums.netiq.com/showthread.php?t=46867

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Search for a string in a log

On 19.02.2013 14:14, elazarus wrote:
>
> Using APP Manager. Does ":" character cause problems? Thanks for the
> help


Depending on the search tool, some characters may have special meanings
to the search syntax and should be escaped (or otherwise specified that
this is a plain text string and should not be parsed by the search tool)

How this is achieved differs from search tool to tool and really this is
a question better asked in the support forums for the search tool rather
than here.

--
----------------------------------------------------------------------
Alex McHugh
NetIQ Knowledge Partner http://forums.netiq.com

Please post questions in the forums. No support is provided via email.
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Search for a string in a log


elazarus;225610 Wrote:
> I am tring to serach for the followig string
> "java.lang.OutOfMemoryError: Java heap space"
> in a log file. The ":" in the string may be causing the search to fail.
> Can someone please help? The log files are created by an application and
> I am trying to search for the entire string so an altert can be sent.


Thanks Alex. I posted the question in the forum for App Manager- General
AsciiLog and got the answer.


--
elazarus
------------------------------------------------------------------------
elazarus's Profile: https://forums.netiq.com/member.php?userid=4396
View this thread: https://forums.netiq.com/showthread.php?t=46867

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.