Cross Reference: jcmd_pid_Output2.awk
xref
: /
openjdk7
/
jdk
/
test
/
sun
/
tools
/
jcmd
/
jcmd_pid_Output2.awk
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
4601
N/A
#
4601
N/A
BEGIN
{
4601
N/A
totallines
=
0
;
matched
=
0
4601
N/A
}
4601
N/A
4601
N/A
# match on counter name followed '=' and an arbitrary value
4601
N/A
/^[a-z|A-Z][a-z|A-Z|
0
-
9
|\.|_]*=.*$/
{
4601
N/A
matched
++;
4601
N/A
}
4601
N/A
4601
N/A
# or match the first line (PID of the JVM followed by ':')
4601
N/A
/^[
0
-
9
]+:/
{
4601
N/A
matched
++;
4601
N/A
}
4601
N/A
4601
N/A
{
totallines
++;
print
$
0
}
4601
N/A
4601
N/A
END
{
4601
N/A
if
(
(
totallines
>
0
)
&&
(
matched
==
totallines
)
)
{
4601
N/A
exit
0
4601
N/A
}
4601
N/A
else
{
4601
N/A
exit
1
4601
N/A
}
4601
N/A
}